Linux - Kernel This forum is for all discussion relating to the Linux kernel. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-11-2007, 08:55 PM
|
#1
|
Member
Registered: Mar 2007
Posts: 47
Rep:
|
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.
|
|
|
04-12-2007, 01:59 PM
|
#2
|
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
|
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.
|
|
|
04-12-2007, 02:44 PM
|
#3
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
04-12-2007, 09:10 PM
|
#4
|
Member
Registered: Mar 2007
Posts: 47
Original Poster
Rep:
|
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.
|
|
|
04-12-2007, 11:04 PM
|
#5
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
04-14-2007, 12:26 PM
|
#6
|
Member
Registered: Mar 2007
Posts: 47
Original Poster
Rep:
|
Thank you for your response.
For 32-bit environment, I will use for my own developed application.
|
|
|
All times are GMT -5. The time now is 08:35 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|