Author Topic: Cross-compilation Errors  (Read 4324 times)

melee

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • http://
Cross-compilation Errors
« on: May 30, 2005, 07:57:37 am »
Hi

Some help please

I am trying to crosscompile some code which works and compiles fine under the simulated Z environment for a qws frame buffer.
I am using the /opt/Qtopia and /opt/Embedix packages with scripts to set env

I get the errors below, malloc is such a basic function it must be quite simple.

By removing the libstdc++-libc6.....  lib in my /usr/lib that libqpe uses under the x86 env, I can produce a similar
problem for compilation in the X86 qws environment

Therefore malloc is in libstdc++-libc ????

The version of libstdc++-libc in my /Embedix.....   is libstdc++-libc6.3-2-2.10.0.so
This is as supplied and has worked until now

The version of libstdc++-libc in my /usr/lib.....   is libstdc++-libc6.2-2.so.3

Have the malloc functions changed so much that there is incompatability between those libs?

My Z is a C860 with Sharp ROM so has libqte-2.3.2 and libqpe-1.5.0. Whatever I use must remain compatable to that

The output is:-

arm-linux-gcc -Wl,-rpath,/opt/Qtopia/sharp/lib,-rpath-link,/opt/Qtopia/sharp/lib -o zword defdlg.o dictionary_impl.o \
file.o filedlg.o formatter.o main.o mkdirdlg.o mkdiredit.o scqtfiledialog.o scqtfiledlg.o shc.o shcm.o spellengine.o \
utf8.o zword.o zwordview.o moc_defdlg.o moc_mkdirdlg.o moc_mkdiredit.o moc_scqtfiledialog.o moc_scqtfiledlg.o \
moc_zword.o  -L/opt/Qtopia/sharp/lib -L/opt/Embedix/native/lib -lqpe

dictionary_impl.o: In function `__malloc_alloc_template<0>::_S_oom_malloc(unsigned int)':
dictionary_impl.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned int)+0x28): undefined reference to `ostream::operator<<(char const *)'
dictionary_impl.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned int)+0x2c): undefined reference to `endl(ostream &)'
dictionary_impl.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned int)+0x58): undefined reference to `cerr'
collect2: ld returned 1 exit status
make: *** [zword] Error 1

Any ideas

yours hopefully

Melee
C860 - with Sharp ROM
1GB SD and 2 GB & 256MB CF
WiFi, Bluetooth and Sharp CF camera cards
Ubuntu 6.06
(WinXP if I really have to)

Hrw

  • Hero Member
  • *****
  • Posts: 1366
    • View Profile
Cross-compilation Errors
« Reply #1 on: May 30, 2005, 11:43:09 am »
in dictionary_impl.cpp remove one line:

cerr << [here something] << endl;

or link with -lstdc++ and use arm-linux-g++ for it
OpenZaurus 3.5.4x Release Manager
OpenEmbedded, Ångström, Poky developer
My website

Misc embedded hardware.

melee

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • http://
Cross-compilation Errors
« Reply #2 on: May 30, 2005, 01:48:52 pm »
Quote
in dictionary_impl.cpp remove one line:

cerr << [here something] << endl;

or link with -lstdc++ and use arm-linux-g++ for it
[div align=\"right\"][a href=\"index.php?act=findpost&pid=82150\"][{POST_SNAPBACK}][/a][/div]

Thanks for the ideas

It was only you mentioning arm-linux-g++ that made me realise I was linking with arm-linux-gcc

Something must have happened to my tmake templates because it should be arm-linux-g++, I have never used -gcc in this env

I'll have a look at it tomorrow

cheers

Melee
C860 - with Sharp ROM
1GB SD and 2 GB & 256MB CF
WiFi, Bluetooth and Sharp CF camera cards
Ubuntu 6.06
(WinXP if I really have to)

melee

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • http://
Cross-compilation Errors
« Reply #3 on: May 31, 2005, 06:44:17 am »
Quote from: melee,May 30 2005, 06:48 PM
Quote from: Hrw,May 30 2005, 04:43 PM
or link with -lstdc++ and use arm-linux-g++ for it
[div align=\"right\"][a href=\"index.php?act=findpost&pid=82150\"][{POST_SNAPBACK}][/a][/div]

All sorted thanks.

My custom tmake template for arm-linux-g++ had been overwriten when I swapped some stuff around.
Should have realised when the Makefile suddenly contained -lqte instead of -lqpe, but I have been developing using the virtual environment and haven't tried compiling an arm binary for a couple of  weeks.

regards

Melee
C860 - with Sharp ROM
1GB SD and 2 GB & 256MB CF
WiFi, Bluetooth and Sharp CF camera cards
Ubuntu 6.06
(WinXP if I really have to)