[gdal-dev] IRIX build feedback

Frank Warmerdam warmerdam at p...
Fri Sep 14 13:10:45 EDT 2001


Randall,

I am sorry for not replying to these sooner.

Randall Hopper wrote:
> 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

I am aware of this (ohh am I aware!) and I don't know how to fix this.
If I modify configure my changes will just be wiped next time I regenerate
it with autoconf. I suppose I really should just change the name of the
directory. It seemed like a good idea at the time!

> ------------------------------------------------------------------------------
>
> 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))

Done.

>
> ------------------------------------------------------------------------------
>
> 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 am not happy with the mechanism used by the default autoconf macro
(AC_C_BIGENDIAN) for determining endianness. I think I will rewrite it today
to run a little program to test the endianness instead of trying to find
definitions in some include file.

> ------------------------------------------------------------------------------
>
> 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.

I was not familiar with this concept, but I have added @CPPFLAGS@ to
the CFLAGS and CXXFLAGS definition in GDALmake.opt.in.

> ------------------------------------------------------------------------------
>
> 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) {

I have fixed as suggested.

> ------------------------------------------------------------------------------
>
> 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).

My current approach to shared library building is to define the ld command
with all arguments in the LD_SHARED variable. I would suggest modifying
your environment before configuring accordingly.

I suspect this is a non-standard approach but I am nervous about busting
what is working with shared library building.

> ------------------------------------------------------------------------------
>
> 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).

I am afraid to try and fix this, so for now I will ignore it. :-)

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list