Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

pentium2 + distcc + x86_64 + crossdev not working [solved]

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
superk
n00b
n00b
User avatar
Posts: 36
Joined: Fri Jun 06, 2003 4:12 pm

pentium2 + distcc + x86_64 + crossdev not working [solved]

  • Quote

Post by superk » Sun Nov 20, 2005 10:25 pm

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
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
[1] i686-pc-linux-gnu-3.4.4 [36;01m*[0m
[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 [32;01m*[0m
[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: Select all

# 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: Select all

#!/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
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/dis ... ns/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.
Top
jhunholz
Apprentice
Apprentice
User avatar
Posts: 154
Joined: Thu Apr 29, 2004 6:19 pm
Location: Raleigh, NC
Contact:
Contact jhunholz
Website

  • Quote

Post by jhunholz » Mon Nov 21, 2005 12:23 am

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
Top
superk
n00b
n00b
User avatar
Posts: 36
Joined: Fri Jun 06, 2003 4:12 pm

  • Quote

Post by superk » Mon Nov 21, 2005 12:48 am

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.
Top
superk
n00b
n00b
User avatar
Posts: 36
Joined: Fri Jun 06, 2003 4:12 pm

  • Quote

Post by superk » Mon Nov 21, 2005 1:21 pm

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
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Mon Nov 21, 2005 7:35 pm

Moved from Installing Gentoo
Quis separabit? Quo animo?
Top
moriartynz
n00b
n00b
Posts: 2
Joined: Fri Nov 11, 2005 9:32 pm

Another solution

  • Quote

Post by moriartynz » Wed Nov 30, 2005 3:53 am

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- ... istcc.html

for details.
Top
augury
l33t
l33t
User avatar
Posts: 722
Joined: Sat May 22, 2004 8:25 pm
Location: philadelphia

  • Quote

Post by augury » Wed Nov 30, 2005 2:51 pm

or you could copy the p2 system onto the 64 and chroot. everything would be the same then.
Top
superk
n00b
n00b
User avatar
Posts: 36
Joined: Fri Jun 06, 2003 4:12 pm

  • Quote

Post by superk » Fri Dec 02, 2005 6:47 pm

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- ... istcc.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.
Top
Post Reply

8 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic