creating a simlink after gcc-4.4.1 package has been installed
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81
Rep:
creating a simlink after gcc-4.4.1 package has been installed
Hello,
I use LFS 6.5 book ver, my host system Centos 5.2
I did already install binutils and while installing gcc-4.4.1 package, the last thing to do is to create the symlink for libgcc_eh.a :
Code:
Using --disable-shared means that the libgcc_eh.a file isn't created and installed. The Glibc package
depends on this library as it uses -lgcc_eh within its build system. This dependency can be satisfied by creating a
symlink to libgcc.a, since that file will end up containing the objects normally contained in libgcc_eh.a:
ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \
sed 's/libgcc/&_eh/'`
a little bit confusing me, what is $LFS_TGT-gcc, I got $LFS_TGT variable defind and when I try to create the symlink following the command above it complaing me that:
Code:
ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \
> sed 's/libgcc/&_eh/'`
bash: i686-lfs-linux-gnu-gcc: command not found
create symbolic link `./libgcc.a' to `libgcc.a'
Just, I guess ,I missed something through reading the book but still could not find the problem, where $LFS_TGT-gcc definition took from
The question mark [previous post was edited during my reply] confuses me a bit. I have to assume you tried both commands and both have the same (failed) result.
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81
Original Poster
Rep:
Hi druuna
thank you for fast reply
Quote:
The question mark [previous post was edited during my reply] confuses me a bit. I have to assume you tried both commands and both have the same (failed) result.
You were rigth I did some edit to my original post
Code:
$echo $PATH
/tools/bin:/bin:/usr/bin
Quote:
ls -ld /tools/i686*
drwxr-xr-x 4 lfs lfs 4096 Oct 25 00:03 /tools/i686-lfs-linux-gnu
Code:
ls -l /tools/bin/i686*gcc
/bin/ls: i686*gcc : No such file or directory
strange, it is look like I don't have file tools/bin/i686-lfs-linux-gnu-gcc installed
By the way, I tried to install this package on another host(this time it is Suse 10 server) machine, and here there is a
Code:
[lfs@suseLFS:/lfs> ls -l tools/bin/i6*gcc
-rwxr-xr-x 2 lfss lfss 438499 Oct 26 20:22 tools/bin/i686-lfs-linux-gnu-gcc
I got this file
after installation has been complited, I successfully created symlink to libgcc.a file
What could be missed on my Centos 5.2 host system? Actually the quitions is why this file did not created, while compiltion and installation of gcc package
1) Centos 5.2, as installed, isn't a suitable host for building LFS (did you do the iv. Host System Requirements step and all was ok?)
2) Something went wrong in the previous steps (either binutils or gcc).
If the first point is not the issue then I would suggest removing what you have done so far (I'm talking about chapter 5) and start over. Double check each step to see if anything odd happens.
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81
Original Poster
Rep:
Quote:
If the first point is not the issue then I would suggest removing what you have done so far (I'm talking about chapter 5) and start over. Double check each step to see if anything odd happens.
This is already the second time (and I guess the last one ) when I remove and rebuild my LFS system FROM THE SCRATCH . This time is the same to previas one, I don't know what was the problem exactly ,but cleaning the system totally helped me to install gcc pack successfuly at this time. I suppose that, it happend me throgh copy and past stuffs from the book, honestly said, I did not check things twice, so I guess, that is THE problem of mine
Same problem - i686-lfs-linux-gnu-gcc: command not found
Hi all,
This is my first post in here as I am having no luck finding a resolution to this issue elsewhere. I have tried the lfs (Version 7.1) build five times now in the past two days on different machine. First was a fresh Arch VM install with all the pre-requisites, then I tried Arch native rather than a VM, then Linux Mint 13, then CentOS 6, finally today I am trying on Slackware 13.37.
Firstly, here is the output from the version check on the host:
Quote:
root@SLACK:~# bash version-check.sh
bash, version 4.1.10(2)-release
/bin/sh -> /bin/bash
Binutils: (Linux/GNU Binutils) 2.21.51.0.6.20110118
bison (GNU Bison) 2.4.3
/usr/bin/yacc -> /usr/bin/yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.11
diff (GNU diffutils) 3.0
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /bin/gawk-3.1.8
gcc (GCC) 4.5.2
(GNU libc) 2.13
grep (GNU grep) 2.7
gzip 1.4
Linux version 2.6.37.6 (root@midas) (gcc version 4.5.2 (GCC) ) #2 Sun Apr 10 01:09:12 CDT 2011
m4 (GNU M4) 1.4.16
GNU Make 3.82
patch 2.6.1
Perl version='5.12.3';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.0.2
gcc compilation OK
I haven't seen any errors during the building of binutils or the gcc build which finishes up with this...
Sorry missed that, did you apply the patch which should of been in sources dir.
I have the i686-lfs-linux-gnu-gcc file in tools/bin. But I have done binutils pass2 I forgot to check when it was installed, I,m guessing it should be with gcc pass 1.
If you do rebuild gcc make sure you remove the gcc-build and gcc-4.6.2 dir.
Yes, I applied the patch that is mentioned in the book with...
Code:
patch -Np1 -i ../gcc-4.6.2-cross_compile-1.patch
However, I just looked back in the sources directory and there are two gcc patches. Should I apply both at this stage even though the second one is not mentioned in the Pass 1 section of the book?
Quote:
lfs:/mnt/lfs/sources$ ls -l gcc*
-rw-r--r-- 1 root root 1887 Mar 2 16:44 gcc-4.6.2-cross_compile-1.patch
-rw-r--r-- 1 root root 1446 Mar 2 16:44 gcc-4.6.2-startfiles_fix-1.patch
-rw-r--r-- 1 root root 71995338 Oct 26 2011 gcc-4.6.2.tar.bz2
No just the 1 patch as mentioned.
As I said I,m not sure if i686-lfs-linux-gnu-gcc is installed although I think it should be,
Did you copy / paste the configure part.
I have no idea why....why are there two patches and the second one isn't documented in Chapter 5.5? Why has only applying one patch (apparently) worked for everyone else except me?
Anyway, on to the next step, thanks for your feedback. Oh, and to answer your question, yes in this as in all previous builds I copied/pasted everything from the book.
EDIT
For anyone else reading this thread with a similar problem, the contents now of the $LFS/tools/bin directory is...
Quote:
lfs:/mnt/lfs/tools/bin$ ls -l
total 54588
-rwxr-xr-x 1 lfs lfs 3238524 Jun 27 19:53 i686-lfs-linux-gnu-addr2line
-rwxr-xr-x 2 lfs lfs 3368094 Jun 27 19:53 i686-lfs-linux-gnu-ar
-rwxr-xr-x 2 lfs lfs 4773004 Jun 27 19:53 i686-lfs-linux-gnu-as
-rwxr-xr-x 1 lfs lfs 3196076 Jun 27 19:53 i686-lfs-linux-gnu-c++filt
-rwxr-xr-x 1 lfs lfs 762292 Jun 27 23:52 i686-lfs-linux-gnu-cpp
-rwxr-xr-x 1 lfs lfs 67492 Jun 27 19:53 i686-lfs-linux-gnu-elfedit
-rwxr-xr-x 2 lfs lfs 753741 Jun 27 23:52 i686-lfs-linux-gnu-gcc
-rwxr-xr-x 2 lfs lfs 753741 Jun 27 23:52 i686-lfs-linux-gnu-gcc-4.6.2
-rwxr-xr-x 1 lfs lfs 95367 Jun 27 23:52 i686-lfs-linux-gnu-gcov
-rwxr-xr-x 1 lfs lfs 3664125 Jun 27 19:53 i686-lfs-linux-gnu-gprof
-rwxr-xr-x 4 lfs lfs 4523674 Jun 27 19:53 i686-lfs-linux-gnu-ld
-rwxr-xr-x 4 lfs lfs 4523674 Jun 27 19:53 i686-lfs-linux-gnu-ld.bfd
-rwxr-xr-x 2 lfs lfs 3260259 Jun 27 19:53 i686-lfs-linux-gnu-nm
-rwxr-xr-x 2 lfs lfs 3853714 Jun 27 19:53 i686-lfs-linux-gnu-objcopy
-rwxr-xr-x 2 lfs lfs 4482754 Jun 27 19:53 i686-lfs-linux-gnu-objdump
-rwxr-xr-x 2 lfs lfs 3368093 Jun 27 19:53 i686-lfs-linux-gnu-ranlib
-rwxr-xr-x 1 lfs lfs 717501 Jun 27 19:53 i686-lfs-linux-gnu-readelf
-rwxr-xr-x 1 lfs lfs 3252784 Jun 27 19:52 i686-lfs-linux-gnu-size
-rwxr-xr-x 1 lfs lfs 3224506 Jun 27 19:53 i686-lfs-linux-gnu-strings
-rwxr-xr-x 2 lfs lfs 3853713 Jun 27 19:53 i686-lfs-linux-gnu-strip
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.