Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't emerge kgcc64 on a PS3 (32ul) - SOLVED
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
e-nando
n00b
n00b


Joined: 02 Jun 2007
Posts: 5
Location: Oldsmar, Florida

PostPosted: Sat Jun 02, 2007 3:38 pm    Post subject: Can't emerge kgcc64 on a PS3 (32ul) - SOLVED Reply with quote

I'm a novice to gentoo, but installed the system fine on a PS3 fine (32 bit UL) using the Stage 4 which was made available early March and have been happily using the system and installing applications since then. Seeing there's now a wireless driver available (per Brent Baude) I've tried to upgrade to the new Kernel made available early May (still a patched 2.6.16). I followed the advice:

"If you are an existing user, just checkout the cell overlay, emerge ps3-sources, grab the kernel.config from the files dir, and rebuild the kernel. Don't forget to emerge wireless-tools"

OK, the Cell Overlay worked (using Layman), emerge ps3-sources worked, found the kernel.config file and then tried to make the new (64 bit) Kernel. Here it all started to go wrong!

The make process fell over will error messages talking about M64... and a search of the Gentoo forums suggested I needed to install the 64bit Kernel compiler kgcc64 since I'm using a 32 bit userland (I originally installed this as I've seen comments that it runs better with the PS3's limited memory).

I can't emerge kgcc64! (4.1.1 or 4.1.2)

I always end up (after c. 20mins) with an error message:

"checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details.
make[1]: *** [configure-target-libmudflap] Error 1
make[1]: Leaving directory
`/var/tmp/portage/sys-devel/kgcc64-4.1.2/work/build'
make: *** [all] Error 2

!!! ERROR: sys-devel/kgcc64-4.1.2 failed.
Call stack:
ebuild.sh, line 1615: Called dyn_compile
ebuild.sh, line 972: Called qa_call 'src_compile'
ebuild.sh, line 44: Called src_compile
ebuild.sh, line 1305: Called toolchain_src_compile
toolchain.eclass, line 26: Called gcc_src_compile
toolchain.eclass, line 1537: Called gcc_do_make
toolchain.eclass, line 1411: Called die

!!! emake failed with all
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at
'/var/tmp/portage/sys-devel/kgcc64-4.1.2/temp/build.log'."

I've again searched the forums and have re-emerged linux-headers (that caused trouble because of the ppc dependency on kgcc64 itself), gcc, glibc, binutils etc. All worked, but I still can't emerge kgcc64!

What should I try next?


Last edited by e-nando on Tue Jul 10, 2007 10:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
rangerpb
Retired Dev
Retired Dev


Joined: 19 Jan 2005
Posts: 147

PostPosted: Sun Jun 03, 2007 2:31 pm    Post subject: kernel for 32ul Reply with quote

Here's the answer:

If you used a Gentoo stage4, you already have the 64bit compiler. You can validate this by:

'which powerpc64-unknown-linux-gnu-gcc' or 'powerpc64-unknown-linux-gnu-gcc --version'

The problem is your kernel sources is not aware of it and is using the native 32bit compiler. The easiest way to change this is by editing /usrc/src/linux/Makefile (or the top-level Makefile in the kernel tree). Change the line that begins with:

CROSS_COMPILE ?=

to

CROSS_COMPILE ?= powerpc64-unknown-linux-gnu-


Then, AND THIS IS IMPORTANT, backup your .config file somewhere and issue a 'make mrproper'. Then copy your config back into the tree and issue a make menuconfig or make oldconfig.
_________________
-->
rangerpb
<--
Back to top
View user's profile Send private message
e-nando
n00b
n00b


Joined: 02 Jun 2007
Posts: 5
Location: Oldsmar, Florida

PostPosted: Sun Jun 03, 2007 4:43 pm    Post subject: Reply with quote

I've checked and the 64bit compiler isn't there (I believe I un-emerged it before trying to emerge kgcc64 following some comments in another forum)!

Is it best to start again from a Stage 4?

Of note, the kgcc64 emerge always falls over with references to libmudflap. My gcc configuration doesn't disable libmudflap, but I've noticed from posts that a lot of configurations have the flag --disable-libmudflap. If this is the problem how do I fix this...

Many thanks for the help...
Back to top
View user's profile Send private message
rangerpb
Retired Dev
Retired Dev


Joined: 19 Jan 2005
Posts: 147

PostPosted: Mon Jun 04, 2007 2:01 pm    Post subject: Reply with quote

Since you have unmerged packages, I cannot speak to what might or might not have happened. kgcc64 should be a system package, one that you should not remove unless you know what you are doing. another tip, when you do radical changes with your system, perform a 'quickpkg <pkgname>' before doing so. It's part of the portage package so it should already be installed. That way, if you need to recover, you can emerge -K <pkgname> later.


I have compiled this package numerous times, I don't know what the relation to libmudflap is. Can you cite a source or error?

If you want to start over, the latest stages have wireless support as well as working kgcc64.
_________________
-->
rangerpb
<--
Back to top
View user's profile Send private message
e-nando
n00b
n00b


Joined: 02 Jun 2007
Posts: 5
Location: Oldsmar, Florida

PostPosted: Mon Jun 04, 2007 4:16 pm    Post subject: Reply with quote

I unmerged 1 package only (emerge -C sys-devel/gcc-powerpc64), but I've now learnt (and am learning a lot about gentoo in the process of trying to fix this)!

Looking more closely at config.log (once I found where it is), it appears that the error comes from a missing file crt1.o:

"configure:2292: checking for C compiler default output file name
configure:2295:
/var/tmp/portage/sys-devel/kgcc64-4.1.2/work/build/./gcc/xgcc
-B/var/tmp/portage/sys-devel/kgcc64-4.1.2
/work/build/./gcc/ -B/usr/powerpc64-unknown-linux-gnu/bin/
-B/usr/powerpc64-unknown-linux-gnu/lib/ -isystem /usr/powerp c64-unknown-linux-gnu/include -isystem
/usr/powerpc64-unknown-linux-gnu/sys-include -O2 -O2 -pipe conftest.c
>&5
/usr/bin/powerpc64-unknown-linux-gnu-ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2298: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libmudflap"
| #define PACKAGE_TARNAME "libmudflap"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "libmudflap 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "libmudflap"
| #define VERSION "1.0"
| /* end confdefs.h. */"


Has the removal of gcc-powerpc64 likely impacted this? crt1.o is present in /usr/lib (and gcc generally works - it just won't compile/link kgcc64). But, there appear to be several posts on issues with crt1.o and making cross compilers. Do I, for example, need 64bit versions of certain library files?
Back to top
View user's profile Send private message
anunakin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2004
Posts: 101

PostPosted: Fri Jun 08, 2007 1:14 pm    Post subject: Reply with quote

I have made a STAGE 4, with kernel 2.6.16 32bit ul and kgcc64 installed, and more ... thinks like Firefox with flash player enabled, mplayer plugin, java 1.5 plugin and more .... just download here:

http://www.linzzi.org/Downloads/stages/Nakoruru-stage4-latest.tar.gz

After install it you need remove LC_ALL and LANG exports from /etc/profile, because my STAGE 4 is for use by Brasilian guys.... but removing that lines this back to english... :lol:
_________________
Anunakin (Marcus Fazzi)
PHP/Java/C++ Developer
Sony PS3 JPN 60GB, with Gentoo Linux + HDD 160GB
Sony PS2 50001, with PS2Linux, HDD 80GB
Back to top
View user's profile Send private message
VValdo
Guru
Guru


Joined: 08 Jan 2005
Posts: 395

PostPosted: Tue Jul 10, 2007 11:47 am    Post subject: Reply with quote

I'm also getting a libmudflap error compiling gcc on my amd64 machine... this is not a new installation by any means:

/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/libmudflap -I. -Wall -ffunction-sections -fdata-sections -O2 -O2 -march=athlon64 -pipe -MT mf-hooks2.lo -MD -MP -MF .deps/mf-hooks2.Tpo -c /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/libmudflap/mf-hooks2.c -fPIC -DPIC -o .libs/mf-hooks2.o
/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/libmudflap -I. -Wall -ffunction-sections -fdata-sections -O2 -O2 -march=athlon64 -pipe -MT mf-hooks2.lo -MD -MP -MF .deps/mf-hooks2.Tpo -c /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/libmudflap/mf-hooks2.c -o mf-hooks2.o >/dev/null 2>&1
make[3]: *** [mf-hooks2.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/libmudflap'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/libmudflap'
make[1]: *** [install-target-libmudflap] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build'
make: *** [install] Error 2

!!! ERROR: sys-devel/gcc-4.1.2 failed.
Call stack:
ebuild.sh, line 1621: Called dyn_install
ebuild.sh, line 1067: Called qa_call 'src_install'
ebuild.sh, line 44: Called src_install
ebuild.sh, line 1311: Called toolchain_src_install
toolchain.eclass, line 35: Called gcc-compiler_src_install
toolchain.eclass, line 1614: Called die

W
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue Jul 10, 2007 12:59 pm    Post subject: Reply with quote

Sorry, but you're probably not going to get much help in the PowerPC forum. :) I'd ask in the AMD64 forum instead. Good luck!
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
e-nando
n00b
n00b


Joined: 02 Jun 2007
Posts: 5
Location: Oldsmar, Florida

PostPosted: Tue Jul 10, 2007 10:50 pm    Post subject: Reply with quote

After I searched more forums, it appears that the mudflap functionality isn't compatible with the kgcc64 cross compiler (I'm thinking because you'd need some cross-compiled libmudflap). I tried compiling with the use flag USE="-mudflap" (to disable mudflap and the call to libmudflap) and it now works.

Using kgcc64 I successfully compiled the new Kernel!

Possibly this is also the problem with the AMD64 compile...
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