I[m trying to build libgphoto2, version 2.5.8 on a Slackware(14.1), Linux i686 box. The build dies with
./libgphoto2/.libs/libgphoto2.so: undefined reference to `gpi_vsnprintf'
in the tests sub-directory. If I force the tests not to build by tweaking the makefile, it finishes compiling,
by now gphoto2 does n'0t link properly (not too surprising)
weird. as it works here ...
what is the linkline of gphoto2 or of the tests?
Here's the one leading to the crash:
make[4]: Entering directory
/home/ronis/Project/notar/GNOME/garnome/mystuff/libgphoto2/work/main.d/libgphoto2-2.5.8/tests' /bin/sh ../libtool --tag=CC --mode=link /usr/bin/gcc -I/opt/garnome-3.17/include -L/opt/garnome-3.17/lib -O2 -g -pipe -Wall -Wmissing-declarations -Wmissing-prototypes -Wl,--export-dynamic -L/opt/garnome-3.17/lib -o test-gphoto2 test-gphoto2.o ../libgphoto2/libgphoto2.la ../libgphoto2_port/libgphoto2_port/libgphoto2_port.la -lltdl -L/opt/garnome-3.17/lib -lexif libtool: link: /usr/bin/gcc -I/opt/garnome-3.17/include -O2 -g -pipe -Wall -Wmissing-declarations -Wmissing-prototypes -Wl,--export-dynamic -o .libs/test-gphoto2 test-gphoto2.o -L/opt/garnome-3.17/lib ../libgphoto2/.libs/libgphoto2.so /home/ronis/Project/notar/GNOME/garnome/mystuff/libgphoto2/work/main.d/libgphoto2-2.5.8/libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so ../libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so -lpthread /opt/garnome-3.17/lib/libltdl.so -ldl /opt/garnome-3.17/lib/libexif.so -lm -Wl,-rpath -Wl,/opt/garnome-3.17/lib ../libgphoto2/.libs/libgphoto2.so: undefined reference to
gpi_vsnprintf'collect2: error: ld returned 1 exit status
make[4]: *** [test-gphoto2] Error 1
looks good. currently no good idea what might be wrong.
it might be that it picks up an older libgphoto2_port version on the system, the gpi_vsnprintf function is new with 2.5.7
no reply so far, perhapos fixed
Hey... if anyone's still interested, I have ran into the same issue. But I was able to get it resolved (although nearly threw my laptop out of the window when I got the trick).
If you have specified
As one of your configure parameters, remove it. At least when I had it behind configure, the build fails just as the reporter suggested.
Remove the parameter, and everything worked again for me. But Marcus, this, you might want to look into, is the project mixing between the system library directory and the pre-linker .libs area?
Best Regards,
Jeff Bai
hard to solve ... but I think this problem is meanwhile likely gone, as such mix is probably not happening as also systems have upgraded