View previous topic :: View next topic |
Author |
Message |
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Thu Mar 08, 2007 11:54 am Post subject: Toolchain problems [SOLVED] |
|
|
Hi,
I recently decided to update my SunBlade 100. I started changing the profile to Code: | /etc/make.profile -> /usr/portage/profiles/default-linux/sparc/sparc64/2007.0 |
I have the following make.conf Code: |
CFLAGS="-Os -mcpu=ultrasparc -pipe -fomit-frame-pointer"
CHOST="sparc-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="-esound -esd -arts -gnome -gtk -qt -kde -alsa nptl nptlonly hal cups sane $
http_proxy="http://router:8080"
VIDEO_CARDS="mach64"
INPUT_DEVICES="mouse keyboard"
LINGUAS="en_GB sv_SE"
SANE_BACKENDS="snapscan"
GENTOO_MIRRORS="http://mirror.gentoo.no/ ftp://mirror.icis.pcz.pl/gentoo/ "
source /usr/portage/local/layman/make.conf |
I thought i'd use emwrap to correctly update my toolchain. It starts by installing linux-headers- 2.6.19.2-r2, continues with glibc-2.5, binutils-{config-1.9-r3,2.17}, gcc-config-1.3.14 but then fails on building gcc-4.1.1-r3 with something like Code: | Internal error (as: bus error) |
Since as is part of binutils it looks as as gets corrupt during the build of binutils.
I'm trying to build the new TC with these versions: Code: | linux-headers-2.6.11-r6
glibc-2.3.6-r4
binutils-config-1.8-r7
binutils-2.16.1-r3
gcc-config-1.3.13-r3
glibc-2.3.6-r4 |
Where did I go wrong?
Best regards
addeman
Last edited by addeman on Wed Mar 21, 2007 6:00 pm; edited 1 time in total |
|
Back to top |
|
|
JeliJami Veteran
Joined: 17 Jan 2006 Posts: 1086 Location: Belgium
|
Posted: Thu Mar 08, 2007 3:41 pm Post subject: |
|
|
first, here's some information on upgrading your profile:
Gentoo Upgrading Guide
but it states that the most recent (supported) profile is 2006.1, for sparc
maybe that's were you went wrong _________________ Unanswered Post Initiative | Search | FAQ
Former username: davjel |
|
Back to top |
|
|
Weeve Retired Dev
Joined: 30 Oct 2002 Posts: 641
|
Posted: Thu Mar 08, 2007 4:06 pm Post subject: |
|
|
This also maybe a result of using -fomit-frame-pointer in CFLAGS as that is not a suggested or supported CFLAG. |
|
Back to top |
|
|
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Thu Mar 08, 2007 4:44 pm Post subject: |
|
|
The CFLAG must be from my x86 experience, where it as i understand it is supported and suggested. I'll be sure to change it though.
How should i restart my upgrading? Should i reemerge the working versions from the packages i've made? How would i go about downgrading glibc? That is not supported, so if my glibc-2.5 is b0rked, what do i do?
I find it a bit strange that the 2007.0 profile is not supported, since according to packages.gentoo.org glibc-2.5 is marked stable on sparc, but the only way to get it is via the 2007.0 or dev profile...
I'll update as soon as i get new compile results. Thanks for the response.
Best regards
addeman |
|
Back to top |
|
|
Weeve Retired Dev
Joined: 30 Oct 2002 Posts: 641
|
Posted: Thu Mar 08, 2007 5:14 pm Post subject: |
|
|
2007.0 is in the tree to help facilitate the work going towards the 2007.0 release. Until 2007.0 is actually released however, it is not supported (but if legitimate issues are found, please report to https://bugs.gentoo.org).
I'd suggest starting over with a clean stage. Also note that there are subprofiles under 2007.0 for desktop and server if those suit your needs. |
|
Back to top |
|
|
gust4voz Retired Dev
Joined: 09 Sep 2003 Posts: 373 Location: Buenos Aires, Argentina
|
Posted: Thu Mar 08, 2007 5:20 pm Post subject: |
|
|
Also -Os isn't overly tested for sparc64 with gcc4.... _________________ Gustavo Zacarias
Gentoo/SPARC monkey |
|
Back to top |
|
|
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Thu Mar 08, 2007 7:13 pm Post subject: |
|
|
Weeve wrote: | 2007.0 is in the tree to help facilitate the work going towards the 2007.0 release. Until 2007.0 is actually released however, it is not supported (but if legitimate issues are found, please report to https://bugs.gentoo.org).
I'd suggest starting over with a clean stage. Also note that there are subprofiles under 2007.0 for desktop and server if those suit your needs. | Ok, that i can accept. I'll reevalute my thinking there. And starting with a new stage is so obvious, should have thought about that
gust4voz wrote: | Also -Os isn't overly tested for sparc64 with gcc4.... |
Ok, i thought that was one of the more 'safe' flags. According gcc's online pages it turns on the -O2 flags that does not typically increase binary size. Hope you don't mind me asking, but what is the 'safe' recommended optimization?
Thanks for all the help so far.
Best regards
addeman |
|
Back to top |
|
|
gust4voz Retired Dev
Joined: 09 Sep 2003 Posts: 373 Location: Buenos Aires, Argentina
|
Posted: Thu Mar 08, 2007 9:56 pm Post subject: |
|
|
I tend to use CFLAGS="-mcpu=ultrasparc -mtune=ultrasparc -mvis -Wa,-Av8plusa -O2 -pipe" without side effects.
You can safely use ultrasparc3 if you have one too. _________________ Gustavo Zacarias
Gentoo/SPARC monkey |
|
Back to top |
|
|
likwid n00b
Joined: 07 Mar 2007 Posts: 40
|
Posted: Thu Mar 08, 2007 10:26 pm Post subject: |
|
|
I use v9 for my US3's in my blade 2000... what is the difference between using ultrasparc3 and v9, 64 bit binaries? |
|
Back to top |
|
|
Weeve Retired Dev
Joined: 30 Oct 2002 Posts: 641
|
Posted: Thu Mar 08, 2007 10:38 pm Post subject: |
|
|
From a gcc perspective, nothing. However some programs assume things when they see v9 over ultrasparc3. Most commonly, a program may assume that v9 implies it can build 64 bit binaries (which a default Gentoo setup cannot do short of the kernel). Also sometimes when CFLAGS are filtered or adjusted in an ebuild, we don't always account for v9 (since we don't recommend it for use). |
|
Back to top |
|
|
likwid n00b
Joined: 07 Mar 2007 Posts: 40
|
Posted: Thu Mar 08, 2007 10:40 pm Post subject: |
|
|
Shit... I built my whole gentoo system with v9, should I start over? |
|
Back to top |
|
|
Weeve Retired Dev
Joined: 30 Oct 2002 Posts: 641
|
Posted: Thu Mar 08, 2007 10:51 pm Post subject: |
|
|
If nothing has failed to build so far, you're probably fine (assuming you don't still have a lot of packages to emerge). However using ultrasparc3 rather than v9 supposedly will provide you with binaries better optimized for the CPUs in a Blade 2000 than v9 would. |
|
Back to top |
|
|
likwid n00b
Joined: 07 Mar 2007 Posts: 40
|
Posted: Thu Mar 08, 2007 11:08 pm Post subject: |
|
|
Well, seems udev won't work, thought it built fine so I doubt this is the problem. I will probably redo the system. |
|
Back to top |
|
|
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Fri Mar 09, 2007 10:15 pm Post subject: |
|
|
I thought i give you an update:
First a warning, beware the mess a stage3 tarball can create if you're careless. This is what happend:
I reverted to the 2006.1 profile (supported and stable, i hope...). I then downloaded the stage3 tarball, which first did not untar. It complained about not being able to write Code: | /sys/.keep and /dev/pts/.keep | which was easy to fix, just delete those files from the archive and the extract it. Next probelm i did not forsee, the /etc/passwd file gets overwritten by the tarball... not very pleasant.
Than there is a problem with portage. Since i had installed some more recent packages on my initial update-try those files were still in confusing portage on which packages to 'clean' after succesfull merge. Oops, there went binutils, automake and friends. That was not nice, but as always, i should have known...
Well now i'm trying again, and deleting those new noinstalled packages from /var/db/pkg before any emerge.
I'll report back later with an updated status report.
Best regards
addeman
PS. Linux: the right to properly f**k up your system DS |
|
Back to top |
|
|
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Mon Mar 12, 2007 12:59 pm Post subject: |
|
|
A little update:
After sorting out the mess with the /var/db/pkg files i started updating my system again. I did a Code: | emerge linux-headers glibc binutils{-config,''} gcc{-config,''} && emerge glibc binutils gcc |
The first emerge worked, but the second failed on while building glibc, same error as before: something about "internal error" with as: bus error.
[EDIT] The exact message is: Code: | sparc-unknown-linux-gnu-gcc ../sysdeps/unix/sysv/linux/pread64.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fcall-used-g6 -fmerge-all-constants -fno-strict-aliasing -mcpu=ultrasparc -mtune=ultrasparc -pipe -Wstrict-prototypes -mlong-double-128 -mcpu=ultrasparc -Wa,-Av9a -fexceptions -fasynchronous-unwind-tables -I../include -I/var/tmp/portage/glibc-2.5/work/build-sparc32-sparc-unknown-linux-gnu-nptl/posix -I/var/tmp/portage/glibc-2.5/work/build-sparc32-sparc-unknown-linux-gnu-nptl -I../sysdeps/sparc/sparc32/elf -I../nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9 -I../sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9 -I../sysdeps/unix/sysv/linux/sparc/sparc32/fpu -I../sysdeps/sparc/sparc32/fpu -I../nptl/sysdeps/unix/sysv/linux/sparc/sparc32 -I../sysdeps/unix/sysv/linux/sparc/sparc32 -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux/sparc -I../sysdeps/unix/sysv/linux/sparc -I../ports/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../ports/sysdeps/unix/sysv -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/sparc -I../ports/sysdeps/unix -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/sparc/sparc32/sparcv9 -I../sysdeps/sparc/sparc32/sparcv9 -I../nptl/sysdeps/sparc/sparc32 -I../sysdeps/sparc/sparc32 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/sparc/sparc32/soft-fp -I../sysdeps/sparc/fpu -I../nptl/sysdeps/sparc -I../sysdeps/sparc -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../ports -I../nptl -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/sparc-unknown-linux-gnu/4.1.1/include -isystem /usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -o /var/tmp/portage/glibc-2.5/work/build-sparc32-sparc-unknown-linux-gnu-nptl/posix/pread64.o -MD -MP -MF /var/tmp/portage/glibc-2.5/work/build-sparc32-sparc-unknown-linux-gnu-nptl/posix/pread64.o.dt -MT /var/tmp/portage/glibc-2.5/work/build-sparc32-sparc-unknown-linux-gnu-nptl/posix/pread64.o
sparc-unknown-linux-gnu-gcc: Internal error: Bus error (program as)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
make[2]: *** [/var/tmp/portage/glibc-2.5/work/build-sparc32-sparc-unknown-linux-gnu-nptl/posix/wordexp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/glibc-2.5/work/glibc-2.5/posix'
make[1]: *** [posix/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.5/work/glibc-2.5'
make: *** [all] Error 2
!!! ERROR: sys-libs/glibc-2.5 failed.
Call stack:
ebuild.sh, line 1539: Called dyn_compile
ebuild.sh, line 939: Called src_compile
glibc-2.5.ebuild, line 1130: Called toolchain-glibc_src_compile
glibc-2.5.ebuild, line 242: Called die
!!! make for sparc32 failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
|
If this is any help.
[/EDIT]
Maybe i should just give up and live with the outdated packages...
Best regards
addeman |
|
Back to top |
|
|
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Thu Mar 15, 2007 7:33 am Post subject: |
|
|
Hello again, a little update:
Somehow i got the toolchain properly built. I've done so a couple of times just to test. After that i've rebuilt all system packages, and then the toolchain again, and after that the whole world built. All packages built cleanly, yey!
Well now i needed to emerge mozilla-firefox, which crashed with: Code: | gmake[5]: Entering directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.2/work/mozilla/intl/locale/src/unix'
nsCollationUnix.cpp
sparc-unknown-linux-gnu-g++ -o nsCollationUnix.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6.19\" -DOSARCH=\"Linux\" -DBUILD_ID=2007031420 -I../../../../dist/include/xpcom -I../../../../dist/include/string -I../../../../dist/include/unicharutil -I../../../../dist/include/pref -I../../../../dist/include/uconv -I../../../../dist/include/locale -I../../../../dist/include -I/usr/include/nspr -I../../../../dist/sdk/include -I./.. -fPIC -DGENTOO_NSPLUGINS_DIR=\"/usr/lib/nsplugins\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\"/usr/lib/nsbrowser/plugins\" -fno-rtti -fno-handle-exceptions -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -mcpu=v8 -mtune=ultrasparc -pipe -Wno-return-type -w -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -ffunction-sections -O2 -DGENTOO_NSPLUGINS_DIR=\"/usr/lib/nsplugins\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\"/usr/lib/nsbrowser/plugins\" -DMOZILLA_CLIENT -include ../../../../mozilla-config.h -Wp,-MD,.deps/nsCollationUnix.pp nsCollationUnix.cpp
nsDateTimeFormatUnix.cpp
sparc-unknown-linux-gnu-g++ -o nsDateTimeFormatUnix.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6.19\" -DOSARCH=\"Linux\" -DBUILD_ID=2007031420 -I../../../../dist/include/xpcom -I../../../../dist/include/string -I../../../../dist/include/unicharutil -I../../../../dist/include/pref -I../../../../dist/include/uconv -I../../../../dist/include/locale -I../../../../dist/include -I/usr/include/nspr -I../../../../dist/sdk/include -I./.. -fPIC -DGENTOO_NSPLUGINS_DIR=\"/usr/lib/nsplugins\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\"/usr/lib/nsbrowser/plugins\" -fno-rtti -fno-handle-exceptions -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -mcpu=v8 -mtune=ultrasparc -pipe -Wno-return-type -w -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -ffunction-sections -O2 -DGENTOO_NSPLUGINS_DIR=\"/usr/lib/nsplugins\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\"/usr/lib/nsbrowser/plugins\" -DMOZILLA_CLIENT -include ../../../../mozilla-config.h -Wp,-MD,.deps/nsDateTimeFormatUnix.pp nsDateTimeFormatUnix.cpp
sparc-unknown-linux-gnu-g++: Internal error: Bus error (program as)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
gmake[5]: *** [nsDateTimeFormatUnix.o] Error 1
gmake[5]: *** Deleting file `nsDateTimeFormatUnix.o'
gmake[5]: Leaving directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.2/work/mozilla/intl/locale/src/unix'
gmake[4]: *** [libs] Error 2
gmake[4]: Leaving directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.2/work/mozilla/intl/locale/src'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.2/work/mozilla/intl/locale'
gmake[2]: *** [libs] Error 2
gmake[2]: Leaving directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.2/work/mozilla/intl'
gmake[1]: *** [tier_9] Error 2
gmake[1]: Leaving directory `/var/tmp/portage/www-client/mozilla-firefox-2.0.0.2/work/mozilla'
make: *** [default] Error 2
!!! ERROR: www-client/mozilla-firefox-2.0.0.2 failed.
Call stack:
ebuild.sh, line 1614: Called dyn_compile
ebuild.sh, line 971: Called qa_call 'src_compile'
environment, line 4024: Called src_compile
mozilla-firefox-2.0.0.2.ebuild, line 190: Called die
!!! (no error message)
!!! 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/www-client/mozilla-firefox-2.0.0.2/temp/build.log'.
|
I'm beginning to think that something else is the problem. But i cant really see what might be the problem, any ideas?
Best regards
addeman |
|
Back to top |
|
|
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Wed Mar 21, 2007 5:55 pm Post subject: |
|
|
Finally, firefox compiled. I tried approx 20 times with the cflags suggested by gust4voz but it just would not compile. Always the same error, see previous posts. Somehow i started thinking and since the assembler seemed to be the problem i decided to change the CFLAGS concering the assembler, so now i have Code: | CFLAGS="-O2 -mcpu=ultrasparc -mtune=ultrasparc -pipe" | and guess what: firefox compiled on first try... I'll try and read up on what those does, and see if i can find what's causing this.
Thanks for all support so far. I guess i should mark it [SOLVED] now.
By the way i noticed that firefox-ebuild changes -mcpu=ultrasparc to -mcpu=v8, which is wrong according to the gcc man, should be v9 minus 64-bit binaries.
Best regards
addeman |
|
Back to top |
|
|
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Thu Mar 22, 2007 10:01 am Post subject: |
|
|
Yet another update: I was wrong as usual... The thing that made firefox not compile was the , not the CFLAGS.
Could this be because firefox sets and is a UltraSPARC feature?
Best regards
addeman |
|
Back to top |
|
|
Weeve Retired Dev
Joined: 30 Oct 2002 Posts: 641
|
Posted: Thu Mar 22, 2007 9:22 pm Post subject: |
|
|
Yes, VIS is specific to Sun's implementation of the SPARC specification. |
|
Back to top |
|
|
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Fri Mar 23, 2007 4:52 pm Post subject: |
|
|
Weeve wrote: | Yes, VIS is specific to Sun's implementation of the SPARC specification. | According to gcc manual Quote: | With -mvis, GCC generates code that takes advantage of the UltraSPARC Visual Instruction Set extensions. The default is -mno-vis. | . As far as gcc is concerned UltraSPARC is a v9, so my point was merely that gcc would be confused (and rightly so) by And by the way, why does firefox change my cflags from -mcpu=ultrasparc to -mcpu=v8, when v8!=ultrasparc?
Please forgive me if i sound angry, i'm not. I'm just curious and confused...
Best regards
addeman |
|
Back to top |
|
|
gust4voz Retired Dev
Joined: 09 Sep 2003 Posts: 373 Location: Buenos Aires, Argentina
|
Posted: Fri Mar 23, 2007 6:35 pm Post subject: |
|
|
Mozilla in general had issues with v9+ instructions in the past (as in builds but doesn't work).
Maybe it's fixed nowadays for ff-2.x.
In the odd department i've built almost everything with those CFLAGS just fine, including all the mozilla stuff.
Last ebuild that had issues was the previous net-snmp stable that passed the linker directives to perl which resulted obviously in the build puking, but i've not hit anything stable nowadays that complains about them. _________________ Gustavo Zacarias
Gentoo/SPARC monkey |
|
Back to top |
|
|
addeman Apprentice
Joined: 04 Nov 2004 Posts: 181 Location: Stockholm, Sweden
|
Posted: Sat Mar 24, 2007 11:55 am Post subject: |
|
|
Ok, i can see why ultrasparc is filtered out then, thx. But just to satisfy my curiosity i'll try to build ff-2.0.0.2 with -mcpu=ultrasparc to what happens. If it works ill try with both -mcpu=ultrasparc and -mvis.
Update: ff did not build with -mcpu=ultrasparc. It failed with the same error as previous posts.
Best regards
addeman |
|
Back to top |
|
|
|