Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
g5 compile problems... cflag/chost settings??
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
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Tue Apr 27, 2004 5:01 am    Post subject: g5 compile problems... cflag/chost settings?? Reply with quote

Im trying to install gentoo on a 1.8Ghz dual G5 and it started off well, but its not going quite so well at the moment... :-(

I cant build a number of packages... (including the kernel at the moment, but that may just be my options).

One annoying package that wont build is vim. If I ebuild it it fails with

Code:

cd src && make first
make[1]: Entering directory `/var/tmp/portage/vim-6.2-r7/work/vim62/src'
gcc -c -I. -Iproto -DHAVE_CONFIG_H     -mcpu=powerpc -mabi=altivec -maltivec -pi
pe   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/5.8.2/powerpc-
linux/CORE  -I/usr/include/python2.3 -pthread    -o objects/buffer.o buffer.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H     -mcpu=powerpc -mabi=altivec -maltivec -pi
pe   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/5.8.2/powerpc-
linux/CORE  -I/usr/include/python2.3 -pthread    -o objects/charset.o charset.c
In file included from buffer.c:29:
vim.h:40: parse error before ':' token
gcc -c -I. -Iproto -DHAVE_CONFIG_H     -mcpu=powerpc -mabi=altivec -maltivec -pi
pe   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/5.8.2/powerpc-
linux/CORE  -I/usr/include/python2.3 -pthread    -o objects/diff.o diff.c
In file included from /usr/include/_G_config.h:44,
                 from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from os_unix.h:21,
                 from vim.h:191,
                 from buffer.c:29:
/usr/include/gconv.h:72: parse error before "size_t"
/usr/include/gconv.h:88: parse error before "size_t"
/usr/include/gconv.h:97: parse error before "size_t"
/usr/include/gconv.h:174: parse error before "size_t"
/usr/include/gconv.h:177: parse error before '}' token


and on and on and on for 100's of lines..

but if I extract and build the raw vim tarball, it builds fine.
So, I guess it could be:

* the patches (but wont other G5 people have the same problem then?)
* something in my system setup (cflags or something?) that build glibc wrongly?
* Im doing something stoopid :)

Or all of these :)

So, I guess my question is:

what should my make.conf have for a g5?

Currently I have:
#CFLAGS="-O3 -mcpu=powerpc -mabi=altivec -maltivec -pipe"
CFLAGS="-mcpu=powerpc -mabi=altivec -maltivec -pipe"
CHOST="powerpc-unknown-linux-gnu"
USE="altivec"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"

(I did the inital stage1+ builds with -O3, was that wrong?)

Also added onto that is, given apple's hardware control and lack of variation, couldnt we put suggested/tested flags for each model in the FAQ somewhere, so morons like myself can just go and look up what I should have rather than trusting what I find on google?

--------------------

Ok, it must be my system/compiler/me.

Im trying to build a kernel on the same machine. I grabbed the config from /proc on the livecd and then I installed

ppc-development-sources-2.6.5_rc2-r1

and used a .config that varies from the livecd 2.6.5 kernel /proc/config by only the following:

< CONFIG_CMDLINE="console=ttyS0,9600 console=tty0"
> CONFIG_CMDLINE=""
< CONFIG_CRYPTO_HMAC=y
< CONFIG_CRYPTO_UCL=y
< CONFIG_IOSCHED_CFQ=y
> CONFIG_IPV6_SCTP__=m
< CONFIG_NR_CPUS=4
> CONFIG_NR_CPUS=2
< CONFIG_SPEAKUP_DEFAULT="none"

Yet the livecd kernel boots fine, but my built kernel hangs just after /proc ?

Any Ideas on how I verify my glibc and gcc are fine?

----------------------------------------

OK, I just rebuilt my gcc and glibc and now vim builds... *sigh* seems like it was the -On flag ? (maybe?)

My kernel still hangs though... :(

Can I ask what package people have built working g5 kernel's from?


Last edited by korg on Fri Apr 30, 2004 10:23 am; edited 2 times in total
Back to top
View user's profile Send private message
captthud
n00b
n00b


Joined: 20 Nov 2003
Posts: 31

PostPosted: Wed Apr 28, 2004 5:51 am    Post subject: Kernel 2.6 Reply with quote

I don't know how much this would affect you, but I'll give my short story.

I've got a G3/333 (can you feel my jealously?!!!) with Linux on it. I'm having trouble with my mouse wheel and I'd like ALSA to work, so hey- why not try a 2.6 kernel? It works on my x86 machines...

In short, after installing it many compile jobs would fail. Updating GCC didn't solve anything. For a while I was booting into 2.4.24 to compile, and then reloading 2.6 when I was done. Gaim and XMMS kept crashing out for no apparent reason, so I stopped using it.

I think I was running 2.6.4 at the time. Kernel 2.6.6 doesn't have these problems as much (I can compile all I want, but some programs still disappear in X...)
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Wed Apr 28, 2004 6:45 am    Post subject: Reply with quote

OK, putting the kernel problem on hold for a little while... does anyone with a g5 have this problem:

install tarball
http://dev.gentoo.org/~pvdabeel/experimental/stage3-g5-20040420.tar.bz2

extract into a directory...

chroot into direcectory

emerge vim (app-editors/vim-6.2-r7)

fails to build.

There... testable and everything!!! :) Someone else _MUST_ have hit this, yeah??
Back to top
View user's profile Send private message
genfoo
Apprentice
Apprentice


Joined: 17 Apr 2003
Posts: 192

PostPosted: Wed Apr 28, 2004 2:44 pm    Post subject: Reply with quote

it's a 'known' problem. run ldconfig by hand (as root) then try it again. Try searching bugs.gentoo.org ... there are quite a few bugs about that problem in particular.
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Thu Apr 29, 2004 12:55 am    Post subject: Reply with quote

Thanks for the suggestion!

But...

kali / R2 # history
1 source /etc/profile
2 etc-update
3 ldconfig -v
4 emerge vim

still fails. :-(

See? Im cursed :)

Im reasonably new to gentoo (duh :) but Im not a total loser ;-) dispite what this post sounds like :).

If someone had a list of 'how to get from a live cd/stage1' to a working g5-smp kernel, then Id be a happy chappy :-). Im trying to make one myself, and I definatly intend to post a 'my g5 howto' when Im done. (Cause noone else has that I can find).

Infact, having read the install document, i think the bit that is _crying out_ to be included is a table of cflags for each processor type. I mean there cant be _that_ many can there? Would a 40 line table of /proc/cpu id vrs _stable_ cflags really be a bad thing?

The ppc install doc is wonderfully helpful on cflags for the amd chip :) but I think that isnt much help to us ppc users :-) :-) :-).


edit:

posted to the install forum to suggest adding a table of cflags to the install doc. :)
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Fri Apr 30, 2004 9:33 am    Post subject: More on G5 build problems [all stages] Reply with quote

Ok, I noticed that the bootstrap.sh script downgrades a number of packages..... specifically:

[ebuild UD] sys-devel/gcc-3.2.3-r4 [3.3.3_pre20040408-r1]
[ebuild UD] sys-libs/glibc-2.3.2-r9 [2.3.3_pre20040207]

So Ive tried rebuilding the stages by hand and forcing these versions or later of the packages, but the trouble is that Im consistantly getting:

Code:

gcc ../sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S -c  -I../include -
I. -I/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/buildhere/stdlib
-I.. -I../libio  -I/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/bui
ldhere -I../sysdeps/powerpc/powerpc32/elf -I../sysdeps/powerpc/elf -I../linuxthr
eads/sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../linuxthreads/sysdeps/unix/sy
sv/linux/powerpc -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sys
deps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linux
threads/sysdeps/unix -I../linuxthreads/sysdeps/powerpc/powerpc32 -I../linuxthrea
ds/sysdeps/powerpc -I../sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../sysdeps/u
nix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdep
s/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sy
sv -I../sysdeps/unix/powerpc -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/p
owerpc/powerpc32/fpu -I../sysdeps/powerpc/powerpc32 -I../sysdeps/wordsize-32 -I.
./sysdeps/powerpc/soft-fp -I../sysdeps/powerpc/fpu -I../sysdeps/powerpc -I../sys
deps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdep
s/generic/elf -I../sysdeps/generic -nostdinc -isystem /usr/lib/gcc-lib/powerpc-u
nknown-linux-gnu/3.3.3/include -isystem /usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h       -DASSEMBLER   -Wa,--noexecstack  -o /var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/buildhere/stdlib/setcontext.o -MD -MP -MF /var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/buildhere/stdlib/setcontext.o.dt
../sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Assembler messages:
../sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S:82: Error: undefined symbol `PT_MQ' in operation
make[2]: *** [/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/buildhere/stdlib/getcontext.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/stdlib'
make[1]: *** [stdlib/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2'
make: *** [all] Error 2
               
!!! ERROR: sys-libs/glibc-2.3.3_pre20040420 failed.
!!! Function src_compile, Line 535, Exitcode 2
!!! (no error message)



Google seems to say that it should be in include/asm-ppc/ptrace.h, but I dont see it in my version of that file, so I have no idea where glibc is getting it from. Maybe the glibc needs to be 'patched' for g5 or something.

Google offered: http://www.iglu.org.il/lxr/ident?i=PT_MQ

I can get her reliably from stage1, 2 and 3.
Im trying to get it going by patching, hacking around it, but *shrugs*.

I must have the wrong cflags & chost because it looks to me like glibc is using the ppc32 versions and the headers are for ppc64.
*sigh* more compiling.. .unless someone can point me at the right settings...


Anyway.. if anyone has any ideas.. please post em. :)
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Fri Apr 30, 2004 10:19 am    Post subject: Reply with quote

Hahahahaha......

So I change the flags to -mcpu=G5 and chosts to powepc64 and now I get...

../sysdeps/powerpc/powerpc64/elf/start.S: Assembler messages:
../sysdeps/powerpc/powerpc64/elf/start.S:47: Error: Unrecognized opcode: `rldicr'
../sysdeps/powerpc/powerpc64/elf/start.S:49: Error: Unrecognized opcode: `stdu'
../sysdeps/powerpc/powerpc64/elf/start.S:51: Error: Unrecognized opcode: `std'
../sysdeps/powerpc/powerpc64/elf/start.S:55: Error: Unrecognized opcode: `ld'
make[2]: *** [/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/buildhere/csu/start.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2'
make: *** [all] Error 2

!!! ERROR: sys-libs/glibc-2.3.3_pre20040420 failed.
!!! Function src_compile, Line 535, Exitcode 2
!!! (no error message)

Hahhahahaha. See! Im cursed!!
Back to top
View user's profile Send private message
pvdabeel
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 188
Location: Belgium

PostPosted: Sun May 02, 2004 12:44 am    Post subject: Reply with quote

korg wrote:
Hahahahaha......

So I change the flags to -mcpu=G5 and chosts to powepc64 and now I get...

../sysdeps/powerpc/powerpc64/elf/start.S: Assembler messages:
../sysdeps/powerpc/powerpc64/elf/start.S:47: Error: Unrecognized opcode: `rldicr'
../sysdeps/powerpc/powerpc64/elf/start.S:49: Error: Unrecognized opcode: `stdu'
../sysdeps/powerpc/powerpc64/elf/start.S:51: Error: Unrecognized opcode: `std'
../sysdeps/powerpc/powerpc64/elf/start.S:55: Error: Unrecognized opcode: `ld'
make[2]: *** [/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/buildhere/csu/start.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.3_pre20040420/work/glibc-2.3.2'
make: *** [all] Error 2

!!! ERROR: sys-libs/glibc-2.3.3_pre20040420 failed.
!!! Function src_compile, Line 535, Exitcode 2
!!! (no error message)

Hahhahahaha. See! Im cursed!!


don't use the ppc64 keyword for 32bit installs. See sticky post about G5 && ppc32 || ppc64
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