[Gdal-dev] building gdal for OpenZaurus
Yan Seiner
yan at seiner.com
Thu Aug 24 12:40:46 EDT 2006
Mateusz Loskot wrote:
>toolchain 3.5.4 includes gcc 2.95, am I right?
>This compiler is first quite strict in C++ code compilation.
>
>
Actually it uses 3.3.4, but your fix works. :-)
>Could you replace lines 175 - 182 with following:
>
>#include <cctype>
>#include <cerrno>
>#include <cfloat>
>#include <climits>
>#include <cmath>
>#include <cstdlib> // this is most important!
>#include <cstring>
>
>Please, try to compile it now.
>If you will get errors about declarations not found, please add
>using namespace std;
>below these includes.
>
>
>
Now I get a link failure at the very end:
| arm-linux-g++ -march=armv5te -mtune=xscale -shared -nostdlib
/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/lib/crti.o
/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4/crtbeginS.o
.libs/libgdal.la-2.o -Wl,--rpath
-Wl,/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/lib
-Wl,--rpath
-Wl,/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/lib
-lpng -lz -lrt -ldl
-L/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4
-L/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/lib
/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/lib/libstdc++.so
-lm -lc -lgcc_s
/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4/crtendS.o
/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/lib/crtn.o
-march=armv5te -mtune=xscale -Wl,-soname -Wl,libgdal.so.1 -o
.libs/libgdal.so.1.10.0
|
/home/local/zaurus/tmp/cross/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld:
cannot find -lpng
| collect2: ld returned 1 exit status
| make[1]: *** [libgdal.la] Error 1
Is there any reason why gdal is using -nostdlib? Or is that an artifact
of the OZ toolchain?
(cc to openzaurus - can someone from the OZ camp help me out? How do I
fix this? I treid adding a LDFLAGS= to the bb file but that didn't
help. The gdal configure doesn't recognize --with-extra-libs - but I
shouldn't have to tell it where to find the standard crosschain libs...)
Thanks for all the help,
--Yan
More information about the Gdal-dev
mailing list