My first contact - problem compiling binutils
karl at karlwilbur.net
Wed Apr 7 11:50:08 PDT 2004
Flavio Alberto Lopes Soares wrote:
> Hello all,
> I need to make a minimal Linux + X system for an application that I
> developping and I decide study from Linux From Scratch to learn how to
> do this;
> This is my first contact with LFS and I have dificulty to compile the
> package - gcc;
> I have an old disk (working) with 540MB and I made one partition in this
> disk and is this the instalation target (/tools is a symlink to a
> partition in this disk), I compiling in my main system (Debian SID HD
> 40GB), and the source packages are in /home/lfs/sources_LFS/ (gcc-build
> and gcc-3.3.1 from lfs-packages/gcc-core-3.3.1.tar.bz2 are inside this
> directory) under ownership of lfs.users (user.group), when I follow the
> Linux-From-Scratch 5 I have the error bellow:
> lfs at flavio:~/sources_LFS/gcc-build$ ../gcc-3.3.1/configure
> --prefix=/tools --with-local-prefix=/tools --disable-nls
> --enable-shared --enable-languages=c
> Configuring for a i686-pc-linux-gnuoldld host.
> Created "Makefile" in /home/lfs/sources_LFS/gcc-build using "mt-frag"
> /tools/bin/ld: installation problem, cannot exec `/tools/bin/ld':
> Permission denied
> collect2: ld returned 255 exit status
> *** The command 'gcc -o conftest -g -O2 conftest.c' failed.
> *** You must set the environment variable CC to a working compiler.
> lfs at flavio:~/sources_LFS/gcc-build$
> What I do wrong ?
> I do it logged as lfs user, but binutils are compiled as root and I
> believe that compile OK but I don't know if this is the correct way and
> maybe this is the cause for these errors.
> Thanks for any help
> and excuse-me for my bad english (I'm from Brazil)
Don't worry about your English. It's good enough that I can understand you. :-)
Check your permissions on the /tools dir.
In Chapter 5. Constructing a temporary system - Adding the user lfs is says:
"Now grant this new user lfs full access to $LFS/tools by giving it ownership of
chown lfs $LFS/tools "
It looks like something either went wrong there or, since you built binutils as
root, the permissions on your utils are set for root.
This should fix it for you.
As root do:
chown lfs -R $LFS/tools
Also, as per the book, you should be doing all of you Chapter 5 builds as user
This message made with 100% recycled bits.
Registered Linux user #307374
LFS user #8237 since v4.0
More information about the lfs-support