LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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

Reply
 
Search this Thread
Old 06-26-2011, 08:02 PM   #1
Brandonkb
LQ Newbie
 
Registered: Jun 2011
Posts: 4

Rep: Reputation: Disabled
Creating a symlink to libgcc.a


Section 5.5.1 in LFS Version 6.8 and I'm using Fedora 15 as the host system.

Quote:
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:
Code:
ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | \
    sed 's/libgcc/&_eh/'`
This command gives me the following error:

Code:
ln: failed to create symbolic link 'x86_64-lfs-linux-gnu-gcc -print-libgcc-file-name | sed \'s/libgcc/&_eh\'': No such file or directory
I ran a couple of finds and came up with these locations:

Code:
/mnt/lfs/tools/bin/x86_64-lfs-linux-gnu-gcc
and

Code:
/mnt/lfs/sources/gcc-build/gcc/libgcc.a
/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc/libgcc.a
/mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/4.5.2/libgcc.a
/usr/lib/gcc/x86_64-redhat-linux/4.6.0/32/libgcc.a
/usr/lib/gcc/x86_64-redhat-linux/4.6.0/libgcc.a
This is second time I've run into this problem. The first time I found http://www.linuxquestions.org/questi...talled-764479/ and decided just to start over.

Is this a place where I'll have to deviate from the book because I'm using x86_64? If so, how would I modify the command and where can I learn more about why?
 
Old 06-27-2011, 10:32 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,630
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
I would guess it's complaining that libgcc.a doesn't exist in the directory you're running it in. What directory are you in? And which should you be in?
 
Old 06-27-2011, 10:58 AM   #3
Brandonkb
LQ Newbie
 
Registered: Jun 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
The book was unclear about it.
I've tried /mnt/lfs/sources/gcc-build/ because that's where I already was.

I didn't want to create a seemingly correct link and screw up glibc later so I haven't tried any others.

Would /mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/4.5.2/ be the correct one?
Or maybe /mnt/lfs/tools/bin/?
 
Old 06-27-2011, 11:20 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

This looks strange:
Quote:
ln: failed to create symbolic link 'x86_64-lfs-linux-gnu-gcc -print-libgcc-file-name | sed \'s/libgcc/&_eh\'': No such file or directory
It shows the commands and not the output of the command (which is a directory and a file).

Are you sure you used back-ticks and not single quotes? I.e.:
Code:
`$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`
vs
'$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'' -> this is wrong
About the ln -sv .... command: It doesn't matter where you execute it from. The link is created from libgcc.a (the actual existing file) to libgcc_eh.a in the directory that the above command produces (on my system that is: (/mnt/lfs)/tools/lib/gcc/x86_64-lfs-linux-gnu/4.5.2).

There's no need to deviate from the book at any point, it works as described.
 
1 members found this post helpful.
Old 06-27-2011, 11:49 AM   #5
Brandonkb
LQ Newbie
 
Registered: Jun 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
I wasn't aware that there was a difference between backticks and single quotes.
You'd figure I would have learned that in school at some point...

I'll jump right on it when I get home from work and I'll let you know how it goes.
Thank you both for your help.

Last edited by Brandonkb; 06-27-2011 at 05:33 PM. Reason: spelling and grammar
 
Old 06-27-2011, 11:50 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
You're welcome
 
Old 06-27-2011, 05:32 PM   #7
Brandonkb
LQ Newbie
 
Registered: Jun 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Worked first try.
 
  


Reply

Tags
lfs, libgcc.a


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Creating an X11R6 Compatibility Symlink spiky0011 Linux From Scratch 87 04-22-2011 12:21 AM
[SOLVED] Problem creating symlink with gcc to libgcc.a in LFS v6.7 linuxpicaxe Linux - Software 4 03-06-2011 12:24 PM
Problem creating symlink with gcc to libgcc.a in LFS v6.7 nuainkyeuh Linux From Scratch 4 02-28-2011 12:26 PM
creating symlink on samba drive kminkov Linux - General 2 04-24-2004 10:23 AM


All times are GMT -5. The time now is 07:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration