LinuxQuestions.org
Register a domain and help support LQ
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 07-19-2008, 06:02 AM   #16
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,052

Rep: Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101

Quote:
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:

Quote:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linuxgnu/4.1.2/../../../libm.so when searched for lm
Identify the problem files one at a time. You just identified the first (libm.so). 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 libm.so 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.

Quote:
Originally Posted by resetreset View Post
YOU CANT RUN A 32 BIT EXE ON A 64BIT MACHINE!!! WHAT KIND OF PERSON KNOWS THE TERMS "32-BIT", "64-BIT", PROGRAMS, BUT DOESNT KNOW THAT??!!
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
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
To samitpmc # 14 : lm ~ libm.so ... please see this
http://www.linuxquestions.org/questi...mpiler-656359/

Regards
 
  


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
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


All times are GMT -5. The time now is 11:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration