Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]cross compiling environment for the ps3 problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
dom_
n00b
n00b


Joined: 30 Apr 2004
Posts: 50

PostPosted: Wed Mar 12, 2008 7:20 pm    Post subject: [SOLVED]cross compiling environment for the ps3 problem Reply with quote

Hi all,

I'm running gentoo on the ps3 without problem. I want to set up a crossdev environment for the ps3 on my laptop which is a core2duo (amd64).
I used crossdev successfuly and obtained the toolchain for compiling :
Code:

cross-powerpc64-unknown-linux-gnu/binutils-2.18-r1
cross-powerpc64-unknown-linux-gnu/gcc-4.2.3
cross-powerpc64-unknown-linux-gnu/gcc-4.3.0
cross-powerpc64-unknown-linux-gnu/glibc-2.7-r1
cross-powerpc64-unknown-linux-gnu/linux-headers-2.6.24
cross-spu-elf/binutils-2.18-r1
cross-spu-elf/gcc-4.3.0
cross-spu-elf/gdb-6.7.1-r3
cross-spu-elf/insight-6.7.1
cross-spu-elf/newlib-1.16.0_pre20071025

The problem is that I'm not abble to xmerge libspe2 with 4.3.0, 4.2.3 (ppc64 version). I obtain an error about librt not being compatible :
Code:

powerpc64-unknown-linux-gnu-gcc -O2 -Wall -I. -fPIC -I../include -fexceptions -std=gnu99 -Wformat -Wdisabled-optimization -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -Wnested-externs -Winline -Wformat -m32  -mabi=altivec   -I.. -D_ATFILE_SOURCE -shared -o libspebase.so.2.0.0 create.o elf_loader.o load.o run.o image.o lib_builtin.o default_c99_handler.o default_posix1_handler.o default_libea_handler.o dma.o mbox.o accessors.o info.o -lrt -lpthread -Wl,--soname=libspebase.so.2
/usr/libexec/gcc/powerpc64-unknown-linux-gnu/ld: skipping incompatible /usr/powerpc64-unknown-linux-gnu/usr/lib/../lib/librt.so when searching for -lrt
/usr/libexec/gcc/powerpc64-unknown-linux-gnu/ld: skipping incompatible /usr/powerpc64-unknown-linux-gnu/usr/lib/librt.so when searching for -lrt
/usr/libexec/gcc/powerpc64-unknown-linux-gnu/ld: skipping incompatible /usr/powerpc64-unknown-linux-gnu/usr/lib/librt.so when searching for -lrt
/usr/libexec/gcc/powerpc64-unknown-linux-gnu/ld: cannot find -lrt

The package libspe2 just installs fine with a cross ppc (32bit) compiler, but when coming to build my own apps, ld does not like the 32 and 64 mixing.
I just can't get the multilib flag from glibc to show up when using crossdev.

Anyone having a suggestion ?

Here is my emerge --info :
Code:

Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.2.3, glibc-2.6.1-r0, 2.6.24-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r3 x86_64 Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
Timestamp of tree: Wed, 12 Mar 2008 05:46:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/spool/PBS"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages keeptemp keepwork metadata-transfer sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://213.186.33.38/gentoo-distfiles/ http://213.186.33.37/gentoo-distfiles/ ftp://gentoo.imj.fr/pub/gentoo/ ftp://213.186.33.37/gentoo-distfiles/ http://mirror.bytemark.co.uk/gentoo/ ftp://213.186.33.38/gentoo-distfiles/ ftp://mirror.qubenet.net/mirror/gentoo/ ftp://ftp.heanet.ie/pub/gentoo/ http://ftp.heanet.ie/pub/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LINGUAS="fr en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac aalib acl acpi adns alsa amd64 ao apm arts audiofile avahi bcmath berkdb bidi blas bluetooth bzip2 cairo cddb cdparanoia cdr cli cracklib crypt ctype cups dbus dga dri dts dv dvb dvd dvdr dvdread eds emacs emboss encode esd evo examples exif expat fam fastcgi ffmpeg fftw firefox flac fltk foomatic fortran ftp gcj gd gdbm ggi gif ginac glut gmp gnome gnustep gnutls gphoto2 gpm gps graphviz gsl gstreamer gtk gtk2 gtkhtml hal iconv ieee1394 imagemagick imap imlib ipod ipv6 isdnlog jack java javascript jbig jikes joystick jpeg jpeg2k kde kerberos lame lapack ldap leim lesstif libcaca libedit lirc lm_sensors logitech-mouse lua lzo mad matroska mbox mhash midi mikmod mime mjpeg mmap mmx mng mono motif mozilla mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap mule multitarget musepack mysql mysqli nas ncurses nis nls nntp nptl nptlonly nsplugin ocaml ogg openal openexr opengl openmp osc oss pam pcmcia pcntl pcre pda pdf perl php pic plotutils png portaudio posix ppds pppd python qt3support qt4 qt4quicktime quicktime readline recode reflection ruby samba sasl scanner sdl seamonkey session sharedext skype slang slp smartcard sndfile snmp soap sockets socks5 sox speex spell spl sqlite sqlite3 sse sse2 sse3 ssl startup-notification svg szip tcl tcpd tetex theora threads tiff tk truetype unicode usb v4l v4l2 vcd vhosts videos vorbis wifi wmf wxwindows x264 xine xinetd xml xmlrpc xorg xosd xpm xscreensaver xsl xv xvid yv12 zlib" ALSA_CARDS="usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse wacom evdev joystick synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr en" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


@+
dom


Last edited by dom_ on Fri Mar 14, 2008 2:53 am; edited 1 time in total
Back to top
View user's profile Send private message
dom_
n00b
n00b


Joined: 30 Apr 2004
Posts: 50

PostPosted: Wed Mar 12, 2008 9:52 pm    Post subject: Reply with quote

I found the problem,

there is a -m32 flag added because of the test for X86 :
Code:

X86 = $(shell if ! uname -m | grep ppc ; then echo 1 ; fi)


I just put a comment on that line and emerged libspe2 with :
Code:

/usr/powerpc64-unknown-linux-gnu/sbin/xmerge.sh -av sys-libs/libspe2

The xmerge.sh script comes from this doc and this one on cross compiling.

Here is the very ugly patch :
Code:

more /usr/portage/sys-libs/libspe2/files/patch-cross-amd64
--- libspe2-2.2.80/make.defines 2007-10-05 13:30:00.000000000 +0200
+++ toto/make.defines   2008-03-12 21:09:27.000000000 +0100
@@ -18,7 +18,7 @@
 #*
 
 
-X86 = $(shell if ! uname -m | grep ppc ; then echo 1 ; fi)
+X86 = $(shell if (! uname -m | grep ppc) && (! uname -m | grep x86_64); then echo 1 ; fi)

 CROSS_COMPILE = $(shell if ! grep Broadband /proc/cpuinfo ; then echo 1 ; fi)
 


just edit /usr/portage/sys-libs/libspe2/libspe2-2.2.80_p95-r1.ebuild and add this line after 'unpack ${A}' in the src_unpack ()
function :
Code:

        epatch /usr/portage/sys-libs/libspe2/files/patch-cross-amd64


@+
dom

edit :
just to say that things installed (fine) in /usr/powerpc64-unknown-linux-gnu/usr/powerpc64-unknown-linux-gnu and not in /usr/powerpc64-unknown-linux-gnu/, I just moved all the files in /usr/powerpc64-unknown-linux-gnu/.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC 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