[sane-devel] compile problems with scanbd: undefined reference to symbol 'pthread_sigmask@@GLIBC_2.2.5'

Dominik Kopp my at kabelfunk.de
Thu Jan 3 21:12:55 UTC 2013


Wilhelm wrote:

> Hi Dominik,
> 
> Am 02.01.2013 20:45, schrieb Dominik Kopp:
>> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-
linux/bin/ld:
>> dbus.o: undefined reference to symbol 'pthread_sigmask@@GLIBC_2.2.5'
>> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-
linux/bin/ld:
>> note: 'pthread_sigmask@@GLIBC_2.2.5' is defined in DSO
>> /lib64/libpthread.so.0 so try adding it to the linker command line
>> /lib64/libpthread.so.0: could not read symbols: Invalid operation
>> collect2: error: ld returned 1 exit status make[1]: *** [scanbd] Fehler 1
>> make[1]: Leaving directory `/home/dom/scanbd/trunk/src/scanbd'
>> make: *** [all-recursive] Fehler 1
> 
> looks like -lpthread is missing on openSUSE. 

file /lib64/libpthread.so.0 exists.  (linked to /lib64/libpthread-2.15.so)

> Do you mind trying to
> compile with the Makefile.simple instead of configure?

dom at linux-8k4r:~/scanbd/trunk> make -f Makefile.simple
make -f Makefile.simple -C src/scanbd all
make[1]: Entering directory `/home/dom/scanbd/trunk/src/scanbd'
cc   scanbd.o slog.o sane.o daemonize.o dbus.o udev.o  -lsane -ludev -
lconfuse -lpthread -ldbus-1 -o scanbd
make[1]: Leaving directory `/home/dom/scanbd/trunk/src/scanbd'
make -f Makefile.simple -C doc all
make[1]: Entering directory `/home/dom/scanbd/trunk/doc'
echo "Generating manpage scanbd.8...";
Generating manpage scanbd.8...
sed  -e 's|@PACKAGEVERSION@|1.2.1|g' \
     -e 's|@PACKAGENAME@|scanbd|g' \
     -e 's|@SBINDIR@|/usr/local/bin|g' \
     -e 's|@SCANBDCFGDIR@|/usr/local/etc/scanbd|g'  scanbd.man >scanbd.8
make[1]: Leaving directory `/home/dom/scanbd/trunk/doc'

ok, and where is the binary?  
(this is my fourth or fifth program I'm trying to compile. Therefore I'm not 
very skilled...)


> As safer aproach would be to use scanbd-1.2.1 instead of trunk.

ok, according to the "INSTALL" file:

dom at linux-8k4r:~/scanbd/releases/1.2.1> USE_SANE=yes make -e clean all
make -C scanbuttond clean
make[1]: Entering directory `/home/dom/scanbd/releases/1.2.1/scanbuttond'
make -C backends clean
make[2]: Entering directory 
`/home/dom/scanbd/releases/1.2.1/scanbuttond/backends'
rm -f *.o *~ *.so
make[2]: Leaving directory 
`/home/dom/scanbd/releases/1.2.1/scanbuttond/backends'
make -C interface clean
make[2]: Entering directory 
`/home/dom/scanbd/releases/1.2.1/scanbuttond/interface'
rm -f *.o *~
make[2]: Leaving directory 
`/home/dom/scanbd/releases/1.2.1/scanbuttond/interface'
rm -f *~
make[1]: Leaving directory `/home/dom/scanbd/releases/1.2.1/scanbuttond'
rm -f -f scanbd test *.o *~
cc  -DUSE_SANE -UUSE_SCANBUTTOND -DUSE_HAL  -c -o scanbd.o scanbd.c
In file included from scanbd.h:45:0,
                 from scanbd.c:23:
slog.h:33:1: error: unknown type name ‘bool’
In file included from scanbd_dbus.h:33:0,
                 from scanbd.h:46,
                 from scanbd.c:23:
/usr/include/dbus-1.0/dbus/dbus.h:29:33: fatal error: dbus/dbus-arch-deps.h: 
Datei oder Verzeichnis nicht gefunden
compilation terminated.
make: *** [scanbd.o] Fehler 1


dbus-1-devel package is installed and contains following files:
/usr/include/dbus-1.0/dbus/dbus.h
/usr/lib64/dbus-1.0/include/dbus/dbus-arch-deps.h
<...>
(full list at http://pkgs.org/opensuse-12.2/opensuse-update-x86_64/dbus-1-
devel-1.5.12-4.10.1.x86_64.rpm.html )

-------------
then I tried:
dom at linux-8k4r:~/scanbd/releases/1.2.1> make clean all

ok, this is working.

make install does mostly well.

dom at linux-8k4r:~/scanbd/releases/1.2.1> su
Passwort: 
linux-8k4r:/home/dom/scanbd/releases/1.2.1 # make install
echo "Make /usr/local/etc/scanbd"
Make /usr/local/etc/scanbd
mkdir -p /usr/local/etc/scanbd
echo "Copy files to /usr/local/etc/scanbd"
Copy files to /usr/local/etc/scanbd
cp scanbd.conf /usr/local/etc/scanbd
cp example.script /usr/local/etc/scanbd
cp scanadf.script /usr/local/etc/scanbd
cp test.script /usr/local/etc/scanbd
echo "Copy scanbd to /usr/local/bin"
Copy scanbd to /usr/local/bin
mkdir -p "/usr/local/bin"
cp scanbd /usr/local/bin
echo "Copy scanbuttond backends to 
/usr/local/etc/scanbd/scanbuttond/backends"
Copy scanbuttond backends to /usr/local/etc/scanbd/scanbuttond/backends
mkdir -p "/usr/local/etc/scanbd/scanbuttond/backends"
cp scanbuttond/backends/*.so "/usr/local/etc/scanbd/scanbuttond/backends" || 
/bin/true
cp: Aufruf von stat für „scanbuttond/backends/*.so“ nicht möglich: Datei 
oder Verzeichnis nicht gefunden
echo "Copy scanbd_dbus.conf to /etc/dbus-1/system.d/"
Copy scanbd_dbus.conf to /etc/dbus-1/system.d/
cp scanbd_dbus.conf "/etc/dbus-1/system.d"
cp scanbuttond/backends/meta.conf 
"/usr/local/etc/scanbd/scanbuttond/backends" || /bin/true
echo "Edit /etc/inetd.conf"
Edit /etc/inetd.conf


is that OK? Should I try to move forward with the next steps as described in  
INSTALL?

regards
Dominik




More information about the sane-devel mailing list