Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bootstrap failure on sparc ultra 60
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
bl00mie
Tux's lil' helper
Tux's lil' helper


Joined: 05 Apr 2003
Posts: 82
Location: washington, dc

PostPosted: Wed Mar 23, 2005 3:13 pm    Post subject: bootstrap failure on sparc ultra 60 Reply with quote

i'm trying to do a hardened gentoo install on a sparc ultra60 box using the sparc 2004.3 liveCD (using gentoo-2.4 boot parameter instead of gentoo-2.4-smp, 'cause that always made my system hang during boot....), and am having trouble bootstrapping.

it makes it a fair part of the way... fails on configuring glibc with this error: "checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile"

here's the "Core Tests" section of my config.log: (i had to hand copy 'cause my sys admin has a pretty strict firewall :( )
Code:
## --------------##
## Core tests.  ##
## --------------##

...
configure:2583: gcc --version </dev/null >&5
gcc-config error: Could not run/locate "gcc"
<more gcc version tests, same result>
...


"can't find gcc? that can't be good..." so i started looking through the system. there's a /usr/bin/gcc... and /usr/bin is in my PATH. if i run /usr/bin/gcc, i get the same "gcc-config error: Could not run/locate gcc" error. however, running gcc64 gives no such error.

Code:
# gcc64 -v
Reading specs from /usr/lib/gcc-lib/sparc64-unknown-linux-gnu/3.3.5/specs
Configured with: /var/tmp/portage/gcc-sparc64-3.3.5/work/gcc-sparc64-3.3.5/configure --prefix=/usr --disable-shared --disable-multilib --target=sparc64-unknown-linux-gnu --enable-languages=c --enable-threads=single --host=sparc-unknown-linux-gnu
Thread model: single
gcc version 3.3.5 (Gentoo Linux 3.3.5)


so, when i start the bootstrap.sh script, it says "* STAGE1_USE='gcc64'"... i dono what that means precisely... if i run gcc64, which is a symbolic link to sparc64-unknown-linux-gnu-gcc, and it seems to work fine. do i have something set incorrectly?

make.conf:
Code:
CFLAGS="-O2 -mcpu=ultrasparc -pipe -fomit-frame-pointer"
CHOST="sparc-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
USE="hardened pic pie -kde -qt -gnome -gtk"
<mirrors>
<sync>


-- a n00b in need.
Back to top
View user's profile Send private message
bl00mie
Tux's lil' helper
Tux's lil' helper


Joined: 05 Apr 2003
Posts: 82
Location: washington, dc

PostPosted: Wed Mar 23, 2005 4:12 pm    Post subject: Reply with quote

i tried mv'ing gcc to gcc_old and made a symbolic link from gcc to the sparc64 gcc and then running bootstrap.sh again... it got a little farther and started compiling things, but failed again, not liking "-fno-pie" and "-fno-PIE".

is hardened gentoo on a sparc a pipe-dream?
Back to top
View user's profile Send private message
bl00mie
Tux's lil' helper
Tux's lil' helper


Joined: 05 Apr 2003
Posts: 82
Location: washington, dc

PostPosted: Wed Mar 23, 2005 7:49 pm    Post subject: Reply with quote

i just realized that i wasn't using a hardened make.profile.

but upon looking in /usr/portage/profiles/hardened, i see no sparc... only amd64, ppc, and x86. does anyone know what might need to change to mod one of these to make it sparc-friendly??
Back to top
View user's profile Send private message
Ferris
Retired Dev
Retired Dev


Joined: 13 Jan 2003
Posts: 426
Location: N. Virginia (USA)

PostPosted: Wed Mar 23, 2005 9:28 pm    Post subject: Reply with quote

Hardened works for me; at least, adding "hardened" to my USE flags in make.conf gives me a hardened gcc, glibc, etc.

However, I doubt that you want to be using gcc64. Unless you are trying to build 64-bit user space (which is not really supported), you want to use 'gcc' for your C-compiler, and you want something like:

make.profile -> /usr/portage/profiles/default-linux/sparc/sparc64/2004.3/
and in make.conf,
CHOST="sparc-unknown-linux-gnu"
(gcc64 is needed for building the kernel)

I do not think there is a hardened profile per se, but I believe someone (tigger?) is working on one.
Hope this helps,
Regards,
Back to top
View user's profile Send private message
bl00mie
Tux's lil' helper
Tux's lil' helper


Joined: 05 Apr 2003
Posts: 82
Location: washington, dc

PostPosted: Wed Mar 23, 2005 9:55 pm    Post subject: Reply with quote

i'm using "hardened", but also "pic" and "pie" in the use flags. should i remove those?? other than that, i thiiiiink my setup is as you described...
Back to top
View user's profile Send private message
Method
Retired Dev
Retired Dev


Joined: 16 Nov 2002
Posts: 20

PostPosted: Thu Mar 24, 2005 3:23 am    Post subject: Reply with quote

this isn't a hardened specific problem, your environment isn't being updated to the new gcc after an install (for whatever reason)

do
#gcc-config 1
#source /etc/profile

and you should be fine, don't mess with pie/pic use flags. The one thing I'll note about sparc64 and hardened though, don't enable mprotect restrictions in the PaX configuration, it will hurt your performance badly
_________________
Joshua Brindle
Gentoo Developer
Back to top
View user's profile Send private message
bl00mie
Tux's lil' helper
Tux's lil' helper


Joined: 05 Apr 2003
Posts: 82
Location: washington, dc

PostPosted: Thu Mar 24, 2005 7:41 pm    Post subject: Reply with quote

that seems to have fixed it. hardened glibc just finished building and installing successfully... not that it _really_ matters at this point, but did i do something (or miss some instruction) that messed up the gcc-config stuff??

anyway, thanks to Method and Ferris for your help.
Back to top
View user's profile Send private message
bl00mie
Tux's lil' helper
Tux's lil' helper


Joined: 05 Apr 2003
Posts: 82
Location: washington, dc

PostPosted: Thu Mar 24, 2005 9:15 pm    Post subject: Reply with quote

ack!!

glibc built just fine. but then when we move on to gcc, there was a syntax error in /usr/portage/eclass/toolchain.eclass

Code:

Calculating dependencies ...done!
>>> emerge (1 of 1) sys-devel/gcc-3.3.5.20050130-r1 to /
/usr/lib/portage/bin/ebuild.sh: /usr/portage/eclass/toolchain.eclass: line 51: syntax error near unexpected token `fi'
/usr/lib/portage/bin/ebuild.sh: /usr/portage/eclass/toolchain.eclass: line 51: `                         fi'


i know absolutely nothing about toolchain.eclass, what it does, or what this error really means. i did, however, look through the file, and found:
Code:
if [ -n ${target} ]; then ewarn "could not find ${target}/db.h"
elif
     einfo "Apparently you just removed the last instance of $PN. Removing the simlinks"
fi
rm db.h db_185.h


should that elif be an else? i tried switching it, but then there was another crazy, and similar error. something tells me that the rm statement should be inside that else, too... shouldn't it??

i've never before had so much trouble boot-strapping a system. :?
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
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