[cl-gd-devel] Trouble installing
Hi, When I try to compile cl-gd I get the following error: Error opening shared object "/home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so": /home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so: undefined symbol: gdImageCreateFromJpeg. [Condition of type SIMPLE-ERROR] libjpeg is installed. I know this because 'make install' of libjpeg yields the following output: /usr/bin/install -c -m 644 jconfig.h /usr/local/include/jconfig.h /usr/bin/install -c -m 644 ./jpeglib.h /usr/local/include/jpeglib.h /usr/bin/install -c -m 644 ./jmorecfg.h /usr/local/include/jmorecfg.h /usr/bin/install -c -m 644 ./jerror.h /usr/local/include/jerror.h ./libtool --mode=install /usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la /usr/bin/install -c .libs/libjpeg.so.62.0.0 /usr/local/lib/libjpeg.so.62.0.0 rm -f /usr/local/lib/libjpeg.so.62 /usr/local/lib/libjpeg.so (cd /usr/local/lib && ln -s libjpeg.so.62.0.0 libjpeg.so.62) (cd /usr/local/lib && ln -s libjpeg.so.62.0.0 libjpeg.so) /usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la PATH="/home/blaino/bin:/usr/local/bin:/usr/bin:/sbin:/usr/X11R6/bin:/usr/sbin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/sbin" ldconfig -n /usr/local/lib ------------------------------------------------------------------------------ Libraries have been installed in: /usr/local/lib To link against installed libraries in a given directory, LIBDIR, you must use the `-LLIBDIR' flag during linking. You will also need to do one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ------------------------------------------------------------------------------ ./libtool --mode=install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg /usr/bin/install -c .libs/cjpeg /usr/local/bin/cjpeg ./libtool --mode=install /usr/bin/install -c djpeg /usr/local/bin/djpeg /usr/bin/install -c .libs/djpeg /usr/local/bin/djpeg ./libtool --mode=install /usr/bin/install -c jpegtran /usr/local/bin/jpegtran /usr/bin/install -c .libs/jpegtran /usr/local/bin/jpegtran ./libtool --mode=install /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom ./libtool --mode=install /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom /usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/man/man1/cjpeg.1 /usr/bin/install -c -m 644 ./djpeg.1 /usr/local/man/man1/djpeg.1 /usr/bin/install -c -m 644 ./jpegtran.1 /usr/local/man/man1/jpegtran.1 /usr/bin/install -c -m 644 ./rdjpgcom.1 /usr/local/man/man1/rdjpgcom.1 /usr/bin/install -c -m 644 ./wrjpgcom.1 /usr/local/man/man1/wrjpgcom.1 Following the hint provided by the make install output (and archived advice from Edi Weitz) I checked to see if ld will check this directory. I go to /etc/ld.so.conf and verify that /usr/local/lib is one of the paths. Furthermore, when linking cl-gd-glue I use: ld -shared -lgd -lz -lpng -ljpeg -lfreetype -liconv -lm -lc cl-gd-glue.o -o cl-gd-glue.so -L/usr/local/lib where the -L/usr/local/lib bit is supposed to direct to where libjpeg has been installed. (It does not balk. It used to, before I ran make install-lib during the installation of libjpeg, saying it couldn't find -ljpeg. But now it seems fine). But, when I run (asdf:oos 'asdf:compile-op :cl-gd) I just get the undefined symbol error. I ran 'find .|grep libjpeg' and get the following (subset of output): ./usr/lib/jvm/java-1.4.2-sun-1.4.2.11/jre/lib/i386/libjpeg.so ./usr/lib/libjpeg.a ./usr/lib/libjpeg.so.62 ./usr/lib/libjpeg.so.6.0.1 find: ./usr/lib/man-db: Permission denied ./usr/lib/libjpeg.so.62.0.0 ./usr/lib/libjpeg.so.6 ./usr/local/lib/libjpeg.a ./usr/local/lib/libjpeg.so.62 ./usr/local/lib/libjpeg.so.62.0.0 ./usr/local/lib/libjpeg.la ./usr/local/lib/libjpeg.so find: ./usr/share/YaST2/data/support: Permission denied ./home/blaino/systems/jpeg-6b/.libs/libjpeg.so.62 ./home/blaino/systems/jpeg-6b/.libs/libjpeg.so.62.0.0 ./home/blaino/systems/jpeg-6b/.libs/libjpeg.la ./home/blaino/systems/jpeg-6b/.libs/libjpeg.so ./home/blaino/systems/jpeg-6b/libjpeg.a ./home/blaino/systems/jpeg-6b/libjpeg.doc ./home/blaino/systems/jpeg-6b/libjpeg.la Could multiple versions of libjpeg be a problem? If so, how to fix it? (I'm a linux newbie). Other than that, I don't have any other hypotheses. Help is very, very, very much appreciated. Thanks, Blaine PS You may have seen my post on comp.lang.lisp. Since then I have (I believe) successfully installed both libjpeg and libiconv.
On Fri, 30 Jun 2006 15:36:58 -0400, "Blaine Nelson" <jillandblaine@hotmail.com> wrote:
Error opening shared object "/home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so": /home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so: undefined symbol: gdImageCreateFromJpeg. [Condition of type SIMPLE-ERROR]
gdImageCreateFromJpeg is defined in libgd.so so it seems that libgd.so is not found. Does it help if you do something like export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH before you start your Lisp compiler (assuming that on your system libgd.so is in /usr/local/lib)? Did you build libgd.so yourself? If not, where did you get it from and how did you install it? Otherwise, it might also be helpful if you could give us information about which Lisp you are using, which Linux distro, and so on. Cheers, Edi.
Edi, Thanks for the reply. Problem solved! The key was to run export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH before building libgd.so. That said, I still don't understand what's going on. /usr/local/lib is in /etc/ld.so.conf. I thought that was supposed to suffice... Oh well. Doesn't matter. I'm just so darned happy it's working. Thanks again, Blaine ----Original Message Follows---- From: Edi Weitz <edi@agharta.de> To: "Blaine Nelson" <jillandblaine@hotmail.com> CC: cl-gd-devel@common-lisp.net Subject: Re: [cl-gd-devel] Trouble installing Date: Sun, 02 Jul 2006 22:23:34 +0200 On Fri, 30 Jun 2006 15:36:58 -0400, "Blaine Nelson" <jillandblaine@hotmail.com> wrote:
Error opening shared object "/home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so": /home/blaino/systems/cl-gd-0.5.1/cl-gd-glue.so: undefined symbol: gdImageCreateFromJpeg. [Condition of type SIMPLE-ERROR]
gdImageCreateFromJpeg is defined in libgd.so so it seems that libgd.so is not found. Does it help if you do something like export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH before you start your Lisp compiler (assuming that on your system libgd.so is in /usr/local/lib)? Did you build libgd.so yourself? If not, where did you get it from and how did you install it? Otherwise, it might also be helpful if you could give us information about which Lisp you are using, which Linux distro, and so on. Cheers, Edi.
participants (2)
-
Blaine Nelson -
Edi Weitz