Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
x86 and AMD64 apps question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
SAngeli
l33t
l33t


Joined: 16 Apr 2004
Posts: 904
Location: Italy

PostPosted: Wed Apr 27, 2005 9:40 pm    Post subject: x86 and AMD64 apps question Reply with quote

Hi,

I have been so far running gentoo on x86. Now, I am about to install gentoo on a AMD64 with native 64-bit OS.
I have some questions about the applications I wish to install.

Usually, when I wish to install an application, I first verify that it is or is not in portage tree and which is its latest stable version. If not found, I hunt the source files and compile it myself.

Questions:
1) If the application is not in portage and the developer posts its executible files (without specifying if it is for x86 or AMD64) so that I can compile and install them, do I have to look for 64-bit code or can I just download the code available and istall it either on the x86 or on the AMD64 reguardless of the OS specs? What is my rule of thumb?

2) Obviously, if I have gentoo AMD64 installed, portage (emerge) will seek and return only for 64-bit applications. Correct? If yes, what if I find an application that is not available for AMD64 but available for x86? What should/could I do?

3) Any other suggestion that would help me better understand how to apporach AMD64 - applications would be appreciated.

Thank you for clearing up my mind,
Spiro
Back to top
View user's profile Send private message
fourhead
l33t
l33t


Joined: 03 Sep 2003
Posts: 875
Location: Cologne, Germany

PostPosted: Wed Apr 27, 2005 11:02 pm    Post subject: Reply with quote

That's very simple:

An x86 machine can only compile/execute x86 (32bit) software.

An AMD64 machine can both compile/execute x86 and AMD64 software.

When you have a 64bit Gentoo installed the only difference is that whenever you install a program via Portage it will basically download the same sources as it would on an x86 machine, but the software will be compiled in 64bit-mode. If a package won't compile in 64bit-mode yet (as OOo for example) then Portage will either compile it 32bit or you can install a binary package (64/32bit, whatever is available).

To sum it all up: If you have installed Gentoo correctly on an AMD64 with all CFLAGS & USE flags set correctly, you don't have to care about this 32bit/64bit stuff at all, just install your packages as you're used to with Portage.

Tom
Back to top
View user's profile Send private message
SAngeli
l33t
l33t


Joined: 16 Apr 2004
Posts: 904
Location: Italy

PostPosted: Wed Apr 27, 2005 11:49 pm    Post subject: Reply with quote

Hi Tom,

thank you for your explanations.

Quote:
If you have installed Gentoo correctly on an AMD64 with all CFLAGS & USE flags set correctly

Would it be possible if you share the correct or what you have for CFLAGS and USE flags, please? This will allow me to have a good reference to compare with. Also, which USE flag refers to allow gentoo to compile on 64 bit OS in 32 bit mode (multilib perhaps)?
Is this appropriate for implementing a 64 bit OS where I can also compile 32 bit apps?

Please correct me if I am wrong:
(A) Portage has an application marked AMD64 and x86. Portage will compile it in 64 bit mode and not in x86.
(B) Portage has an application marked x86 only. Portage will compile it in 32 bit mode.
There is no way out of this rule, correct?
(C) Let's now say I wish to install an application outside portage, like pwmanager for this example. At this URL you can download the Platform-Independent Source .bz2 file. Once downloaded, I would just proceed with the normal steps (./configure and make). Proceeding this way, how would the OS compile this application? 64 or 32 bit? If I do not have specs on the 32/64 bits of an available application how to proceed?
(D)If I am happy with what portage offers, could I just install a 64 bit OS without 32 bit implementation or still it would be adviced to implement, during the install process of gentoo, the possibility to compile 32 bit apps too?

Thank you for your clarifications,
Spiro
Back to top
View user's profile Send private message
fourhead
l33t
l33t


Joined: 03 Sep 2003
Posts: 875
Location: Cologne, Germany

PostPosted: Thu Apr 28, 2005 12:01 am    Post subject: Reply with quote

Hi, okay I'll try to answer your questions first:

A) Absolutely correct

B) Portage would not install such a package, but there's a way to still install it, please don't ask me how I've seen it somewhere on the forum but don't know where. You need USE="multilib" for this.

C) Afaik, if you manually compile something, it would be 64bit, but again I'm not entirely sure.

D) You can of course install Gentoo 64bit-only without any 32bit stuff, but it's not a bad idea to have 32bit libs installed. Some packages still don't work 64bit, for ex. OpenOffice or commercial stuff like VMware, Skype etc. Portage should automatically emerge the emul-libs in the case you install an application that is 32bit only.

Finally, here's my relevant settings from /etc/make.conf:

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe" (also CXXFLAGS)
USE="-* alsa arts avi cdr crypt cups divx4linux dv dvd dvdr emul-linux exif gif \
gphoto2 java jpeg kde kdeenablefinal mad mp3 mpeg multilib nptl ogg \
oggvorbis opengl pic png ppds qt qt-mt quicktime samba ssl tiff truetype \
unicode usb X xine xv xvid"

USE of course also depends on your needs. I'm running on ~AMD64, depending on your version of gcc you may need another -march or -mcpu setting, but this is described in make.conf.

I hope this helps you ...

Tom
Back to top
View user's profile Send private message
eean
Guru
Guru


Joined: 10 Jun 2002
Posts: 355
Location: Kirksville, MO USA

PostPosted: Sat Apr 30, 2005 6:54 am    Post subject: Reply with quote

I don't understand, I thought you had to have a chrooted Gentoo to install 32-bit apps?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum