Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2277 closed defect (invalid)

Typo in chapter 6.12.1

Reported by: skilaatara Owned by: lfs-book@…
Priority: normal Milestone:
Component: Book Version: 6.3
Severity: minor Keywords:
Cc:

Description

The '..' here doesn't make sense, as far as I can see:

ln -sv ../usr/bin/cpp /lib

It is present in both the stable 6.3 and the current development version.

Change History (7)

comment:1 by DJ Lucas, 15 years ago

Resolution: invalid
Status: newclosed

It is a relative link. Please see 'man ls' for usage instructions.

comment:2 by DJ Lucas, 15 years ago

Oops, that wasn't very helpful...here is why it is a relative link:

[dj@name25 ~]# ls -l /media/lfs/lib/cpp 
lrwxrwxrwx 1 root root 14 2008-10-30 00:08 /media/lfs/lib/cpp -> ../usr/bin/cpp
[dj@name25 ~]# 

comment:3 by skilaatara, 15 years ago

But surely we don't use cpp in a non-chrooted environment after this point?

comment:4 by Matthew Burgess, 15 years ago

As mentioned just above the 'ln' command:

Some packages expect the C preprocessor to be installed in the /lib directory. To support those packages, create this symlink: 

So, what we're doing here is providing compatibility for packages that someone may want to install after they've booted into their shiny new LFS system, and that want to call /lib/cpp instead of /usr/bin/cpp.

Hope this helps clarify things,

Matt.

comment:5 by skilaatara, 15 years ago

Well no, that doesn't clarify why it would be a relative link. On that shiny new LFS system, presumably there is only the one "usr/lib" directory. (Not that it's important, it just looked strange to me.)

comment:6 by skilaatara, 15 years ago

er, one "usr/bin" directory, that is.

comment:7 by DJ Lucas, 15 years ago

There is only one '../usr/bin' that is relative to the /lib or /mnt/lfs/lib that we are in when the link is created. Think about this for just a second. Now realize, however ironic, a relative link is, in fact, more exact than an explicit link as it always points to intended target. Anyway, taken from the FHS-2.3:

If a C preprocessor is installed, /lib/cpp must be a reference to it, for historical reasons.

I doubt it makes any difference whatsoever in practice as it is only there to satisfy the aging FHS.

Note: See TracTickets for help on using tickets.