Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sparc64 and egcs problems
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Mon Mar 24, 2003 6:16 pm    Post subject: sparc64 and egcs problems Reply with quote

Hi,

I have some serious problem of Linux on sparc64 on differents machines (E220R, T1).

The kernel just panic some time (ramdom, although I think I have find a way to reproduce the panic) with no output than aiee kernel panic killing interrupt handler.

I don't think it is the hardware (happens on different machines), so I thought it was the ncr8xx driver, and after trying all of the 3 drivers in the kernel, it still panics.

So I am suspecting the old egcs which is used to compile the kernel. Now I have just built the same kernel with gcc-3.2.1 and it is not crashing.

Can someone comfirm this? And is there any ebuild of gcc with 64bit support?

I think the panic can be trigger by large disk I/O + CPU load (generating a lot of interrupts)

Any input is welcome

xming
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Mon Mar 24, 2003 7:57 pm    Post subject: Reply with quote

You managed to get a working 64bit kernel out of gcc 3.2.x? Last I heard that someone tried this, they failed quite miserably. what did you do to successfully build a 64-bit gcc3 capable of building 64bit kernels?

--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Mon Mar 24, 2003 8:33 pm    Post subject: gcc 3.2.x 64bit Reply with quote

hey Kumba

I will make a better docs later, anyway I will have to do this over on other machines as well. This is (approx.) what I did

- get gentoo on sparc64 as usual
- put everything below in /opt/sparc64
- build binutils with 64 bit support
- compile gcc 3 as crosscompiler
- rebuild gcc 3 as native using the gcc above
- build glibc with 64bit support (this is no working right now for me)

here is a real dirty but very quick mindless hack, don't shoot me
- open 2 xterm/kshell/vt/whatever
- in one do the usual make menuconfig;make dep;make clean stuff
- in the 2nd export PATH=/opt/sparc64/bin:$PATH
so the new gcc will be used
make vmlinux, this will fail on 2 points with sth like GLIBC2.2 unresolved symbol,
Appently kernel builds some userlands stuff to get consolehash/pci stufffs
Don't worry, switch to the 1st vc type make vmlinux and hit the ctrl-c real fast after it compile the userland thinggy
make modules, make modules_install

Sorry for the explaination, but I am @home with no sparc and this week I think I will be hunting down the bug, when I finish it I will publish my finding + command log

Well things were better when I left the office, but my sunhme module was not loading (missing symbols), apart from that everything seemed normal

xming
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Tue Mar 25, 2003 10:07 am    Post subject: gcc3 + kernel Reply with quote

ok I have compiled the sunhme in the kernel instead of a module and i works, I am crash testing this kernel now and it seems holding :)

Is there any evidence that the egcs is generating wrong code? Well it is old 19980921, 4 and a half years, I thought there are some problems with 2.4.x and old gcc even on i386.


Any thoughts?

xming
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Wed Mar 26, 2003 11:36 am    Post subject: news Reply with quote

the good news is that the sun is still running after several crash test (with egcs compiled kernel it didn't survie even one test run), the bad news, I still don't know if this is really compiler related, are there any developers of sparc reading this thread who can give ant comments? Please I need to know if egcs is the cause of the crash, the suns are in a production enviroment and I really want them to run Linux instead of solaris,

xming
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Wed Mar 26, 2003 2:49 pm    Post subject: ok the docs Reply with quote

Kumba this is for you
Code:

#gcc 3.2.x on sparc64

#env
export CHOST="sparc-unknown-linux-gnu"
export CFLAGS="-O2"
export CXXFLAGS="-O2"

#ccache
export PATH=/usr/bin/ccache:$PATH
#skip this if you are not using ccache

#binutils
cd /usr/local/src
tar jxvf /usr/portage/distfiles/binutils-2.13.90.0.16.tar.bz2 # get latest stable
cd binutils-2.13.90.0.16/
./configure --prefix=/opt/sparc64 --program-prefix=sparc64-gentoo-linux-gnu- --libdir=/opt/sparc64 --host=sparc64-gentoo-linux-gnu
make -j3
make install

#GCC
cd /usr/local/src
tar jxvf /usr/portage/distfiles/gcc-3.2.1.tar.bz2 #or newer
cd gcc-3.2.1/
./configure --with-gcc-version-trigger=/usr/local/src/gcc-3.2.1/gcc/version.c --host=sparc64-gentoo-linux-gnu --prefix=/opt/sparc64 --enable-languages=c --disable-shared --disable-multilib --enable-threads=single
make -j3
make install

#Setting up kernel env
cd /opt/sparc64/bin
mv gcc gcc64
ln -s gcc64 sparc64-linux-gcc
export PATH=/opt/sparc64/bin:$PATH

#unmerge egcs
emerge unmerge egcs #be carefull, this step is not required but now we know there is no egcs any more

#kernel go go go
cd /usr/src/linux
make menuconfig
#note: some features won't load as modules, so compile them in, your mileage may vary
make dep;make clean;make -j3 vmlinux;make -j3 modules;make modules_install
# usual stuff like cp vmlinux /boot; silo, ...

#dmesg :)
#Linux version 2.4.20 (root@sparky.hq.codenet.be) (gcc version 3.2.1) #21 SMP Tue Mar 25 10:14:42 CET 2003

#Also tested with gcc-3.2.2 :)
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Wed Mar 26, 2003 5:27 pm    Post subject: gcc322 Reply with quote

here is one SMP with gcc322

Linux version 2.4.20 (root@deimos.codenet.be) (gcc version 3.2.2) #9 SMP Wed Mar 26 17:34:22 CET 2003
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Wed Mar 26, 2003 5:57 pm    Post subject: 64 bit userland Reply with quote

while I am on this, here are the beginning of 64-bit userland, I can compile and run a hello world program which is statically linked
Code:

#extra step towards 64-bit userland
cd /usr/local/src
tar jxvf /usr/portage/distfiles/glibc-2.3.1.tar.gz
cd glibc-2.3.1
tar zxvf /usr/portage/distfiles/glibc-linuxthreads-2.3.1.tar.gz
export CC="gcc64 -O2 -m64"
./configure --prefix=/opt/sparc64 --host=sparc64-gentoo-linux-gnu --target=sparc64-gentoo-linux-gnu --enable-add-ons=linuxthreads
make
make install


the c program
Code:

#include <stdio.h>

main() {
printf ("Hello World\n");
return (0);
}


compile/file output

Code:

#gcc64 --static hello.c
# file a.out
a.out: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), for GNU/Linux 2.0.0, statically linked, not stripped
# ./a.out
Hello World


next step (when I have got more time)
- dyn linked 64 bit userland

xming
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Wed Mar 26, 2003 6:06 pm    Post subject: dyn linked 50% Reply with quote

it seems that it is working

Code:

# gcc64 hello.c
# ./a.out
bash: ./a.out: No such file or directory


but this works

Code:

# /opt/sparc64/lib/ld-linux.so.2 ./a.out
Hello World


so, it seems the original linker does not know a bit about the 64-bit libs, so anyone can help me out to get the /lib /lib64 style system? I think Debian does this no?

xming
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Thu Mar 27, 2003 12:26 am    Post subject: Reply with quote

hmm, I'll have to try those instructions and see how far I get. I'll post my results.

--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Thu Mar 27, 2003 1:46 am    Post subject: Reply with quote

Not getting very far.

Code:
sparc64-linux-gcc -D__KERNEL__ -I/usr/src/y/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -finline-limit=100000   -nostdinc -iwithprefix include -DKBUILD_BASENAME=sched  -fno-omit-frame-pointer -c -o sched.o sched.c
sched.c: In function `schedule':
sched.c:695: can't find a register in class `GENERAL_REGS' while reloading `asm'
make[2]: *** [sched.o] Error 1
make[2]: Leaving directory `/usr/src/y/linux-2.4.20/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/y/linux-2.4.20/kernel'
make: *** [_dir_kernel] Error 2


Any ideas?


--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Thu Mar 27, 2003 10:18 am    Post subject: idea Reply with quote

do you have the binutils to generate the correct 64-bit machine code (ld, as and family)?

try a make mrproper and make vmlinux instead of make -jx vmlinux

xming
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Fri Mar 28, 2003 3:15 am    Post subject: Re: idea Reply with quote

xming wrote:
do you have the binutils to generate the correct 64-bit machine code (ld, as and family)?

try a make mrproper and make vmlinux instead of make -jx vmlinux

xming



AFAIK, I have everything needed.

Code:
sparc-unknown-linux-gnu-c++          sparc64-linux-gcc                    sparc64-unknown-linux-gnu-gcc        sparc64-unknown-linux-gnu-objdump
sparc-unknown-linux-gnu-g++          sparc64-unknown-linux-gnu-addr2line  sparc64-unknown-linux-gnu-gccbug     sparc64-unknown-linux-gnu-ranlib
sparc-unknown-linux-gnu-g77          sparc64-unknown-linux-gnu-ar         sparc64-unknown-linux-gnu-gcov       sparc64-unknown-linux-gnu-readelf
sparc-unknown-linux-gnu-gcc          sparc64-unknown-linux-gnu-as         sparc64-unknown-linux-gnu-ld         sparc64-unknown-linux-gnu-size
sparc32                              sparc64-unknown-linux-gnu-c++filt    sparc64-unknown-linux-gnu-nm         sparc64-unknown-linux-gnu-strings
sparc64                              sparc64-unknown-linux-gnu-cpp        sparc64-unknown-linux-gnu-objcopy    sparc64-unknown-linux-gnu-strip



And I always use make mrproper before every kernel build, and rarely use the -jX options.


--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Sun Mar 30, 2003 7:20 pm    Post subject: gcc3.2 Reply with quote

do you want to try my binaries? Or are you too pananoid :) Or maybe I can have an account on your sun :) :)

Or maybe you can try a 64-bit glibc and then try to compile somthing statically

xming
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Mon Mar 31, 2003 6:55 pm    Post subject: Reply with quote

I could give your kernel a shot. See how it boots. No idea if it'd have the same config I have in mine (Sun Blade 100). As for an account, my sun system sits behind my x86 system, so the only way to access it from the outside is to have an account on both, which I tend not to give out alot... 64-Bit Glibc sounds a whole different can of worms. I've already learned mips64 glibc is a pain in the neck and thensome, sparc64 glibc doesn't sound much different, minus the multiple ABIs.

Ah well, I guess I still stick with old, reliable egcs64 for now.

--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Mon Mar 31, 2003 7:59 pm    Post subject: kernel Reply with quote

if you want you can gimme your .config I will compile one for you. As for libc64 on mips, can you share your experience?

xming
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Mon Mar 31, 2003 8:19 pm    Post subject: Re: kernel Reply with quote

xming wrote:
if you want you can gimme your .config I will compile one for you. As for libc64 on mips, can you share your experience?

xming


Aight, my config can be located here.


With regards to mips64 stuff, it seems mainly to be an issue surrounding the several ABIs (o32, n32, n64). Ulrich, guy who runs glibc, seems hellbent on not allowing multiple ABIs for one arch, my guess is to avoid as much confusion as possible. I'm not too knowledgable on why this is, more information can usually be gleaned from reading the libc mailing list on the matter. Suffice to say, mips64 is probably a ways off.

--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Tue Apr 01, 2003 9:20 am    Post subject: Reply with quote

Quote:
Aight, my config can be located here.


no connection

xming
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Wed Apr 02, 2003 6:42 am    Post subject: Reply with quote

xming wrote:
no connection

xming


Apologies, all my computers were offline due to having new carpet installed. Everything is back up and running now, so you can try again.

--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Thu Apr 03, 2003 9:45 am    Post subject: .config Reply with quote

ok I have it now, compiling, where can I up load them?

xming
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Fri Apr 04, 2003 8:59 am    Post subject: gcc-3.2.2 Reply with quote

Anybody interessted in this? I can make a tarball of my /opt/spac64 dir,

xming
Back to top
View user's profile Send private message
Blademan
Developer
Developer


Joined: 05 Oct 2002
Posts: 116

PostPosted: Sun Apr 06, 2003 12:05 am    Post subject: Reply with quote

xming,

Come to #gentoo-sparc on IRC. Many will be interested there.
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Mon Apr 07, 2003 9:27 am    Post subject: Reply with quote

kumba: if you want your kernel please let me know where can I mail/ftp/.. it.


Blademan007: IRC, hmm, I am on it now :) cu
Back to top
View user's profile Send private message
biggyL
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jan 2005
Posts: 120
Location: Israel

PostPosted: Sat May 13, 2006 4:58 pm    Post subject: Reply with quote

Hello All,

Seems to me that here are some experts who may actually help me.

I'm trying to install DSS (Darwin Streaming Server) on my "Gentoo on Sparc" SunFire280R (running 2.6 kernel).

On x86 machine it installs OK, but on Sparc I get these error messages I can't resolve :(

Code:

make: egcs: Command not found
make: *** [QTSDPGen] Error 127
Building QTSampleLister for Linux.sparc64 with gcc
gcc -c -o QTSampleLister.o  -D__linux__ -include ../../PlatformHeader.h -g -Wall -O3 -I. -I../../QTFileLib -I../../CommonUtilitiesLib -I../../RTPMetaInfoLib QTSampleLister.cpp
egcs -o QTSampleLister  QTSampleLister.o ../../SafeStdLib/InternalStdLib.o ../../RTPMetaInfoLib/RTPMetaInfoPacket.o -D__linux__ -L../../CommonUtilitiesLib -L../../QTFileLib -lpthread -ldl -lm -lcrypt -lCommonUtilitiesLib  -lQTFileExternalLib ../../CommonUtilitiesLib/libCommonUtilitiesLib.a ../../QTFileLib/libQTFileExternalLib.a
make: egcs: Command not found
make: *** [QTSampleLister] Error 127
Building QTTrackInfo for Linux.sparc64 with gcc
gcc -c -o QTTrackInfo.o  -D__linux__ -include ../../PlatformHeader.h -g -Wall -O3 -I. -I../../QTFileLib -I../../CommonUtilitiesLib -I../../RTPMetaInfoLib QTTrackInfo.cpp
egcs -o QTTrackInfo  QTTrackInfo.o ../../SafeStdLib/InternalStdLib.o ../../RTPMetaInfoLib/RTPMetaInfoPacket.o -D__linux__ -L../../CommonUtilitiesLib -L../../QTFileLib -lpthread -ldl -lm -lcrypt -lCommonUtilitiesLib  -lQTFileExternalLib ../../CommonUtilitiesLib/libCommonUtilitiesLib.a ../../QTFileLib/libQTFileExternalLib.a
make: egcs: Command not found
make: *** [QTTrackInfo] Error 127
>>> Test phase [not enabled]: www-servers/darwin-streaming-server-5.5.1

>>> Install darwin-streaming-server-5.5.1 into /var/tmp/portage/darwin-streaming-server-5.5.1/image/ category www-servers
>>> dosbin: making DarwinStreamingServer executable...
install: cannot stat `DarwinStreamingServer': No such file or directory
>>> dobin: making PlaylistBroadcaster.tproj/PlaylistBroadcaster executable...
install: cannot stat `PlaylistBroadcaster.tproj/PlaylistBroadcaster': No such file or directory
>>> dobin: making MP3Broadcaster/MP3Broadcaster executable...
install: cannot stat `MP3Broadcaster/MP3Broadcaster': No such file or directory
>>> dobin: making qtpasswd.tproj/qtpasswd executable...
install: cannot stat `qtpasswd.tproj/qtpasswd': No such file or directory
>>> dobin: making StreamingProxy.tproj/StreamingProxy executable...
install: cannot stat `StreamingProxy.tproj/StreamingProxy': No such file or directory

!!! ERROR: www-servers/darwin-streaming-server-5.5.1 failed.
!!! Function src_install, Line 59, Exitcode 4
!!! failure!
!!! If you need support, post the topmost build error, NOT this status message.


Could someone help/suggest me?
Back to top
View user's profile Send private message
Weeve
Retired Dev
Retired Dev


Joined: 30 Oct 2002
Posts: 641

PostPosted: Sat May 13, 2006 11:24 pm    Post subject: Reply with quote

I'd start by making a new thread and indicating things like

- portage package name (if applicable)
- output of emerge info
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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