netmaster19 / libxbee

Automatically exported from code.google.com/p/libxbee
0 stars 0 forks source link

cross-compile problem #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. set CROSS_COMPILE?= arm-linux- in config.mk
2. make configure
3. make all

What is the expected output? What do you see instead?
The arm-linux-gcc can't compile the xbeep.o because there is a link to 
xbeep.cpp file. The arm-linux-gcc compiler can't compile .cpp files.
The Ubuntu gcc compiler change automatically to cpp, so there is no problem to 
compile.

What version of the product are you using? On what operating system?
I use the latest libxbee libraries and the toolchain version 4.5.1.

Please provide any additional information below.
The error message is:  
.build/xbeep.o: could not read symbols: file in wrong format

I tried to change the compiler to arm-linux-cpp, but its not possible.
In addition i wanted to change the makefile, but i couldn't find the build 
infomration for the .cpp file.

Thank you for help :-)

Original issue reported on code.google.com by dbeinlic...@gmail.com on 1 Aug 2012 at 3:04

GoogleCodeExporter commented 8 years ago
Thanks for reporting this issue.

Please could you confirm that your toolchain supports C++
xbeep.cpp will be built with $(CROSS_COMPILE)g++. the output is .build/xbeep.o

If .build/xbeep.o exists (after running `make all` up to the error), please 
could you try the following command, and confirm that 'corep.o' is built 
correctly:
    $(CROSS_COMPILE)ld -r -o corep.o .build/xbeep.o

I have just made a change to the build system. Please do a 'git pull' and try 
again.

Original comment by attie@attie.co.uk on 3 Aug 2012 at 10:17

GoogleCodeExporter commented 8 years ago
Hi, 
sorry for late response, but the last days i was busy.
I can confirm that my toolchain supports C++ (arm-linux-g++).
I did an git pull and tried again, but i get a similar problem.
Now my system compile the xbeep.o with the g++ compiler instead the 
arm-linux-g++.
So the arm-linux-ld command fails on the .build/xbeep.o file and i can't built 
the corep.o file.

Error output:
g++ -Wall -c -fPIC -g -fvibility=hidden -Wno-variadic-macros xbeep.cpp -c -o 
.build.xbeep.o
arm-linux-ld -r -o .build/__corep.o ./build.xbeep.o
arm-linux-ld: .build/xbeep.o: Relocations in generic ELF (EM: 3)
.
.
.
.build/xbeep.o: could not read symbols: File in wrong format

Thanks for your help again :-)

Original comment by dbeinlic...@gmail.com on 6 Aug 2012 at 5:01

GoogleCodeExporter commented 8 years ago
Apologies, I made a typo.
Please pull again, and try now.

Original comment by attie@attie.co.uk on 6 Aug 2012 at 8:12

GoogleCodeExporter commented 8 years ago
Okay, now it works fine :)
Thank you so much for help, now i try to use the compiled libraries on my arm 
prozessor.
I would say: Fixed

Original comment by dbeinlic...@gmail.com on 7 Aug 2012 at 3:13

GoogleCodeExporter commented 8 years ago
Good news :-)
Thanks

Original comment by attie@attie.co.uk on 7 Aug 2012 at 7:57