Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 07-19-2008, 06:02 AM   #16
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190

Originally Posted by samitpmc View Post
My problem is just opposite. I want to build x64 application from my 32 bit ubuntu machine with gcc 4.1.2 installed.
You need 64-bit .so files and/or .a files (and probably at least one startup .o file) for linking and you need g++ to be able to find them. From your symptom description below, I would guess you haven't even loaded those files. Once you have the files, I'm not sure what you need to set up so that g++ will find them.

Maybe some expert will answer (I'm definitely not). But meanwhile, here is the way I would attack the problem if I needed to do what you're trying:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linuxgnu/4.1.2/../../../ when searched for lm
Identify the problem files one at a time. You just identified the first ( As you fix each, the linker will identify more.

Check with your package manager to find out which 32-bit package contained that file.

Go to the ftp site for your distribution and download (not install) the 64-bit build of that same package.

Open the package with ark (instead of the package manager) to extract the .gz file that contains the package data.

Open that .gz file and see what directories contain .so, .a or .o files. Make "64" versions of those same directories (for example, you will find goes in /usr/lib, so make a corresponding /usr/lib64 directory).

Drag each of those files from the .gz to the "64" directory you created for it.

Figure out the right g++ switches or environment variables to make it look there.

Retry the build.

I'm sure experts know a cleaner way to automate some of the above steps. But the above is the way I know.

Originally Posted by resetreset View Post
I tried your profile and the link to your other posts to see if you routinely post things like the above. It didn't look that way. So what's the problem? You replied to an old post (in a thread someone reopened with a significant change of question). Your reply is totally incorrect as well as missing the point of even the old post you quoted. With the all caps and "what kind of person" one would assume you're just trying to provoke a fight. Probably I misunderstood what I saw in your other posts and you are just trying to provoke a fight. Please don't. Please allow this thread to provide useful answers to those looking for help.

Last edited by johnsfine; 07-19-2008 at 06:11 AM.
Old 07-19-2008, 02:33 PM   #17
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,706

Rep: Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294
To samitpmc # 14 : lm ~ ... please see this



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
compiling 64 bit kernel in 32 bit linux MadnessASAP Linux - Hardware 6 05-04-2009 11:47 AM
linux 32 bit compilation on x86_64 with autoconf skullmunky Programming 3 03-16-2007 03:57 PM
compiling in 32-bit mode on 64-bit Linux germanymontrealexpat Linux - Software 2 05-26-2006 07:39 AM
Compiling 32-bit binary in a 64-bit environment Kaj Linux - Software 1 12-13-2004 09:43 AM
Use 32 bit and x86_64 Linux on same system? jfried Linux - Newbie 1 11-15-2004 11:05 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:24 PM.

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