digideskio / protobuf-c

Automatically exported from code.google.com/p/protobuf-c
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

linking errors: compiled for a little endian system and target is big endian #62

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello! 

What steps will reproduce the problem?
1. I am trying to link against the protobuf-c library. My code is big- 
endian, so I configured the protobuf-c with the following command: 
./configure --with-endianness=big 

2. Compile
3. I get the following error: 
.\..\..\mips-wrs-vxworks\bin\ld: protobuf-c.o: compiled for a little 
endian system and target is big endian

What is the expected output? What do you see instead?
When I am trying to compile the code, I have the following 
problem (linking stage): 

        -L..\PlSup\Util\IGMPv3\MIPS64 -LC:\Tornado2.2\target\lib\mips 
\MIPS64\gnu_bcm125x -LC:\Tor 
nado2.2\target\lib\mips\MIPS64\common_bcm125x -LC:\Tornado2.2\target 
\lib\mips\MIPS64\gnu - 
LC:\Tornado2.2\target\lib\mips\MIPS64\common -L..\..\..\..\gen\CAS 
\Vendors\Verimatrix\vmclient -LC:\CC_VIEWS\mheller_view1\gen\UTILS\Proto_Libs   
 -lnet  - 
larch  -lcplus  -lgnucplus  -lvxcom  -lcommoncc  -ldcc  -ldrv  -lgcc  -lnet  
-los  -lrpc  -ltffs  -lvxfusion  -lvxm p  -lwdb  -lwind  -indview  -lprotobuf-c 
C:\Tornado2.2\target\lib 
\libMIPS64gnuvx.a -Wl,--end-group  -o partialImage.o 
collect2: ld terminated with signal 11 [Segmentation fault] 
c:\Tornado2.2\host\x86-win32\bin\..\lib\gcc-lib\mips-wrs-vxworks\2.96- 
mips3264-010729\..\. 
.\..\..\mips-wrs-vxworks\bin\ld: protobuf-c.o: compiled for a little 
endian system and target is big endian 
File in wrong format: failed to merge target specific data of file C: 
\CC_VIEWS\mheller_view1\gen\UTILS\Proto_Libs\libprotobuf-c.a(protobuf-c.o) 
c:\Tornado2.2\host\x86-win32\bin\..\lib\gcc-lib\mips-wrs-vxworks\2.96- 
mips3264-010729\..\. 
.\..\..\mips-wrs-vxworks\bin\ld: warning: cannot find entry symbol 
start; defaulting to 0000000000400000 

What version of the product are you using? On what operating system?
protobuf-c-0.15, compiling with tornado on windows. The target is wxworks, mips.

Please provide any additional information below.

Any help will be appreciated.

Original issue reported on code.google.com by miry.hel...@harmonicinc.com on 29 May 2011 at 7:16

GoogleCodeExporter commented 8 years ago
you are compiling protobuf-c with different options than your target (mips 
comes in big and little endianesses so it's a little hard for me to say what's 
wrong, but there's a mismatch). see the Cross-Compiling wiki.

this has nothing to do with the --with-endianness stuff (which you probably 
should not use):  that flag will not affect the linker.

Original comment by lahike...@gmail.com on 17 Jan 2012 at 2:55