Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pentium2 + distcc + x86_64 + crossdev not working [solved]
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
superk
n00b
n00b


Joined: 06 Jun 2003
Posts: 36

PostPosted: Sun Nov 20, 2005 10:25 pm    Post subject: pentium2 + distcc + x86_64 + crossdev not working [solved] Reply with quote

ok, heres the deal.

I want to use my amd64 to compile, through distcc, my gentoo system for my p2 based celeron.

the error: error: CPU you selected does not support x86-64 instruction set

on the amd64:

# emerge info
Quote:
Gentoo Base System version 1.6.13
Portage 2.0.51.22-r3 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.13-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.13-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3200+
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python: 2.3.5, 2.4.2
sys-apps/sandbox: 1.2.12
sys-devel/autoconf: 2.13, 2.59-r6
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils: 2.15.92.0.2-r10
sys-devel/libtool: 1.5.20
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa apm audiofile avi berkdb bitmap-fonts browserplugin bzip2 cdr crypt cups dga directfb dvb dvd dvdr dvdread eds emboss encode exif expat fam ffmpeg foomaticdb fortran gif gphoto2 gpm gstreamer gtk gtk2 idn imlib ipv6 jack java jpeg lcms live lm_sensors lzw lzw-tiff mng mozilla mp3 mpeg nas ncurses network nls nsplugin nvidia opengl oss pam pcre pdflib perl png python qt quicktime readline samba sdl spell ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev usb userlocales xml2 xmms xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS


# emerge distcc
# emerge crossdev
# crossdev -t i686-pc-linux-gnu
then followed some tricks for the gcc path here

# gcc-config -l
Quote:

[1] i686-pc-linux-gnu-3.4.4 *
[2] i686-pc-linux-gnu-3.4.4-hardened
[3] i686-pc-linux-gnu-3.4.4-hardenednopie
[4] i686-pc-linux-gnu-3.4.4-hardenednopiessp
[5] i686-pc-linux-gnu-3.4.4-hardenednossp
[6] x86_64-pc-linux-gnu-3.4.4 *
[7] x86_64-pc-linux-gnu-3.4.4-hardened
[8] x86_64-pc-linux-gnu-3.4.4-hardenednopie
[9] x86_64-pc-linux-gnu-3.4.4-hardenednopiessp
[10] x86_64-pc-linux-gnu-3.4.4-hardenednossp

/etc/conf.d/distccd-cross
Code:

# Copyright 1999-2004 Gentoo Foundation
# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.18/conf,v 1.2 2004/10/21 16:20:10 vapier Exp $
# distccd configuration file

DISTCCD_OPTS=""

# this is the distccd executable
DISTCCD_EXEC="/usr/bin/distccd"

# this is where distccd will store its pid file
DISTCCD_PIDFILE="/var/run/distccd/distccd-cross.pid"

# set this option to run distccd with extra parameters
# Default port is 3632.  For most people the default is okay.
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"

# Logging
# You can change some logging options here:
# --log-file FILE
# --log-level LEVEL  [critical,error,warning, notice, info, debug]
#
# Leaving --log-file blank will log to syslog
# example: --log-file /dev/null --log-level warning
# example: --log-level critical

DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"

# SECURITY NOTICE:
# It is HIGHLY recomended that you use the --listen option
# for increased security. You can specify an IP to permit connections
# from or a CIDR mask
# --listen accepts only a single IP
# --allow is now mandatory as of distcc-2.18.
# example:  --allow 192.168.0.0/24
# example:  --allow 192.168.0.5 --allow 192.168.0.150
# example:  --listen 192.168.0.2
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.0.145"
#DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.0.2"

# set this for niceness
# Default is 15
DISTCCD_NICE="15"
DISTCCD_LOG="/var/log/distccd-cross"
DISTCCD_GCC_VERSION="1"


/etc/init.d/distccd-cross
Code:

#!/sbin/runscript
# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.18/init,v 1.1 2004/10/12 17:21:43 lisa Exp $

depend() {
   need net
   use ypbind
}

start() {
   [ -e "${DISTCCD_PIDFILE}" ] && rm -f ${DISTCCD_PIDFILE} &>/dev/null
   
   ebegin "Starting distccd-cross"
   chown distcc `dirname ${DISTCCD_PIDFILE}` &>/dev/null
   TMPDIR="${TMPDIR}" \
   PATH="$(gcc-config ${DISTCCD_GCC_VERSION} --get-bin-path):${PATH}" \
   /sbin/start-stop-daemon --start --quiet --startas ${DISTCCD_EXEC} \
   --pidfile ${DISTCCD_PIDFILE} -- \
   --pid-file ${DISTCCD_PIDFILE} -N ${DISTCCD_NICE} --user distcc \
   ${DISTCCD_OPTS}

   eend $?
}

stop() {
   ebegin "Stopping distccd-cross"
   start-stop-daemon --stop --quiet --pidfile "${DISTCCD_PIDFILE}"
   rm -f "${DISTCCD_PIDFILE}"
   eend $?
}



then, the celeron

# emerge info
Quote:

Gentoo Base System version 1.6.12
Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 Celeron (Mendocino)
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python: 2.3.5
sys-apps/sandbox: 1.2.11
sys-devel/autoconf: 2.13, 2.59-r6
sys-devel/automake: [Not Present]
sys-devel/binutils: 2.15.92.0.2-r10
sys-devel/libtool: [Not Present]
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.mirrors.pair.com/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 alsa apm arts avi berkdb bitmap-fonts bzip2 crypt cups distcc eds emboss encode foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 imlib ipv6 jpeg libg++ libwww mad mikmod motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl spell ssl tcpd truetype truetype-fonts type1-fonts udev vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY


/usr/src/linux
make CC=distcc

and any
emerge foo

or
CC=i686-pc-linux-gnu-gcc emerge foo

has failed with CPU does not support x86-64 intruction set

any thoughts? I know something isnt configured right.... but I am at a loss as to where. please help :/


Last edited by superk on Mon Nov 21, 2005 1:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
jhunholz
Apprentice
Apprentice


Joined: 29 Apr 2004
Posts: 154
Location: Raleigh, NC

PostPosted: Mon Nov 21, 2005 12:23 am    Post subject: Reply with quote

You can't use a 64 bit system to cross-compile with a 32 bit system. If you want to do this, you would need to create a chroot environment that has a 32 bit system in it.
_________________
Member of the Gentoo Right Wing Conspiracy
Back to top
View user's profile Send private message
superk
n00b
n00b


Joined: 06 Jun 2003
Posts: 36

PostPosted: Mon Nov 21, 2005 12:48 am    Post subject: Reply with quote

ok, I thought that when it compiled the gcc stuff in another directory that it compiled them as 32 bit.... I'll get to work on that.
Back to top
View user's profile Send private message
superk
n00b
n00b


Joined: 06 Jun 2003
Posts: 36

PostPosted: Mon Nov 21, 2005 1:21 pm    Post subject: Reply with quote

Got it. using a i686 stage3 tarball

in the following steps i did not upgrade the stage3 install, if it matters or not.

# mkdir /mnt/gentoo32
# cd /mnt/gentoo32
# wget <stage3-tarball>
# tar -xvjpf <stage3-tarball>
# wget <portage-latest.tar.bz2>
# -xvjf portage-latest.tar.bz2 -C /mnt/gentoo32/usr
# cp /etc/resolv.conf /mnt/gentoo32/etc/resolv.conf
# mount -o bind /proc /mnt/gentoo32/proc
# linux32 chroot /mnt/gentoo32 /bin/bash
# env-update
# source /etc/profile
# USE="-X -gtk -gnome" emerge distcc
then configured distcc.
# /etc/init.d/distccd start
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17855

PostPosted: Mon Nov 21, 2005 7:35 pm    Post subject: Reply with quote

Moved from Installing Gentoo
_________________

Believing I had supernatural powers I slammed into a brick wall.
I said hey, is this my problem? Is this my fault?
Back to top
View user's profile Send private message
moriartynz
n00b
n00b


Joined: 11 Nov 2005
Posts: 2

PostPosted: Wed Nov 30, 2005 3:53 am    Post subject: Another solution Reply with quote

Using crossdev, you can create the necessary environment without a chroot jail. You can also then set up distccd to run on a different port and use the crossdev environment you created. Ensure that crossdev compiles exactly the right environment for the machine you want to compile for. This solution also permits multiple distccd daemons on a single host that can compile for a variety of environments.

See e:
http://www.beejaysworld.de/archives/43-Crosscompiling-via-distcc.html

for details.
Back to top
View user's profile Send private message
augury
l33t
l33t


Joined: 22 May 2004
Posts: 722
Location: philadelphia

PostPosted: Wed Nov 30, 2005 2:51 pm    Post subject: Reply with quote

or you could copy the p2 system onto the 64 and chroot. everything would be the same then.
Back to top
View user's profile Send private message
superk
n00b
n00b


Joined: 06 Jun 2003
Posts: 36

PostPosted: Fri Dec 02, 2005 6:47 pm    Post subject: Reply with quote

augury wrote:
or you could copy the p2 system onto the 64 and chroot. everything would be the same then.


not good, what about updating? I would have to copy it over again. I suppose NFS would work for that, but still more work than just pugging the box into the switch and running ssh off of this one :)

moriartynz wrote:
Using crossdev, you can create the necessary environment without a chroot jail. You can also then set up distccd to run on a different port and use the crossdev environment you created. Ensure that crossdev compiles exactly the right environment for the machine you want to compile for. This solution also permits multiple distccd daemons on a single host that can compile for a variety of environments.

See e:
http://www.beejaysworld.de/archives/43-Crosscompiling-via-distcc.html

for details.


where were you a week ago ;) I was only missing a little part of that guide in my setup. and now I know why crossdev had failed.
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