[mrtg] Re: rateup problem (solaris)
Yozo Toda
yozo at aohakobe.ipc.chiba-u.ac.jp
Mon Sep 20 14:39:25 MEST 1999
> Anyone else yhat have seen this and can help me ?
>
> # ./mrtg test.cfg
> ld.so.1: .//rateup: fatal: libgd.so.0: open failed: Invalid argument
FAQ (Frequently Asked Questions) (-:
Q:
mrtg compiled ok. but when I try to run mrtg, I see the error
ld.so.1: .//rateup: fatal: libgd.so.0: open failed: Invalid argument
or
ld.so.1: .//rateup: fatal: libgd.so.0: open failed: No such file or directory
or such like.
A:
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
(answer part copied from my message sent to mrtg mailing list:
Subject: [mrtg] Re: MRT 2.8.6, GD 1.6.3
Date: Wed, 04 Aug 1999 00:28:56 +0900
X-archive-position: 718
)
-- 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