[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
logic error in build/rrd.sh?
- To: "'hobbit (at) hswn.dk'" <hobbit (at) hswn.dk>
- Subject: logic error in build/rrd.sh?
- From: Craig Cook <Craig.Cook (at) carquest.com>
- Date: Wed, 27 May 2009 12:14:28 -0400
- Accept-language: en-US
- Acceptlanguage: en-US
- Thread-index: Acne5jYbhxyKjTsVS7OKb2EY8iVyKw==
- Thread-topic: logic error in build/rrd.sh?
A co-worker discovered my compile issue with Hobbit 4.3.0-beta2. Looks like it has been an issue since 4.2.0 though.
This is a for loop. The last found instance of librrd.so is used, not the first. Also, the search path is hard coded.
for DIR in /opt/rrdtool* /usr/local/rrdtool* /usr/local /usr /usr/pkg /opt/csw /opt/sfw /usr/sfw
do
if test -f $DIR/include/rrd.h
then
RRDINC=$DIR/include
fi
if test -f $DIR/lib/librrd.so
then
RRDLIB=$DIR/lib
fi
if test -f $DIR/lib/librrd.a
then
RRDLIB=$DIR/lib
fi
if test -f $DIR/lib64/librrd.so
then
RRDLIB=$DIR/lib64
fi
if test -f $DIR/lib64/librrd.a
then
RRDLIB=$DIR/lib64
fi
if test -f $DIR/lib/libpng.so
then
PNGLIB="-L$DIR/lib -lpng"
fi
if test -f $DIR/lib/libpng.a
then
PNGLIB="-L$DIR/lib -lpng"
fi
if test -f $DIR/lib64/libpng.so
then
PNGLIB="-L$DIR/lib64 -lpng"
fi
if test -f $DIR/lib64/libpng.a
then
PNGLIB="-L$DIR/lib64 -l
The current workaround is something like this
Manually edit the Makefile and add something like this
ifdef PCRELIBS
# PCRE settings
PCRELIBS = -L/usr/local/lib -lpcre -lpng endif
ifdef RRDLIBS
RRDLIBS = -L/usr/local/rrdtool-1.2.19/lib -lrrd -L/usr/lib Endif
Craig