IRIX build feedback

Randall Hopper hopper.randall at e...
Thu Aug 30 12:43:50 EDT 2001


Just a bit of feedback from building GDAL 1.1.5 on SGI IRIX.

------------------------------------------------------------------------------

If you Ctrl-C configure, it nukes the "core" source directory, thanks to
this line in configure:

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1
\
2 15

------------------------------------------------------------------------------

Please change all the "cd" lines in the build makefiles so they fail if the
directory doesn't exist. Otherwise they generate an infinite build loop:

< (cd core; $(MAKE))
> (cd core && $(MAKE))

------------------------------------------------------------------------------

The BYTE_ORDER compile test in configure needs this code added to the
little test program:

#ifdef sgi
# include <sys/endian.h>
#endif

to successfully configure using gcc on IRIX. Note that configuring with IRIX
cc works fine without this mod.

------------------------------------------------------------------------------

I ran configure like this:

env CC="cc -n32 -O2" CXX="CC -n32 -O2" \
CPPFLAGS="-I/usr/local/include/cfitsio" \
LDFLAGS="-n32 -rpath /usr/local/lib32" \
configure --prefix=/usr/local --with-libz=internal \
--with-png=internal --with-libtiff=internal --with-libgeotiff=internal \
--with-libjpeg=internal --with-libgif=internal --with-python

however the build didn't include $CPPFLAGS on the $CC compilation command
lines as is typically done, so the fits code couldn't find it's headers.

------------------------------------------------------------------------------

IRIX doesn't define rindex in string.h (it's in strings.h). However,
the more common strrchr is defined in string.h. Perhaps gdal could use that
instead. Here's the patch:

frmts/fits/fitsdataset.cpp:
< if (rindex(newValue, '&') == newValue + strlen(newValue) - 1) {
---
> if (strrchr(newValue, '&') == newValue + strlen(newValue) - 1) {

------------------------------------------------------------------------------

LDFLAGS is not being propagated to the LD_SHARED setting in the build, so
the gdal library fails to build. And the apps built in apps/ fail to run
for the same reason (can't find their libraries because they didn't get the
RPATH seting).

------------------------------------------------------------------------------

Not fatal, but when linking libgdal.1.1.so, I get a bunch of
multiply-defined symbol link warnings because the build is linking in both
the .o files and library which contains them. Here are a few sample:

ld32: WARNING 15 : Multiply defined:(OGRRegisterAll) in
./ogr/ogrsf_frmts/gener\
ic/ogrregisterall.o and ./ogr/ogrsf_frmts/ogrsf_frmts.a(ogrregisterall.o) (2nd
\
definition ignored).
...
ld32: WARNING 15 : Multiply defined:(DDFModule::DDFModule(void)) in
./frmts/o/d\
dfmodule.o and ./ogr/ogrsf_frmts/ogrsf_frmts.a(ddfmodule.o) (2nd definition
ign\
ored).

------------------------------------------------------------------------------

Randall

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com




More information about the Gdal-dev mailing list