LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-11-2007, 08:55 PM   #1
jshih
Member
 
Registered: Mar 2007
Posts: 47

Rep: Reputation: 15
How to install 32-bit software in 64-bit system


Hi,

Currently, I install SuSe 10.2 in my notebook with 64-bit system. When I install the system, I also select 32-bit runtime to be installed.
After the system installed, I can compile my application with C++ by default which is 64-bit binary.
When I try to compile with an option - "-m32", during link, the 32-bit library can not be found.

Question: How can I make my 64-bit system to run 32-bit application?

Thank you.
 
Old 04-12-2007, 01:59 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Answer: Install the 32-bit version of the library or tell the linker where to find the 32-bit version of the library.

Look at your filesytem. There should be a */lib directory for 32-bit libraries and a */lib64 directory for 64-bit libraries. If not, then you probably don't have a multilib system and can only use the 64-bit ABI.
 
Old 04-12-2007, 02:44 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
SuSE does have a multilib system. Look in the install disk under /docu/ for the SuSE documentation. One of the documents covers building 32 bit apps when running the 64 bit distro. Some of the 32 bit versions are also available as rpms and some packages such as firefox will install the 32 bit version by default. This is done for firefox to allow running 32 bit plugins. For other packages, there simply isn't a 64 bit version to install.
 
Old 04-12-2007, 09:10 PM   #4
jshih
Member
 
Registered: Mar 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Thank you for your information.

There are two set libraries - lib and lib64 as you described in the mail.
But, under lib, I can not find libstdc++.so.
Under lib64, I do see that there is a directory-32 under /usr/lib64/gcc/x86_64-suse-linux/4.1.2. In oder to have libstdc++.so to install under 32, do I need to get 32-bit gcc software? Where I can get 32-bit software?

Thank you.
 
Old 04-12-2007, 11:04 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
There are 303 packages in the x86_64 directory on the SuSE install disk. There are 46 packages in the i586 directory. There are 406 packages in the noarch directory. This is the x86_64 install disk that I am refering to. Check if the package exists before trying to compile from source.

These are the 32 bit libstd++ packages on the installation disk:
libstdc++41-32bit-4.1.2_20061115-5.x86_64.rpm
libstdc++41-devel-32bit-4.1.2_20061115-5.x86_64.rpm

There may also be earlier versions in packages beginning with "compat-".

What 32 bit program are you trying to install?
Or is this a program you wrote yourself?

By the way, the SuSE documentationn I was referring to earlier is in the docu/en/opensuse-reference_en.pdf file.
Chapter 12: 32-Bit and 64-Bit Applications in a 64-Bit System Environment

It covers building 32 bit applications.

Last edited by jschiwal; 04-12-2007 at 11:05 PM.
 
Old 04-14-2007, 12:26 PM   #6
jshih
Member
 
Registered: Mar 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Thank you for your response.

For 32-bit environment, I will use for my own developed application.
 
  


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
32-bit version of every 64-bit package on system? sancho Fedora 11 08-05-2008 08:58 AM
no sound in 32 bit chroot on 64 bit system <solved> otchie1 Linux - Software 0 11-28-2006 05:03 PM
32 bit thunderbird/firefox on 64 bit system true_atlantis Fedora 6 07-19-2006 09:37 AM
Getting Konqueror to load 32 bit plugins on a 64 bit system slantoflight Linux - Software 1 05-28-2006 05:17 PM
32 bit or 64 bit install - is 32 bit easier for a newbie? dms05 Linux - Newbie 3 05-19-2006 03:05 PM

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

All times are GMT -5. The time now is 01:06 AM.

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
Open Source Consulting | Domain Registration