[mrtg] Re: MRT 2.8.6, GD 1.6.3

Yozo Toda yozo at aohakobe.ipc.chiba-u.ac.jp
Tue Aug 3 17:28:56 MEST 1999


> ld.so.1: .//rateup: fatal: libgd.so.0: open failed: No such file or directory

gd-1.6.3 now installs both "archive library" libgd.a and
"shared object" libgd.so, and
rateup is compiled with the shared object libgd.so
which is linked on runtime.
you can check this situation using /usr/bin/ldd command.

solution 1: set environment variable LD_LIBRARY_PATH appropriately
            when invoking rateup (see "man ld")

            example:
              rename rateup to .rateup (or any name you like)
              edit rateup as shell script containg the following four lines
              (assuming gd library resides in /opt/gd/lib/)

                #!/bin/sh
                LD_LIBRARY_PATH=/opt/gd/lib:$LD_LIBRARY_PATH
                export LD_LIBRARY_PATH
                ./.rateup $*


solution 2: after configure'd and before make'ing,
            edit Makefile and add -R option to LDFLAG
            to specify the directory gd library resides.
            for example, change the line
                LDFLAGS =  -lm -L/opt/gd/lib -lgd -lpng -lz
            to
                LDFLAGS =  -lm -L/opt/gd/lib -R/opt/gd/lib -lgd -lpng -lz
            which effects ld.so to search that directory.

solution 3: after configure'd and before make'ing,
            edit Makefile and add an option to LDFLAG
            to force ld to link the static library libgd.a.
            for example, option "-B static" is needed for Solaris /usr/ccs/ld.
            with GNU egcs compiler I can use -Xlinker option;

     LDFLAGS =  -lm -Xlinker -B -Xlinker static -L/opt/gd/lib -lgd -lpng -lz

-- yozo.

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list