LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-27-2016, 09:07 AM   #1
bhand14
LQ Newbie
 
Registered: Jan 2016
Posts: 6

Rep: Reputation: Disabled
ELFCLASS32 incompatible with ELFCLASS64


Hey guys,

I've just recently been tasked with building i686 rpm's on a x86_64 CentOS 7 machine, and have run into an issue with one of the projects:
/bin/ld: form_x.xi.o: file class ELFCLASS32 incompatible with ELFCLASS64
/bin/ld: final link failed: File in wrong format

Correct me if I am wrong, but it appears that the linker is trying to link 32 bit object files with a 64 bit toolchain? I have the correct gcc libs for i686 installed and have passed the -m32 as a cflag and a ldflag when executing the configuration file like so:

./configure --build=i686-redhat-linux CFLAGS="-m32" LDFLAGS="-m32" CXXFLAGS="-m32" --prefix=/usr/local/aubit4gl --with-pg-all="/usr/local/pgsql/" --disable-prefix-check

My thought is that this is not the correct place to pass the LDFLAG...yes? Am I even on the right train of thought?
 
Old 01-27-2016, 09:53 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,453

Rep: Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051
I've always found cross-compiling an entire build (./configure; make) for a different architecture to be a huge PITA. While theoretically it should work, unless the designers actually designed it to be able to do so, it usually breaks at one point or another during the build process.

It's usually much easier to just set up a 32-bit VM and build it locally there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Error while loading shared libraries - wrong ELF class: ELFCLASS32 CowboyRT Linux - Newbie 5 06-24-2014 12:00 PM
[SOLVED] libQtScript.so.4: wrong ELF class: ELFCLASS64 TheIndependentAquarius Linux - Software 5 08-12-2011 05:06 AM
wrong ELF class: ELFCLASS32 wilsonsamm Programming 3 01-19-2011 11:34 AM
RPMBuild ELFCLASS32 error... jamied66 Linux - Software 1 03-24-2010 05:42 AM
error while loading shared libraries: libstdc++.so.5: wrong ELF class: ELFCLASS64 permalac Linux - Software 5 05-06-2009 04:58 AM


All times are GMT -5. The time now is 08:25 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