Can I run Linux code (32bit machine) in Linux (64bit machine)

Reply

Join Date: Sep 2006
Posts: 1
Reputation: santosdas is an unknown quantity at this point 
Solved Threads: 0
santosdas santosdas is offline Offline
Newbie Poster

Can I run Linux code (32bit machine) in Linux (64bit machine)

 
1
  #1
Sep 4th, 2006
Hi,

I've c source code developed in 32-bit linux machine. Can I run it in 64-bit linux machine.

Thank you.
Santos
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 147
Reputation: Grunt has a spectacular aura about Grunt has a spectacular aura about 
Solved Threads: 12
Grunt's Avatar
Grunt Grunt is offline Offline
Junior Poster

Re: Can I run Linux code (32bit machine) in Linux (64bit machine)

 
1
  #2
Sep 4th, 2006
That depends on the code.
The key to eliminating bugs from your code is learning from your mistakes.
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,851
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Can I run Linux code (32bit machine) in Linux (64bit machine)

 
1
  #3
Sep 4th, 2006
Providing the author did the job properly, all you need to do is recompile it on the target machine.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,142
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1434
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: Can I run Linux code (32bit machine) in Linux (64bit machine)

 
1
  #4
Sep 4th, 2006
unlike MS-Windows, not all *nix machines were created equally. A 32-bit program compiled on one *nix computer may or may not run on another 32-bit *nix computer, unless the hardware is identical. There are many different flavors of linux/unix computers and they run many different chip sets (or whatever they are called) (80x88, risk, etc). Programs have to be recompiled for each of these different machine types.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,050
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 331
Moderator
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Can I run Linux code (32bit machine) in Linux (64bit machine)

 
1
  #5
Sep 4th, 2006
Yes, generally you must recompile code for different archs/non-standard kernels in Linux.

[offtopic]Mac OS X Leopard has a special backwards-compatibility regarding 64 and 32 bit apps[/offtopic]
"Technological progress is like an axe in the hands of a pathological criminal."
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,999
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 137
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: Can I run Linux code (32bit machine) in Linux (64bit machine)

 
1
  #6
Sep 5th, 2006
In some distributions you can, if you're on the AMD64, i.e. x86-64 architecture, since it's a superset of x86 -- there are issues that come up, like the fact that you need thirty-two-bit libraries /and/ sixty-four-bit libraries installed on the system.
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC