Re: [Gdal-dev] building gdal for OpenZaurus

Yan Seiner <[email protected]>
Newsgroups gmane.comp.handhelds.openzaurus.devel
Message-ID <[email protected]>
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


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.