LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-15-2014, 11:09 AM   #1
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Rep: Reputation: 25
32-bit support on GCC 4.7.3 for x86_64


In order to compiler to 32-bit executables on my 64-bit machine, I apparently need the 32-bit libraries or something. Does anyone know exactly what files I need? I want to get WINE working but it wants 32-bit support. The make fails, not recognizing -m32 flag.
 
Old 01-15-2014, 12:14 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Assuming that you use Slackware (you didn't specify which distro use), install the multilib packages from AlienBob to get 32 bit support. When you are at it already you can also use his Wine package, so that you don't need to compile it.
 
1 members found this post helpful.
Old 01-16-2014, 02:46 AM   #3
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
See here:
http://docs.slackware.com/slackware:multilib
 
1 members found this post helpful.
Old 01-17-2014, 05:23 AM   #4
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by TobiSGD View Post
Assuming that you use Slackware (you didn't specify which distro use), install the multilib packages from AlienBob to get 32 bit support. When you are at it already you can also use his Wine package, so that you don't need to compile it.
Distro? Yes, Slackware. (I guess peeps don't believe the profile info over on the left)

Okay, I went to AlienBOB's and it was FANTASTIC. I followed his simple instructions and everything ran without incident. After so many packages that FAIL, it is a pleasant relief to have something that works as advertised. I'm not sure how to test it.
 
Old 01-17-2014, 06:49 AM   #5
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
test it by running skype
 
Old 01-17-2014, 07:44 AM   #6
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by Drakeo View Post
test it by running skype
Ummm, thanks but I'm not set up for Skype, I don't have the microphone. I tried Photoshop (fail) and some DOS style games (fail). Games (mmorpg?) are what I use windoz for most and what I'd like to be able to play. Of course browser games are no problem.
 
Old 01-17-2014, 07:57 AM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
I tested my multilib setup with a simple "Hello, Brian!" C program:
Code:
bash-4.2$ cd Progs
bash-4.2$ gcc hello.c -o hello64
bash-4.2$ . /etc/profile.d/32dev.sh
bash-4.2$ gcc hello.c -o hello32
bash-4.2$ file hello32
hello32: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
bash-4.2$ file hello64
hello64: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
bash-4.2$
 
1 members found this post helpful.
Old 01-18-2014, 03:08 AM   #8
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by brianL View Post
I tested my multilib setup with a simple "Hello, Brian!" C program:
Code:
bash-4.2$ cd Progs
bash-4.2$ gcc hello.c -o hello64
bash-4.2$ . /etc/profile.d/32dev.sh
bash-4.2$ gcc hello.c -o hello32
bash-4.2$ file hello32
hello32: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
bash-4.2$ file hello64
hello64: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
bash-4.2$
It seems I've made a pig's breakfast of things. I guess it's obvious that I was confusing WINE with the compiler in trying to test GCC. Using your example above I discovered a mess of my own making. I had been trying to upgrade the compiler to 4.7.3 and 4.8.2 and they are getting mixed up with the original. I'm going too have to clean that mess up before I can proceed because I'm getting all sorts of incompatible files and file not found errors. Thanks for your help, it exposed the problems.
...
Okay, all's well, it works. Thanks again!

Last edited by rdx; 01-18-2014 at 03:49 AM. Reason: update with results
 
  


Reply



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
Kerenel Compiled with x86_64 gcc vs. i686 gcc zvivered Linux - Embedded & Single-board computer 1 10-27-2009 09:52 AM
Compilation problem when downgrading from 64-bit gcc to 32-bit gcc huyhoang3673 Linux - Software 7 08-26-2009 11:31 AM
Can you kexec at boot from a 32-bit (x86) to 64-bit (x86_64) kernel? Shingoshi Linux - Kernel 15 06-26-2009 10:08 PM
compiling 32 bit application on 64 bit linux(x86_64) uttam_h Linux - Software 16 07-19-2008 02:33 PM
32/64 bit libs - FC6/gcc 4.1.1 -m32 picking up 64 bit library marier Fedora 0 04-24-2007 12:57 PM

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

All times are GMT -5. The time now is 08:39 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
Open Source Consulting | Domain Registration