|
From: Eric H. <eah...@lo...> - 2004-07-09 21:43:09
|
Hi, I'm new to SheepShaver but I thought I'd give this a shot. Running Linux/PPC with a 2.4.22 kernel, I got it to compile and run with a small problem, namely, the config script apparently didn't detect that my system has dirent.h and sys/dir.h, so I had to add "-DHAVE_DIRENT_H -DHAVE_SYS_DIR_H" to the CXXFLAGS line in the Makefile or else it errors out. When running, it doesn't detect my 750CXe processor and assumes it's a 604, which (after doing a quick search on the web) can be fixed, possibly (keeping in mind that I don't really know what I'm doing here), by adding these lines to the appropriate spot in main_unix.cpp: else if (strcmp(value, "750CX") == 0) PVR = 0x00083214; However, the show-stopper happens after starting the paranoia check, which causes the program to hang. A bit of investigation shows that it never gets past the line "set_r2(0xaffebad5);" in Linux/paranoia.cpp. This happens whether or not I've added those two 750CXe lines to main_unix.cpp. Any ideas? I've done some poking around in the source but I'm afraid I'm rather clueless as to what's supposed to happen there.... --Eric |
|
From: Gwenole B. <gb...@di...> - 2004-07-10 05:26:45
|
Hi, > Running Linux/PPC with a 2.4.22 kernel, I got it to compile and run=20 > with a > small problem, namely, the config script apparently didn't detect that=20= > my > system has dirent.h and sys/dir.h, so I had to add "-DHAVE_DIRENT_H > -DHAVE_SYS_DIR_H" to the CXXFLAGS line in the Makefile or else it=20 > errors out. Do you still have the config.log file? If so, make a check for=20 "dirent.h" and see what error could occur. > else if (strcmp(value, "750CX") =3D=3D 0) > PVR =3D 0x00083214; OK, I will merge with Linux cputable[]. > However, the show-stopper happens after starting the paranoia check,=20= > which > causes the program to hang. A bit of investigation shows that it=20 > never gets > past the line "set_r2(0xaffebad5);" in Linux/paranoia.cpp. This=20 > happens > whether or not I've added those two 750CXe lines to main_unix.cpp. I have an oldish standalone test program but I have to reboot into=20 Linux first. ;-) Besides, what are your configure options [summary] ? Could you tell me more about your system? I am using Mandrakelinux 9.1=20= with a kernel 2.4.21 + glibc 2.3.1. Can you send the output of running=20= /lib/libc.so.6 ? Bye, Gwenol=E9.= |
|
From: Gwenole B. <gb...@di...> - 2004-07-10 06:32:48
|
Hi, >> else if (strcmp(value, "750CX") =3D=3D 0) >> PVR =3D 0x00083214; > > OK, I will merge with Linux cputable[]. Done, committed to CVS. There are even patterns for some newer POWER=20 processors, but I have never approached IBM systems with that. > I have an oldish standalone test program but I have to reboot into=20 > Linux first. ;-) What can you get out of: <http://gwenole.beauchesne.free.fr/sheepshaver/paranoia.cpp> ? Thanks, Gwenol=E9. |
|
From: Eric H. <eah...@lo...> - 2004-07-10 15:18:10
|
On Saturday 10 July 2004 01:28, you wrote: > Do you still have the config.log file? If so, make a check for > "dirent.h" and see what error could occur. Ahem, never mind, seems I did a "configure" when I should have used "autogen.sh", sorry! :) Duh. But the other problem remains.... > I have an oldish standalone test program but I have to reboot into > Linux first. ;-) > Besides, what are your configure options [summary] ? SDL support ...................... : none XFree86 DGA support .............. : yes XFree86 VidMode support .......... : no Using PowerPC emulator ........... : no Enable JIT compiler .............. : no Enable video on SEGV signals ..... : yes ESD sound support ................ : no GTK user interface ............... : yes mon debugger support ............. : no Bad memory access recovery type .. : siginfo > Could you tell me more about your system? I am using Mandrakelinux 9.1 > with a kernel 2.4.21 + glibc 2.3.1. Can you send the output of running > /lib/libc.so.6 ? Debian testing, kernel 2.4.22 + glibc 2.3.2, output is: GNU C Library stable release version 2.3.2, by Roland McGrath et al. Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 3.3.2 (Debian). Compiled on a Linux 2.6.0-test7 system on 2003-11-05. Available extensions: GNU libio by Per Bothner crypt add-on version 2.1 by Michael Glad and others linuxthreads-0.10 by Xavier Leroy BIND-8.2.3-T5B libthread_db work sponsored by Alpha Processor Inc NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk software FPU emulation by Richard Henderson, Jakub Jelinek and others Report bugs using the `glibcbug' script to <bu...@gn...>. > What can you get out of: > <http://gwenole.beauchesne.free.fr/sheepshaver/paranoia.cpp> ? It segfaults, specifically that "set_r2(0xaffebad5);" line again. Thanks for your help! --Eric |
|
From: Gwenole B. <gb...@di...> - 2004-07-10 16:06:18
|
Hi, >> Could you tell me more about your system? I am using Mandrakelinux = 9.1 >> with a kernel 2.4.21 + glibc 2.3.1. Can you send the output of = running >> /lib/libc.so.6 ? > > Debian testing, kernel 2.4.22 + glibc 2.3.2, output is: OK, your glibc looks pretty standard with no newer extensions like tls=20= support. >> What can you get out of: >> <http://gwenole.beauchesne.free.fr/sheepshaver/paranoia.cpp> ? > > It segfaults, specifically that "set_r2(0xaffebad5);" line again. What does ldd a.out show? If it is linked against libpthread, it will=20 segfault since r2 is reserved by the ABI as a thread pointer. glibc=20 implementation honours that, unlike our sheepthreads. A simple "gcc paranoia.cpp" should not cause a dependency on=20 libpthread. If it happens, please send me the output of "gcc -v" to=20 know how Debian people configured it. Can you also try "gcc -ffixed-r2 paranoia.cpp" ? Thanks, Gwenol=E9.= |
|
From: Eric H. <eah...@lo...> - 2004-07-10 18:23:19
|
On Saturday 10 July 2004 12:08, you wrote: > > It segfaults, specifically that "set_r2(0xaffebad5);" line again. > > What does ldd a.out show? If it is linked against libpthread, it will > segfault since r2 is reserved by the ABI as a thread pointer. glibc > implementation honours that, unlike our sheepthreads. Output is: libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x0ff18000) libm.so.6 => /lib/libm.so.6 (0x0fe84000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0fe57000) libc.so.6 => /lib/libc.so.6 (0x0fcfa000) /lib/ld.so.1 => /lib/ld.so.1 (0x30000000) > A simple "gcc paranoia.cpp" should not cause a dependency on > libpthread. If it happens, please send me the output of "gcc -v" to > know how Debian people configured it. Hmm, I used "g++ paranoia.cpp"...just tried "gcc paranoia.cpp" and this results in: /tmp/cc6XIgSn.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status "gcc -v" results in: Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.2/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib powerpc-linux Thread model: posix gcc version 3.3.2 20030908 (Debian prerelease) > Can you also try "gcc -ffixed-r2 paranoia.cpp" ? That gives me the __gxx_personality_v0 thing; if I use g++ instead I still get the segfault.... Thanks (learning much here!). --Eric |
|
From: Gwenole B. <gb...@di...> - 2004-07-11 04:58:10
|
Hi, > Hmm, I used "g++ paranoia.cpp"...just tried "gcc paranoia.cpp" and this > results in: And you were right to use g++. ;-) > That gives me the __gxx_personality_v0 thing; if I use g++ instead I > still > get the segfault.... Thanks (learning much here!). Can you (privately) send me the output of g++ -S paranoia.cpp? i.e. the generated paranoia.s assembly file. If you could also compress it to make it smaller in my mbox. Thanks. I will upload some paranoia.* prebuilt binaries on my site so that you could test some variations from my toolchain. |
|
From: Eric H. <eah...@lo...> - 2004-07-11 15:13:27
|
On Sunday 11 July 2004 00:59, you wrote: > > I will upload some paranoia.* prebuilt binaries on my site so that you > could test some variations from my toolchain. Well, paranoia.glibc.dynamic does the segfault thing, as I would expect, but paranoia.glibc.static works: Paranoia checks... SIGUSR2 handler caught: check whether sigaltstack() works check whether r4 points to info on the stack check whether r4 looks like a sigcontext check whether sc->regs points to info on the stack check whether r2 still holds the value we set it to done. ...passed So, something is screwy in my configuration, somewhere, eh? --Eric |
|
From: Gwenole B. <gb...@di...> - 2004-07-11 16:26:19
|
Hi, > So, something is screwy in my configuration, somewhere, eh? Not sure, IIRC the ABI reserves r2 usage for system (kernel + glibc), but we need to be free to use r2 for MacOS ABI. I will build a static Linux binary for testing. Or will you know where is crashes. g++ -g paranoia.cpp gdb ./a.out run [crash] bt I guess the stack trace will return something from the raise() [kill() function actually]. Your paranoia.s looks good. So, there is some interaction with your glibc. |
|
From: Gwenole B. <gb...@di...> - 2004-07-11 17:46:06
|
dimanche 11 juillet 2004, =E0 06:28 pm, Gwenole Beauchesne a =E9crit : > I will build a static Linux binary for testing. <http://gwenole.beauchesne.free.fr/sheepshaver/files/=20 SheepShaver.linux.ppc.static.bz2>= |
|
From: Eric H. <eah...@lo...> - 2004-07-12 21:38:56
|
On Sunday 11 July 2004 13:47, Gwenole Beauchesne wrote: > > I will build a static Linux binary for testing. > > <http://gwenole.beauchesne.free.fr/sheepshaver/files/ > SheepShaver.linux.ppc.static.bz2> Hey, it works! Up to a point, anyway. Gets past the paranoia check, reads ROM file, then I get: WARNING: Cannot open /dev/fd0u1440 (Permission denied) WARNING: Cannot open /dev/fd1u1440 (Permission denied) [what's that, floppy drives? Don't have any of those....] WARNING: Cannot open /dev/hda8 (Permission denied) WARNING: Cannot open /dev/cdrom (Permission denied) ...and then a grey screen with the blinking question mark disk. Running as root gets rid of the permission denied stuff, but then I get a blank grey screen, and nothing happens after that. /dev/hda8 is a HFS OS8.6 partition which is unmounted in Linux. Same thing happens if I try to boot off the install CD. --Eric |
|
From: Eric H. <eah...@lo...> - 2004-07-11 17:47:08
|
On Sunday 11 July 2004 12:28, you wrote: > > So, something is screwy in my configuration, somewhere, eh? > > Not sure, IIRC the ABI reserves r2 usage for system (kernel + glibc), > but we need to be free to use r2 for MacOS ABI. I will build a static > Linux binary for testing. Or will you know where is crashes. > g++ -g paranoia.cpp > gdb ./a.out > run > [crash] Program received signal SIGSEGV, Segmentation fault. 0x0fd173d0 in __errno_location () from /lib/libc.so.6 > bt #0 0x0fd173d0 in __errno_location () from /lib/libc.so.6 #1 0x0fd45c04 in vfprintf () from /lib/libc.so.6 #2 0x0fd4e33c in printf () from /lib/libc.so.6 #3 0x10000960 in paranoia_check() () at paranoia.cpp:144 #4 0x10000d1c in main () at paranoia.cpp:229 #5 0x0fd17120 in __libc_start_main () from /lib/libc.so.6 --Eric |