LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-16-2010, 03:07 AM   #1
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),Suse 13.1 (Desktop),, Mepis on the wifes lappy
Posts: 760

Rep: Reputation: 90
Convert 32 bit to 64 bit program, is it possible


My question here is that before installing the multilib libraries, how does a 32 bit program differ from a 64 bit. For instance, and here I am showing my ignorance, but surely if I download a program source, shouldn't the resultant binary following compiling and building be a result of the platform it is built on, or does the source code include references to whether it is a 32 or 64 bit program.

Only asking as I have just gone to Slack13_x64, and was hoping that wine might build as a 64bit program.
Or, am I stuck with having to install the multilib libs?

TIA
 
Old 01-16-2010, 03:28 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Wheezy (Fluxbox WM)
Posts: 1,363
Blog Entries: 52

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
A 32 bit program doesn't usually differ intentionally from a 64 bit one, but there are subtle ways in which code can make assumptions about the platform it is on.

There are assumptions about the size of values in structures, about the storage size of arrays of pointers, the ranges of some of the types, unsafe type conversions, alignment of structure members, just to mention a few things that can cause problems. There are ways to make these things portable, but C programmers have become quite used to 32 bits being the standard word size, so we have been slack at times.

My understanding is that the 64 bit version of Wine is still not in a stable state.

Last edited by neonsignal; 01-16-2010 at 03:31 AM.
 
Old 01-16-2010, 06:31 AM   #3
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 87
If you need wine, you should install multi-lib, as a 64-bit wine version has little use (you probably use wine to run 32-bit Windows programs).

There are some other reasons to go multi-lib, like GoogleEarth or Skype, both only available on 32-bits.

Most other (open) software simply will compile and run fine on 64-bits Slackware.

Disclaimer: I am not a multi-lib user but a "pure" 64-bit user. But I had all these doubts some time ago when I switched to Slackware64.
 
Old 01-16-2010, 07:02 AM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Quote:
Originally Posted by vdemuth View Post
...if I download a program source, shouldn't the resultant binary following compiling and building be a result of the platform it is built on, or does the source code include references to whether it is a 32 or 64 bit program.
You are correct, but the source does have to been written as 64bit clean. My limited understanding of what this means is 'that you defined all your variables to be the correct type'.

If wine were an emulator then you could probably compile it as a 64bit program and let it run the 32bit windows executables in its emulated environment. But as the Wine guys say "Wine Is Not an Emulator". The wine run-time is linked directly to the 32bit windows executables at run-time and therefore also needs to be 32bit.

My understanding of this stuff is basic to say the least, but I think that's the general gist of it.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling 32 bit sample program on 64 bit fedora using -m32 option pankajdev Linux - Newbie 2 10-07-2009 07:42 AM
64 bit to 32 bit convert on sun-solaris10 Bharat Kumar pankaj Solaris / OpenSolaris 1 06-26-2009 11:25 AM
[SOLVED] File size limitations of a 32 bit program running under a 64 bit kernel acerostech Linux - Server 1 04-19-2009 10:01 AM
Assembling a 32 bit sample program in a 64 bit world debiant Programming 0 10-14-2006 02:52 PM
C, read 8 bit octal numbers, convert to 24 bit binary bamalabs Programming 3 01-20-2004 09:59 AM


All times are GMT -5. The time now is 10:50 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration