[clue-tech] gentoo, AMD64, gnumeric and excel

Ken MacFerrin lists at macferrin.com
Thu Aug 10 18:01:16 MDT 2006


> 
> Here is my /etc/make.conf
> # These settings were set by the catalyst build script that
> automatically built this stage
> # Please consult /etc/make.conf.example for a more detailed example
> #CFLAGS="-O2 -march=i686 -pipe"
> CFLAGS="-march=athlon64 -O2 -pipe"
> CHOST="i686-pc-linux-gnu"
> CXXFLAGS="${CFLAGS}"
> MAKEOPTS=""
> ACCEPT_KEYWORDS=""
> USE=" X alsa apache2 apm arts audiofile avi berkdb bitmap-fonts bzip2
> cdr cli crypt ctype cups dba eds elibc_glibc emboss encode esd
> ethereal exif expat fam fastbuild foomaticdb force-cgi-redirect
> fortran ftp gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml
> guile idn imlib ipv6 jpeg kde kernel_linux lcms libg++ libwww mad
> memlimit mikmod mng motif mozilla mp3 mpeg ncurses nls nptl ogg opengl
> oss pam pcre pdflib perl png posix python qt quicktime readline samba
> sdl session simplexml slang soap sockets spell spl ssl tcltk tcpd tiff
> tokenizer truetype truetype-fonts type1-fonts udev userland_GNU vorbis
> x86 xml xml2 xmms xsl xv zlib"
> FEATURES=""

Did you use an x86 install disk and do a Stage 3 for this?  Based on
this line:

CHOST="i686-pc-linux-gnu"

your system is actually compiled as 32 bit right now and not taking full
advantage of your 64 bit hardware.  The line:

CFLAGS="-march=athlon64 -O2 -pipe"

does tell GCC to product 64 bit code _but_ because of the "i686" in your
CHOST setting you are running a pure x86 environment and your GCC
doesn't have the actual capability to do 64 bit compiles (it's missing
the -m64 option).

To compile a native 64 bit system it should have been this:

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CXXFLAGS="${CFLAGS}"

but do **NOT** go changing your CHOST now without considering the following:

1. You can leave your system as 32 bit and it will not hurt a thing.
You won't be taking full advantage of your hardware but it will actually
save you a little trouble later on in setting up things like flash and
some of the mplayer codecs.  If you decide to stay 32 bit I'd add
"-fomit-frame-pointer" in your CFLAGS for further optimization.
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"

2. If you do decide to move the whole system over to 64 bit it will be a
little painful and require recompiling your *entire system*.  Assuming
you did a Stage 3 install, all of the precompiled packages on your
system were compiled with the CHOST flag of the intended architecture of
the install disk (this is why I asked if you used an x86 install disk).
 In most distros (RedHat, Debian, SuSe, etc) it would not be possible to
switch w/o a complete reinstall.  In Gentoo it's not easy, but possible.

To actually make the switch:
A) change the CHOST & CFLAGS as I listed above.

B) check your system profile by running:
# ls -FGg /etc/make.profile

..and if it points to an x86 profile like this:
/etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2006.0/

then do (all on one line):
# ln -snf /usr/portage/profiles/default-linux/amd64/2006.0 /etc/make.profile

C) take the "x86" out of your current USE flags and replace it with "amd64"

C) logout of any X session and drop into console mode (Ctrl + Alt + F1)
then log in as root:

D) recompile your base system twice (it will take a while each time)
# emerge -e system
# emerge -e system

E) recompile everything else:
# emerge -e world
and if you still have any errors, run this again.

F) update any needed configs:
# etc-update

G) and just to be safe:
# emerge gentoolkit
# revdep-rebuild

H) reboot

In the end, unless you've already done quite a bit of customizing it
might be easier to just reinstall if you want 64 bit.  Just use the
install-amd64-minimal-2006.0.iso install cd and follow the Gentoo AMD64
Handbook:
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml

-Ken




More information about the clue-tech mailing list