*banner
 

home
overview
developers


Topics of interest:
Cross-compiling
STLPort
Gumstix/Waysmall


 

FAQ: STLPort

[ home ] [ overview ] [ developers ] [ about escher ]


 

Here you can find information which might be useful during the development process.


Q:  I'm getting really wierd linking errors with STLPort. On Visual Studio it has my class and method names, but linking fails? What is the deal?
A:

 You have fallen victim to one of the classic blunders. Specifically, you have probably linked some of your project using STLPort headers, and the other part linked using headers not from STLPort. 5.0.0. Note that the correct version may not matter, but I don't advise taking any chances.

Link errors manifest themselves with @DU@ instead of @DV@ after name mangling. I will post the exact text sometime when I duplicate the error on my machine.


Q:  I'm having trouble with endiannes and building STLPort.
A:

 The error looks something like this:

arm-linux-c++ -pthread -fexceptions -fident -fPIC -O2 -fuse-cxa-atexit -D_STLP
_REAL_LOCALE_IMPLEMENTED -D_GNU_SOURCE -I../../stlport -c -o obj/arm-linux-gcc
/shared/num_get_float.o ../../src/num_get_float.cpp
../../src/num_get_float.cpp:44:6: #error Unknown endianness.
../../src/num_get_float.cpp: In function `double stlpmtx_std::_Stl_atod(char*, i
nt, int)':
../../src/num_get_float.cpp:728: error: 'struct _ll::<anonymous>' has no member
named 'hi'
../../src/num_get_float.cpp:729: error: 'struct _ll::<anonymous>' has no member
named 'lo'
../../src/num_get_float.cpp:736: error: 'struct _ll::<anonymous>' has no member
named 'hi'
../../src/num_get_float.cpp:737: error: 'struct _ll::<anonymous>' has no member
named 'lo'
make: *** [obj/arm-linux-gcc/shared/num_get_float.o] Error 1

Solution:

  1. Change the $STLPORT/stlport/stl/_config.h file to specify the endianness of your processor correctly. Ususally this is because the processor you have goes both ways, and you have to choose one by default. There should be some preprocessor directive that knows how to do this in the same way as the existing tests in that file.
  2. Create new flags to pass to the compiler which identify the endianness. This is an optimal solution for doing cross compilation. I created a new makefile called gcc-xscale.mak which passes this flag on for xscale processors as a default value of little endian.
asfasf

Q:  I am getting an error when I try to crosscompile STLPort using the buildroot-built crosscompiler. This seems to work on the crosscompiler built on linux, but not on cygwin. What's the deal?
A:

One problem could be that you are unable to find files because of faulty include paths for the compiler. Here is an instance I found:

[sprinkle@ransom-urquell /usr/local/escher/EOCP/src/vendors/STLPort/build/lib]
...
arm-linux-c++ -pthread -fexceptions -fident -fPIC -O2 -fuse-cxa-atexit -D_STLP_REAL_LOCALE_IMPLEMENTED -D_GNU_SOURCE -D_STLP_USE_UCLIBC -I../../stlport -c -o obj/arm-linux-gcc/shared/fstream.o ../../src/fstream.cpp
In file included from /usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../include/c++/3.4.2/../3.4.2/ctime:51,
from ../../stlport/ctime:27,
from ../../src/stlport_prefix.h:28,
from ../../src/fstream.cpp:20:
../../stlport/time.h:29:41: ../include/time.h: No such file or directory
In file included from ../../stlport/ctime:27,
from ../../src/stlport_prefix.h:28,
from ../../src/fstream.cpp:20:
/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../include/c++/3.4.2/../3.4.2/ctime:66: error: `::clock_t' has not been declared

All errors after "../../stlport/time.h:29:41: ../include/time.h: No such file or directory" are bogus. This error seems to emerge from another problem with the buildroot build on cygwin, and the include directory layout they are using. The include paths for the arm-linux-gcc compiler are defined by buildroot correctly, but not all of them are created during installation. For example, running the same command in verbose mode produces:

[sprinkle@ransom-urquell /usr/local/escher/EOCP/src/vendors/STLPort/build/lib]
$ arm-linux-c++ -v -pthread -fexceptions -fident -fPIC -O2 -fuse-cxa-atexit -D_STLP_REAL_LOCALE_IMPLEMENTED -D_GNU_SOURCE -D_STLP_USE_UCLIBC -I../../stlport -c -o obj/arm-linux-gcc/shared/dll_main.o ../../src/dll_main.cpp &> build.out

Reading specs from /usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/
../lib/gcc/arm-linux-uclibc/3.4.2/specs
Configured with: /usr/local/escher/crosscompile/buildroot_xscale/toolchain_build_arm/gcc3.4.2/configure --prefix=/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu --target=arm-linux-uclibc --enable-languages=c,c++ --enable-shared --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls --enable-threads --enable-multilib
Thread model: posix
gcc version 3.4.2
/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../libexec/gcc/arm-linux-uclibc/3.4.2/cc1plus -quiet -v -I../../stlport -iprefix /usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/ -D_GNU_SOURCE -D__ARM_ARCH_3__ -D__PIC__ -D__pic__ -D_STLP_REAL_LOCALE_IMPLEMENTED -D_GNU_SOURCE -D_STLP_USE_UCLIBC ../../src/dll_main.cpp -quiet -dumpbase dll_main.cpp -auxbase-strip obj/arm-linux-gcc/shared/dll_main.o -O2 -version -fexceptions -fident -fPIC -fuse-cxa-atexit -o /cygdrive/c/DOCUME~1/sprinkle/LOCALS~1/Te
mp/ccYlv4kT.s
ignoring nonexistent directory "/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../arm-linux-uclibc/include"
ignoring duplicate directory "/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/lib/gcc/arm-linux-uclibc/3.4.2/../../../../include/c++/3.4.2"
ignoring duplicate directory "/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/lib/gcc/arm-linux-uclibc/3.4.2/../../../../include/c++/3.4.2/arm-linux-uclibc"
ignoring duplicate directory "/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/lib/gcc/arm-linux-uclibc/3.4.2/../../../../include/c++/3.4.2/backward"
ignoring duplicate directory "/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/lib/gcc/arm-linux-uclibc/3.4.2/include"
ignoring duplicate directory "/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/lib/gcc/arm-linux-uclibc/3.4.2/../../../../arm-linux-uclibc/sys-include"
ignoring nonexistent directory "/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/lib/gcc/arm-linux-uclibc/3.4.2/../../../../arm-linux-uclibc/include"
#include "..." search starts here:
#include <...> search starts here:
../../stlport
/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../include/c++/3.4.2
/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../include/c++/3.4.2/arm-linux-uclibc
/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../include/c++/3.4.2/backward
/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/include
/usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../arm-linux-uclibc/sys-include
End of search list.

Note that the /usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../arm-linux-uclibc/sys-include is a symbolic link to /usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/include, and in fact the /usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../arm-linux-uclibc/include should also be the same.

Solution: create a symbolic link named /usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.2/../../../../arm-linux-uclibc/include and the build should go on successfully. I have submitted a problem report to the buildroot people to behavior, and will see what happens.


 

   
 
Last modified 8 March, 2006
To modify this page, use CVS.
©2002-2018 Chess