LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums HCL Reviews Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-03-2010, 09:55 AM   #1
hanoverj
LQ Newbie
 
Registered: Aug 2010
Distribution: Ubuntu, MonteVista
Posts: 4

Rep: Reputation: 0
cross-compiling glibmm-2.4 need help!


Hi guys,

I'm having a few issues cross-compiling glibmm-2.4 using the arm cross compiler from code sourcery.

when doing a make install for glibmm I get the following errors:

/bin/bash arm-libtool --tag=CC --mode=link /home/josborne/HTCSDK/sourcery/bin/arm-none-linux-gnueabi-g++ -g -O2 -o libglibmm_generate_extra_defs-2.4.la -rpath /home/josborne/HTCFS/usr/lib -version-info 1:0:0 generate_extra_defs.lo -Wl,--export-dynamic -lsigc-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -Wl,--export-dynamic -lsigc-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
arm-libtool: link: gcc -shared .libs/generate_extra_defs.o /usr/lib/libsigc-2.0.so /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so /usr/lib/libglib-2.0.so -Wl,--export-dynamic -Wl,--export-dynamic -Wl,-soname -Wl,libglibmm_generate_extra_defs-2.4.so.1 -o .libs/libglibmm_generate_extra_defs-2.4.so.1.0.0
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
.libs/generate_extra_defs.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [libglibmm_generate_extra_defs-2.4.la] Error 1
make[2]: Leaving directory `/home/josborne/HTCFS/usr/src/glibmm-2.4.0/tools/extra_defs_gen'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/josborne/HTCFS/usr/src/glibmm-2.4.0/tools'
make: *** [install-recursive] Error 1




I've built a cross compiled version of libtool (arm-libtool) to help with this issue (found the information about that here: http://www.metastatic.org/text/libtool.html) but it doesn't solve the problem.


Has anyone had similar experiences with this? any help is much appreciated!

J
 
Old 08-03-2010, 11:11 AM   #2
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 285

Rep: Reputation: 32
Can you rebuild once with "clean all" options.
 
Old 08-03-2010, 12:05 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,799

Rep: Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349
Welcome to LQ.

You cannot use /usr/bin/ld , when you are cross compiling.

All the tools / files used must be "arm" or cross-compiled for arm beforehand.

I guess, your cross tool-chain includes a linker.
Can be specified with :
LD=/home/josborne/HTCSDK/sourcery/bin/arm-none-linux-ld
( Replace 'arm-none-linux-ld' etc. with actual name and location.)

Or :
export LD=/home/josborne/HTCSDK/sourcery/bin/arm-none-linux-ld
.....
 
1 members found this post helpful.
Old 08-04-2010, 04:26 AM   #4
hanoverj
LQ Newbie
 
Registered: Aug 2010
Distribution: Ubuntu, MonteVista
Posts: 4

Original Poster
Rep: Reputation: 0
Hey,

Thanks for the advice. I re-configured my arm-libtool to use arm-none-linux-gnueabi-ld and built it again.
Unfortunately when I try and make glibmm it still gives me the same error:

/usr/bin/ld: .libs/generate_extra_defs.o: Relocations in generic ELF (EM: 40)
.libs/generate_extra_defs.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status

I've no idea where it is getting the /usr/bin/ld from. I have checked all the makefiles for libtool and glibmm. Is there some kind of 'defaults' file somewhere that I am unaware of?
 
Old 08-04-2010, 04:41 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,799

Rep: Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349Reputation: 3349
./configure LD=/home/josborne/HTCSDK/sourcery/bin/arm-none-linux-gnueabi-ld
( See './configure --help' for possible / valid 'LD FLAGS' ).

If it isn't working, then you can edit the Makefile.in :

If it says : LD = ld
.. then edit to your version >>
LD = /home/josborne/HTCSDK/sourcery/bin/arm-none-linux-gnueabi-ld

And rerun './configure -- ..... ' to create a new Makefile.
.
 
1 members found this post helpful.
Old 08-04-2010, 05:02 AM   #6
hanoverj
LQ Newbie
 
Registered: Aug 2010
Distribution: Ubuntu, MonteVista
Posts: 4

Original Poster
Rep: Reputation: 0
Yes, that was the problem with ld thanks.

It's still not building but looks like I'm getting on the right track now!

Last edited by hanoverj; 08-04-2010 at 05:08 AM.
 
Old 08-06-2010, 06:35 AM   #7
hanoverj
LQ Newbie
 
Registered: Aug 2010
Distribution: Ubuntu, MonteVista
Posts: 4

Original Poster
Rep: Reputation: 0
Still having LD problems and wonder if anyone here knows the answer. I've edited the LD to point to my arm-ld and updated the libtool in the makefiles to use my arm-libtool yet I'm having problems building libxml++. This occurs once all files have been compiled:

/bin/bash arm-libtool --tag=CXX --mode=link /home/josborne/HTCSDK/sourcery/bin/arm-none-linux-gnueabi-g++ -Wall -g -O2 -version-info 2:7:0 -no-undefined -o libxml++/libxml++-2.6.la -rpath /home/josborne/HTCFS/usr/lib libxml++/attribute.lo libxml++/document.lo libxml++/dtd.lo libxml++/keepblanks.lo libxml++/noncopyable.lo libxml++/schema.lo libxml++/exceptions/exception.lo libxml++/exceptions/parse_error.lo libxml++/exceptions/validity_error.lo libxml++/exceptions/internal_error.lo libxml++/io/istreamparserinputbuffer.lo libxml++/io/outputbuffer.lo libxml++/io/ostreamoutputbuffer.lo libxml++/io/parserinputbuffer.lo libxml++/nodes/cdatanode.lo libxml++/nodes/commentnode.lo libxml++/nodes/contentnode.lo libxml++/nodes/entityreference.lo libxml++/nodes/element.lo libxml++/nodes/node.lo libxml++/nodes/processinginstructionnode.lo libxml++/nodes/textnode.lo libxml++/parsers/parser.lo libxml++/parsers/saxparser.lo libxml++/parsers/domparser.lo libxml++/parsers/textreader.lo libxml++/validators/dtdvalidator.lo libxml++/validators/schemavalidator.lo libxml++/validators/validator.lo -lxml2 -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0

arm-libtool: link: g++ -shared -nostdlib /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.4.1/crtbeginS.o libxml++/.libs/attribute.o libxml++/.libs/document.o libxml++/.libs/dtd.o libxml++/.libs/keepblanks.o libxml++/.libs/noncopyable.o libxml++/.libs/schema.o libxml++/exceptions/.libs/exception.o libxml++/exceptions/.libs/parse_error.o libxml++/exceptions/.libs/validity_error.o libxml++/exceptions/.libs/internal_error.o libxml++/io/.libs/istreamparserinputbuffer.o libxml++/io/.libs/outputbuffer.o libxml++/io/.libs/ostreamoutputbuffer.o libxml++/io/.libs/parserinputbuffer.o libxml++/nodes/.libs/cdatanode.o libxml++/nodes/.libs/commentnode.o libxml++/nodes/.libs/contentnode.o libxml++/nodes/.libs/entityreference.o libxml++/nodes/.libs/element.o libxml++/nodes/.libs/node.o libxml++/nodes/.libs/processinginstructionnode.o libxml++/nodes/.libs/textnode.o libxml++/parsers/.libs/parser.o libxml++/parsers/.libs/saxparser.o libxml++/parsers/.libs/domparser.o libxml++/parsers/.libs/textreader.o libxml++/validators/.libs/dtdvalidator.o libxml++/validators/.libs/schemavalidator.o libxml++/validators/.libs/validator.o /usr/lib/libxml2.so /usr/lib/libglibmm-2.4.so /usr/lib/libgobject-2.0.so /usr/lib/libsigc-2.0.so /usr/lib/libglib-2.0.so -L/usr/lib/gcc/i486-linux-gnu/4.4.1 -L/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.4.1/../../.. -L/usr/lib/i486-linux-gnu -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.4.1/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crtn.o -Wl,-soname -Wl,libxml++-2.6.so.2 -o libxml++/.libs/libxml++-2.6.so.2.0.7
/usr/bin/ld: libxml++/.libs/attribute.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: libxml++/.libs/attribute.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: libxml++/.libs/attribute.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: libxml++/.libs/attribute.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: libxml++/.libs/attribute.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: libxml++/.libs/attribute.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: libxml++/.libs/attribute.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: libxml++/.libs/attribute.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: libxml++/.libs/attribute.o: Relocations in generic ELF (EM: 40)
libxml++/.libs/attribute.o: could not read symbols: File in wrong format



It seems it is still picking up the wrong version of ld in /usr/bin/ld plus note the libs it is automatically pulling in from /usr/lib rather than the directory I specified /home/josborne/HTCFS/usr/lib

I know I asked this before but is there some default location searched BEFORE it checks my specific locations?

Thanks in advance!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-compiling v/s cross-building kushalkoolwal Programming 3 05-13-2009 06:49 AM
problem compiling glibmm-2.13.3 fsucsguy Linux - Software 3 04-20-2007 09:47 AM
problem compiling glibmm-2.13.3 fsucsguy Linux - Newbie 1 04-17-2007 05:15 PM
cross compiling with g++ hornofsalvation Linux - Newbie 2 10-09-2004 11:29 PM
Got a problem compiling glibmm-2.4.0 Adan Linux - Software 2 09-02-2004 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration