LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-26-2006, 04:14 AM   #1
germanymontrealexpat
LQ Newbie
 
Registered: May 2006
Posts: 2

Rep: Reputation: 0
compiling in 32-bit mode on 64-bit Linux


Hello everyone,

I am using some hardware (haptic device), whose Linux drivers come only in 32-bit binary form (i.e.: no source code), which, in order to integrate with my other software, entails that I compile everything else in 32-bit format as well. Currently, however, I am using Suse 10 configured in 64-bit format. I need the 64 bits for other applications of mine, namely image processing of CT volumes that easily eats up more than 2 Gb.

I am using gcc 4.0.2. Is there a way of ensuring that my former compilation entirely takes place in 32 bits? So far, I am seeing the following:

make
gcc -W -O2 -DNDEBUG -Dlinux -o HelloHapticDevice HelloHapticDevice.c conio.c -L/usr/lib -lHDU -lHD -lrt
HelloHapticDevice.c:40: warning: ‘stdcall’ attribute ignored
HelloHapticDevice.c:115: warning: ‘stdcall’ attribute ignored
/var/tmp/dirinstall/usr/bin/ld: skipping incompatible /usr/lib/libHD.so when searching for -lHD
/var/tmp/dirinstall/usr/bin/ld: skipping incompatible /usr/lib/libHD.so when searching for -lHD
/var/tmp/dirinstall/usr/bin/ld: cannot find -lHD
collect2: ld returned 1 exit status

I have tried an instruction of the type
CC=linux32 gcc
in the Makefile, to no avail.

Please advise,

GME
 
Old 05-26-2006, 06:15 AM   #2
jlo_sandog
Member
 
Registered: Jul 2005
Location: USA
Distribution: F10 (x86_64)
Posts: 549

Rep: Reputation: 32
The flags I use on fc5 to compile in 32 bit are
CC="gcc m32"
LDFLAGS='-L/usr/X11R6/lib'

However, to get to the point of compiling you will need a bunch of 32 bit -devel libs to get the job done.
 
Old 05-26-2006, 07:39 AM   #3
germanymontrealexpat
LQ Newbie
 
Registered: May 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Hi Jlo,

that turned out to be surprisingly easy. Thank you for the prompt, accurate and concise answer.

Michel (GME)
 
  


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
compiling 64 bit kernel in 32 bit linux MadnessASAP Linux - Hardware 6 05-04-2009 11:47 AM
compiling on ia64 in 32 bit mode nkshirsagar SUSE / openSUSE 2 05-05-2005 12:47 AM
Compiling 32-bit binary in a 64-bit environment Kaj Linux - Software 1 12-13-2004 09:43 AM
32 bit or 16 bit mode in XF86Config-4 uglydot Linux - Hardware 4 06-25-2003 02:07 PM
Displaying 8-bit images in 24-bit mode and vice versa yrraja Linux - General 4 04-29-2003 11:54 PM

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

All times are GMT -5. The time now is 02:37 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