build pegasus scribble

hi

i try to build this software: Pegasus Scribble, because there is not available in the suse repository.

pegasus_usb.c:700:21: warning: variable ‘pressure’ set but not used -Wunused-but-set-variable]
gcc -I. -g -Wall -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libpng15 -I/usr/include/harfbuzz -I/usr/include/poppler/glib -I/usr/include/poppler -Ilibusb-1.0 -IXtst -o utils.o -c utils.c
gcc -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lfreetype -lfontconfig -lgthread-2.0 -lpoppler-glib -lgio-2.0 -lcairo -lgobject-2.0 -lglib-2.0 -lusb-1.0 -lXtst -o pegasus-scribble systray.o pegasus_scribble.o cursor.o application.o document.o scribble.o pegasus_usb.o utils.o
/usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/lib64/libgtk-x11-2.0.so: référence au symbole non défini «XFlush»
/usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/x86_64-suse-linux/bin/ld: note: «XFlush» is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line
/usr/lib64/libX11.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [pegasus-scribble] error

makefile is:

Makefile

SHELL = /bin/sh
srcdir = .

.SUFFIXES:
.SUFFIXES: .c .o

OPT=-g -O

CC = gcc
PKG_CONFIG = /usr/bin/pkg-config
PEGASUS_LIBS = -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lfreetype -lfontconfig -lgthread-2.0 -lpoppler-glib -lgio-2.0 -lcairo -lgobject-2.0 -lglib-2.0 -lusb-1.0 -lXtst
PEGASUS_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libpng15 -I/usr/include/harfbuzz -I/usr/include/poppler/glib -I/usr/include/poppler -Ilibusb-1.0 -IXtst
CFLAGS = -I. -g -Wall $(PEGASUS_CFLAGS)
LDFLAGS = $(PEGASUS_LIBS)
INSTALL = /usr/bin/install -c
prefix = /usr
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
mandir = ${prefix}/share/man
man1dir = $(mandir)/man1
icondir = $(prefix)/share/$(PROG)/icons
version = 0.4.0

SOURCES = $(wildcard *.c)
OBJS=$(patsubst %.c, %.o, $(SOURCES))
COMMIT = $(shell cat .git/refs/heads/master)
PROG = pegasus-scribble

all: $(PROG)

install: all
./mkinstalldirs $(DEST)/$(bindir)
./mkinstalldirs $(DEST)/$(icondir)
./mkinstalldirs $(DEST)/$(man1dir)
$(INSTALL) -m 0644 icons/* $(DEST)/$(icondir)
$(INSTALL) -m 0755 $(PROG) $(DEST)/$(bindir)
$(INSTALL) -m 0644 pegasus-scribble.1 $(DEST)/$(man1dir)

uninstall:
/bin/rm -f $(DEST)/$(bindir)/$(PROG)
/bin/rm -rf $(DEST)/$(prefix)/share/$(PROG)
/bin/rm -rf $(DEST)/$(man1dir)/pegasus-scribble.1

$(PROG): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^

%.o: %.c %.h
$(CC) $(CFLAGS) -o $@ -c $<

clean:
/bin/rm -f pegasus-scribble $(OBJS)

distclean: clean
/bin/rm -f Makefile config.h config.status config.cache config.log

new_version:
test ! -d dist || rm -rf dist
dir=pegasus-scribble-$(version) &&
mkdir -p dist/$$dir &&
cp *.h dist/$$dir &&
cp *.c dist/$$dir &&
cp pegasus-scribble.1 dist/$$dir &&
cp -r www/ dist/$$dir &&
cp -r icons/ dist/$$dir &&
cp Makefile.in dist/$$dir &&
cp configure dist/$$dir &&
cp config.h.in dist/$$dir &&
cp mkinstalldirs dist/$$dir &&
cp install-sh dist/$$dir &&
rm dist/$$dir/config.h &&
(cd dist/ && tar -zcf …/$$dir.tar.gz $$dir/) && rm -rf dist/

dist-source:
test ! -d dist || rm -rf dist
commit=cat .git/refs/heads/master | sed -e 's/\(........\).*/\1/' &&
dir=pegasus-scribble-$$commit &&
mkdir -p dist/$$dir &&
cp *.h dist/$$dir &&
cp *.c dist/$$dir &&
cp pegasus-scribble.1 dist/$$dir &&
cp -r www/ dist/$$dir &&
cp -r icons/ dist/$$dir &&
cp Makefile.in dist/$$dir &&
cp configure dist/$$dir &&
cp config.h.in dist/$$dir &&
cp mkinstalldirs dist/$$dir &&
cp install-sh dist/$$dir &&
rm dist/$$dir/config.h &&
(cd dist/ && tar -zcf …/$$dir.tar.gz $$dir/) && rm -rf dist/

seem like a ld problem?

to build system is

/configure --prefix=/usr
~$ make
~# make install

if we are able to get it working, that could be interesting to create a rpm…

On Sun 08 Dec 2013 01:56:02 PM CST, collinm wrote:

hi

i try to build this software: ‘Pegasus Scribble’
(http://pegasusscribble.sourceforge.net/), because there is not
available in the suse repository.

Hi
You need to use code tags when pasting text :wink:

So the error is here;


note: «XFlush» is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line

So you need to add -lX11 to the PEGASUS_LIBS line at the end…


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLED 11 SP3 (x86_64) GNOME 2.28.0 Kernel 3.0.101-0.8-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!