Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HELP: upgrade from 32 to 64 bit system
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
Moriah
Veteran
Veteran


Joined: 27 Mar 2004
Posts: 1907
Location: Kentucky

PostPosted: Mon Oct 01, 2012 3:05 pm    Post subject: HELP: upgrade from 32 to 64 bit system Reply with quote

I have a very old server running gentoo on a 1.5 GHz AMD Duron with 1 GB ram. This geezer is 7 years old. :o

I have a new machine to take over that old machine's duties. It is an AMD F2 8 core 3.12 GHz with 16 gb ram. :D

I wanted to try the "easy way" to set up the new machine, so I built and installed gentoo on the new box and got it to boot, etc. Then I copied all the non-kernel files from the old box onto the new box. After a reboot, it came up. :)

Now I wanted to upgrade from the 32 to the 64 bit system, so I went to http://www.gentoo.org/doc/en/change-chost.xml where it tells about "Changing the CHOST variable". After editing /etc/make.conf to set the new value of CHOST, I did the recommended emerge binutils gcc glibc, but if barfed. :evil:

Here is the output:
Code:

eli ~ # emerge binutils gcc glibc
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Starting parallel fetch

>>> Emerging (1 of 3) sys-devel/binutils-2.22-r1
 * binutils-2.22.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                             [ ok ]
 * binutils-2.22-patches-1.5.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                 [ ok ]
>>> Unpacking source...
>>> Unpacking binutils-2.22.tar.bz2 to /var/tmp/portage/sys-devel/binutils-2.22-r1/work
>>> Unpacking binutils-2.22-patches-1.5.tar.bz2 to /var/tmp/portage/sys-devel/binutils-2.22-r1/work
 * Applying various patches (bugfixes/updates) ...
 *   03_all_binutils-2.15.92.0.2-ppc64-pie.patch ...                                                      [ ok ]
 *   08_all_binutils-RPATH_ENVVAR-smack.patch ...                                                         [ ok ]
 *   10_all_binutils-2.22-ppc-textrels.patch ...                                                          [ ok ]
 *   12_all_sh-targets.patch ...                                                                          [ ok ]
 *   20_all_ld-sysroot.patch ...                                                                          [ ok ]
 *   30_all_binutils-2.22-flexible-tests.patch ...                                                        [ ok ]
 *   40_all_binutils-2.22-s390x-PIC.patch ...                                                             [ ok ]
 *   50_all_binutils-2.22-hppa-tls-pr13476.patch ...                                                      [ ok ]
 *   51_all_binutils-2.22-hppa-plt-pr13387.patch ...                                                      [ ok ]
 *   62_all_binutils-2.22-hardened-crtbegin.patch ...                                                     [ ok ]
 *   63_all_binutils-2.22-pt-pax-flags-20111121.patch ...                                                 [ ok ]
 *   66_all_binutils-2.22-warn-textrel.patch ...                                                          [ ok ]
 *   75_all_binutils-default-test-flags.patch ...                                                         [ ok ]
 *   76_all_use-new-ld-dtags.patch ...                                                                    [ ok ]
 *   77_all_generate-gnu-hash.patch ...                                                                   [ ok ]
 *   78_all_use-relro.patch ...                                                                           [ ok ]
 *   91_all_libiberty-pic.patch ...                                                                       [ ok ]
 *   96_all_binutils_2.22-fbsd.patch ...                                                                  [ ok ]
 * Done with patching
 * Fixing misc issues in configure files
 * Using GNU config files from /usr/share/gnuconfig
 *   Updating config.sub                                                                                  [ ok ]
 *   Updating config.guess                                                                                [ ok ]
 * Running elibtoolize in: binutils-2.22/
 *   Applying portage/2.2 patch ...
 *   Applying sed/1.5.6 patch ...
 *   Applying as-needed/2.2.6 patch ...
>>> Source unpacked in /var/tmp/portage/sys-devel/binutils-2.22-r1/work
>>> Compiling source in /var/tmp/portage/sys-devel/binutils-2.22-r1/work/binutils-2.22 ...

 *  CATEGORY: sys-devel
 *    CBUILD: x86_64-pc-linux-gnu
 *     CHOST: x86_64-pc-linux-gnu
 *   CTARGET: x86_64-pc-linux-gnu
 *    CFLAGS: -O2 -march=athlon-xp -pipe
 *   LDFLAGS: -Wl,-O1 -Wl,--as-needed

./configure --enable-gold --enable-plugins --without-included-gettext --with-zlib --build=x86_64-pc-linux-gnu --enable-secureplt --prefix=/usr --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --datadir=/usr/share/binutils-data/x86_64-pc-linux-gnu/2.22 --infodir=/usr/share/binutils-data/x86_64-pc-linux-gnu/2.22/info --mandir=/usr/share/binutils-data/x86_64-pc-linux-gnu/2.22/man --bindir=/usr/x86_64-pc-linux-gnu/binutils-bin/2.22 --libdir=/usr/lib/binutils/x86_64-pc-linux-gnu/2.22 --libexecdir=/usr/lib/binutils/x86_64-pc-linux-gnu/2.22 --includedir=/usr/lib/binutils/x86_64-pc-linux-gnu/2.22/include --enable-64-bit-bfd --enable-obsolete --enable-shared --enable-threads --disable-werror --with-bugurl=http://bugs.gentoo.org/ --disable-static
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name...
configure: error: in `/var/tmp/portage/sys-devel/binutils-2.22-r1/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
 * ERROR: sys-devel/binutils-2.22-r1 failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line   85:  Called src_compile
 *   environment, line 2982:  Called toolchain-binutils_src_compile
 *   environment, line 3668:  Called die
 * The specific snippet of code:
 *       "${S}"/configure "${myconf[@]}" || die;
 *
 * If you need support, post the output of `emerge --info '=sys-devel/binutils-2.22-r1'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/binutils-2.22-r1'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/binutils-2.22-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/binutils-2.22-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/binutils-2.22-r1/work/build'
 * S: '/var/tmp/portage/sys-devel/binutils-2.22-r1/work/binutils-2.22'

>>> Failed to emerge sys-devel/binutils-2.22-r1, Log file:

>>>  '/var/tmp/portage/sys-devel/binutils-2.22-r1/temp/build.log'

 * Messages for package sys-devel/binutils-2.22-r1:

 * ERROR: sys-devel/binutils-2.22-r1 failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line   85:  Called src_compile
 *   environment, line 2982:  Called toolchain-binutils_src_compile
 *   environment, line 3668:  Called die
 * The specific snippet of code:
 *       "${S}"/configure "${myconf[@]}" || die;
 *
 * If you need support, post the output of `emerge --info '=sys-devel/binutils-2.22-r1'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/binutils-2.22-r1'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/binutils-2.22-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/binutils-2.22-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/binutils-2.22-r1/work/build'
 * S: '/var/tmp/portage/sys-devel/binutils-2.22-r1/work/binutils-2.22'
eli ~ #

I realize this is an attempt at a shortcut, but if I can get it to work, it would save me a lot of trouble trying to duplicate the setup on the old machine. Can anybody suggest a way to solve this problem, short of a complete re-install?

BTW Both of these machines have RAID mirrors, so I pulled a drive from the RAID before I started this lunacy -- just in case. 8)
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 709
Location: Arrakis

PostPosted: Mon Oct 01, 2012 3:29 pm    Post subject: Reply with quote

well personally, id just setup a new 64 bit system

you just need to copy your world file and /home and emerge -e world with good 64 bit make.conf settings then copy what you need left from /etc and your done

yes this is basically 100% reemerging everything anyways, but so is changing your chost

and or your makefile your trying to use might be bad, bad flag or something if gcc cant make executables
_________________
A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it.

-The First Law of Mentat
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4291

PostPosted: Mon Oct 01, 2012 4:26 pm    Post subject: Reply with quote

This is a FAQ. To make a long story short: You cannot "upgrade" 32 bit to 64 bit. Even the basic layout differs (e.g. /usr/lib is a symlink on a 64 bit system but a directory on a 32 bit system). In theory it is possible if you install a cross-compiler and do a lot of things manually, but practically it is not possible: The time to copy your configuration files manually is much less than the time to learn the messy details of cross-compiling and multilib on gentoo.
Back to top
View user's profile Send private message
Moriah
Veteran
Veteran


Joined: 27 Mar 2004
Posts: 1907
Location: Kentucky

PostPosted: Mon Oct 01, 2012 11:55 pm    Post subject: Reply with quote

OK, thanks to both of you. I will restore from the pulled raid volume, then try the trick djdunn suggested with copying the world file, then emerging everything after that.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9125

PostPosted: Tue Oct 02, 2012 2:18 am    Post subject: Reply with quote

Moriah: to be clear, you must start with an amd64 stage and run the emerge from there. You should wipe out any system directories on the AMD F2, boot from amd64 capable media, and install a new amd64 system, then copy in your configuration and personal files. You can use your old world file as a reference, but you cannot readily use any of the old x86 system to prepare the new amd64 system.
Back to top
View user's profile Send private message
Moriah
Veteran
Veteran


Joined: 27 Mar 2004
Posts: 1907
Location: Kentucky

PostPosted: Tue Oct 02, 2012 4:47 pm    Post subject: Reply with quote

I'm going to just start completely over. The RAID volume I pulled was stale and corrupt. Oh well, I need the practice... :evil:
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
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