Discussion:
[lfs-support] LFS8.1 chapter 5.10 : /tools/bin/gcc is dynamically linked to host linker
Mohamed Dawod
2018-07-01 08:15:24 UTC
Permalink
HI,

I hope that some one can help me..
This is the 8th time i restart LFS building from chapter3 !!

The problem starts to appear in chapter6.7 (Linux-4.12.7 API Headers)
(/tools/bin/gcc file doesnt exist error)

The problem is explained in details here :
http://archive.linuxfromscratch.org/mail-archives/lfs-support/2016-
February/049686.html

So, I restart from chapter5 and when I reached to section 5.10. (GCC-7.2.0
- Pass 2) , I tried to check the linking of /tools/bin/gcc using the
command

$readelf -l /tools/bin/cc | grep "interpreter"
--The result :
[Requesting program interpreter: /lib/ld-linux.so.2]
__________________________________
The path for my lfs usr : $echo $PATH
--The result : /tools/bin:/bin:/usr/bin
__________________________________
The environmental variables for lfs usr : $env|sort
--The result :
HOME=/home/lfs
LC_ALL=POSIX
LFS=/mnt/lfs
LFS_TGT=i686-lfs-linux-gnu
OLDPWD=/mnt/lfs
PATH=/tools/bin:/bin:/usr/bin
PS1=${debian_chroot:+($debian_chroot)}\u@\h:\w\$
PWD=/home/lfs
SHLVL=1
TERM=xterm
_=/usr/bin/env
__________________________________


So,what is the reason of this problem ?
and what is the solution for this problem ?
--
Mohamed Dawod
Computer Engineering Department
Faculty of Engineering
Cairo University
Michele Bucca
2018-07-01 10:54:43 UTC
Permalink
Post by Mohamed Dawod
HI,
I hope that some one can help me..
This is the 8th time i restart LFS building from chapter3 !!
The problem starts to appear in chapter6.7 (Linux-4.12.7 API Headers)
(/tools/bin/gcc file doesnt exist error)
http://archive.linuxfromscratch.org/mail-archives/lfs-support/2016-February/049686.html
So, I restart from chapter5 and when I reached to section 5.10.
(GCC-7.2.0 - Pass 2) , I tried to check the linking of /tools/bin/gcc
using the command
$readelf -l /tools/bin/cc | grep "interpreter"
[Requesting program interpreter: /lib/ld-linux.so.2]
__________________________________
The path for my lfs usr : $echo $PATH
--The result : /tools/bin:/bin:/usr/bin
__________________________________
The environmental variables for lfs usr : $env|sort
HOME=/home/lfs
LC_ALL=POSIX
LFS=/mnt/lfs
LFS_TGT=i686-lfs-linux-gnu
OLDPWD=/mnt/lfs
PATH=/tools/bin:/bin:/usr/bin
PWD=/home/lfs
SHLVL=1
TERM=xterm
_=/usr/bin/env
__________________________________
So,what is the reason of this problem ?
and what is the solution for this problem ?
did you pach the sources of GCC using the sed command in the first and
second build of GCC? Can you describe a little more the steps that you do
before reaching the problem? looks like you failed to compile GCC - Pass 1

- Michele
Post by Mohamed Dawod
--
Mohamed Dawod
Computer Engineering Department
Faculty of Engineering
Cairo University
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style
Armin K.
2018-07-01 12:23:51 UTC
Permalink
Post by Mohamed Dawod
HI,
I hope that some one can help me..
This is the 8th time i restart LFS building from chapter3 !!
The problem starts to appear in chapter6.7 (Linux-4.12.7 API Headers)
(/tools/bin/gcc file doesnt exist error)
http://archive.linuxfromscratch.org/mail-archives/lfs-support/2016-February/049686.html
<http://archive.linuxfromscratch.org/mail-archives/lfs-support/2016-February/049686.html>
So, I restart from chapter5 and when I reached to  section 5.10.
(GCC-7.2.0 - Pass 2) , I tried to check the linking of /tools/bin/gcc
using the command
$readelf -l /tools/bin/cc | grep "interpreter"
[Requesting program interpreter: /lib/ld-linux.so.2]
__________________________________
The path for my lfs usr :  $echo $PATH
--The result :   /tools/bin:/bin:/usr/bin
__________________________________
The environmental variables for lfs usr : $env|sort
HOME=/home/lfs
LC_ALL=POSIX
LFS=/mnt/lfs
LFS_TGT=i686-lfs-linux-gnu
OLDPWD=/mnt/lfs
PATH=/tools/bin:/bin:/usr/bin
PWD=/home/lfs
SHLVL=1
TERM=xterm
_=/usr/bin/env
__________________________________
So,what is the reason of this problem ?
and what is the solution for this problem ?
--
Mohamed Dawod
Computer Engineering Department
Faculty of Engineering
Cairo University
Did you take care to remove build and source dirs after compile?

Also, make sure the two big seds in gcc pass 1 and pass 2 are
copy/pasted exactly as they are specified in the book.
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http:/
Mohamed Dawod
2018-07-01 14:02:28 UTC
Permalink
YES, I removed the build and source dirs after compile ( I need to know why
this is mandatory ? )

and I made sure that seds in gcc pass1 worked well, I opened the effected
files and noticed the differences between the new files and the original
files as required
BUT.. the only not effected line is that line =(( #define
GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ))
NOTE : my host system is UBUNTU-14.4 LTS
Post by Armin K.
Post by Mohamed Dawod
HI,
I hope that some one can help me..
This is the 8th time i restart LFS building from chapter3 !!
The problem starts to appear in chapter6.7 (Linux-4.12.7 API Headers)
(/tools/bin/gcc file doesnt exist error)
http://archive.linuxfromscratch.org/mail-archives/lfs-
support/2016-February/049686.html <http://archive.linuxfromscrat
ch.org/mail-archives/lfs-support/2016-February/049686.html>
So, I restart from chapter5 and when I reached to section 5.10.
(GCC-7.2.0 - Pass 2) , I tried to check the linking of /tools/bin/gcc
using the command
$readelf -l /tools/bin/cc | grep "interpreter"
[Requesting program interpreter: /lib/ld-linux.so.2]
__________________________________
The path for my lfs usr : $echo $PATH
--The result : /tools/bin:/bin:/usr/bin
__________________________________
The environmental variables for lfs usr : $env|sort
HOME=/home/lfs
LC_ALL=POSIX
LFS=/mnt/lfs
LFS_TGT=i686-lfs-linux-gnu
OLDPWD=/mnt/lfs
PATH=/tools/bin:/bin:/usr/bin
PWD=/home/lfs
SHLVL=1
TERM=xterm
_=/usr/bin/env
__________________________________
So,what is the reason of this problem ?
and what is the solution for this problem ?
--
Mohamed Dawod
Computer Engineering Department
Faculty of Engineering
Cairo University
Did you take care to remove build and source dirs after compile?
Also, make sure the two big seds in gcc pass 1 and pass 2 are copy/pasted
exactly as they are specified in the book.
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style
--
Mohamed Dawod
Computer Engineering Department
Faculty of Engineering
Cairo University
Bruce Dubbs
2018-07-01 17:52:51 UTC
Permalink
Post by Mohamed Dawod
YES, I removed the build and source dirs after compile ( I need to know
why this is mandatory ? )
Because we build packages multiple times and the old source directory is
compromised from the previous build. Deleting and extracting ensures
you start with a clean source directory. A side effect is that it also
saves space on the /mnt/lfs partition.
Post by Mohamed Dawod
and I made sure that seds in gcc pass1 worked well, I opened the
effected files and noticed the differences between the new files and the
original files as required
BUT.. the only not effected line is that line =(( #define
GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ))
NOTE : my host system is UBUNTU-14.4 LTS
I am not sure where you found GLIBC_DYNAMIC_LINKERX32. We do not
mention it in the book or in the patches.

What is the output of "ldd --version | head -n1" on the host system?
Post by Mohamed Dawod
HI,
I hope that some one can help me..
This is the 8th time i restart LFS building from chapter3 !!
The problem starts to appear in chapter6.7 (Linux-4.12.7 API Headers)
(/tools/bin/gcc file doesnt exist error)
http://archive.linuxfromscratch.org/mail-archives/lfs-support/2016-February/049686.html
So, I restart from chapter5 and when I reached to  section 5.10.
(GCC-7.2.0 - Pass 2) , I tried to check the linking of
/tools/bin/gcc   using the command
$readelf -l /tools/bin/cc | grep "interpreter"
[Requesting program interpreter: /lib/ld-linux.so.2]
__________________________________
The path for my lfs usr :  $echo $PATH
--The result :   /tools/bin:/bin:/usr/bin
__________________________________
The environmental variables for lfs usr : $env|sort
HOME=/home/lfs
LC_ALL=POSIX
LFS=/mnt/lfs
LFS_TGT=i686-lfs-linux-gnu
OLDPWD=/mnt/lfs
PATH=/tools/bin:/bin:/usr/bin
PWD=/home/lfs
SHLVL=1
TERM=xterm
_=/usr/bin/env
The above tells me you are building using a 32-bit host OS.
I have not done that for a few years now since I no longer have any
32-bit systems. Perhaps the following may be helpful:

In Section 5.7. Glibc-2.27. does the output of the check in the caution
block give "/tools/lib/ld-linux.so.2"?

In section 5.10. GCC-8.1.0 - Pass 2, does the output of
the check in the caution block give "/tools/lib/ld-linux.so.2"? I see
from the above, tha tit does not, do the problem is before is in the
initial packages. Do not do beyond 5.10 until the output of the above
is correct.

The PS1 variable above is confusing. When you change to the lfs user,
(su - lfs), the startup file .bash_profile should set PS1 to "\u:\w\$ '.
The debian_chroot should not show up in PS1.

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_sty
Ken Moffat
2018-07-01 19:19:13 UTC
Permalink
Post by Mohamed Dawod
and I made sure that seds in gcc pass1 worked well, I opened the
effected files and noticed the differences between the new files and the
original files as required
BUT.. the only not effected line is that line =(( #define
GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ))
NOTE : my host system is UBUNTU-14.4 LTS
I am not sure where you found GLIBC_DYNAMIC_LINKERX32. We do not mention it
in the book or in the patches.
X32 uses the added x86_64 registers with 32-bit pointers, see
wikipedia - X32_ABI. For desktop or server use, probably not worth
the effort - but both the kernel and glibc support it, which is why
it is mentioned in the files.

ĸen
--
Keyboard not found, Press F1 to continue
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/
Pierre Labastie
2018-07-01 19:53:57 UTC
Permalink
Post by Bruce Dubbs
Post by Mohamed Dawod
YES, I removed the build and source dirs after compile ( I need to know why
this is mandatory ? )
Because we build packages multiple times and the old source directory is
compromised from the previous build.  Deleting and extracting ensures you
start with a clean source directory.  A side effect is that it also saves
space on the /mnt/lfs partition.
Post by Mohamed Dawod
and I made sure that seds in gcc pass1 worked well, I opened the effected
files and noticed the differences between the new files and the original
files as required
BUT.. the only not effected line is that line =(( #define
GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ))
NOTE : my host system is UBUNTU-14.4 LTS
I am not sure where you found GLIBC_DYNAMIC_LINKERX32.  We do not mention it
in the book or in the patches.
What is the output of "ldd --version | head -n1" on the host system?
Post by Mohamed Dawod
        HI,
        I hope that some one can help me..
        This is the 8th time i restart LFS building from chapter3 !!
        The problem starts to appear in chapter6.7 (Linux-4.12.7 API
        Headers)
        (/tools/bin/gcc file doesnt exist error)
       
http://archive.linuxfromscratch.org/mail-archives/lfs-support/2016-February/049686.html
        So, I restart from chapter5 and when I reached to  section 5.10.
        (GCC-7.2.0 - Pass 2) , I tried to check the linking of
        /tools/bin/gcc   using the command
        $readelf -l /tools/bin/cc | grep "interpreter"
        [Requesting program interpreter: /lib/ld-linux.so.2]
        __________________________________
        The path for my lfs usr :  $echo $PATH
        --The result :   /tools/bin:/bin:/usr/bin
        __________________________________
        The environmental variables for lfs usr : $env|sort
        HOME=/home/lfs
        LC_ALL=POSIX
        LFS=/mnt/lfs
        LFS_TGT=i686-lfs-linux-gnu
        OLDPWD=/mnt/lfs
        PATH=/tools/bin:/bin:/usr/bin
        PWD=/home/lfs
        SHLVL=1
        TERM=xterm
        _=/usr/bin/env
The above tells me you are building using a 32-bit host OS.
I have not done that for a few years now since I no longer have any 32-bit
In Section 5.7. Glibc-2.27. does the output of the check in the caution block
give "/tools/lib/ld-linux.so.2"?
In section 5.10. GCC-8.1.0 - Pass 2, does the output of
the check in the caution block give "/tools/lib/ld-linux.so.2"?  I see from
the above, tha tit does not, do the problem is before is in the initial
packages.  Do not do beyond 5.10 until the output of the above is correct.
The PS1 variable above is confusing. When you change to the lfs user, (su -
lfs), the startup file .bash_profile should set PS1 to "\u:\w\$ '.  The
debian_chroot should not show up in PS1.
It shows up for me too, even after doing "source .bash_profile". I think
debian sets this in /etc/bash.bashrc, which is executed at startup, according
to "man bash".

Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Post
Bruce Dubbs
2018-07-01 22:35:40 UTC
Permalink
Post by Pierre Labastie
Post by Bruce Dubbs
Post by Mohamed Dawod
YES, I removed the build and source dirs after compile ( I need to know why
this is mandatory ? )
Because we build packages multiple times and the old source directory is
compromised from the previous build.  Deleting and extracting ensures you
start with a clean source directory.  A side effect is that it also saves
space on the /mnt/lfs partition.
Post by Mohamed Dawod
and I made sure that seds in gcc pass1 worked well, I opened the effected
files and noticed the differences between the new files and the original
files as required
BUT.. the only not effected line is that line =(( #define
GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ))
NOTE : my host system is UBUNTU-14.4 LTS
I am not sure where you found GLIBC_DYNAMIC_LINKERX32.  We do not mention it
in the book or in the patches.
What is the output of "ldd --version | head -n1" on the host system?
Post by Mohamed Dawod
        HI,
        I hope that some one can help me..
        This is the 8th time i restart LFS building from chapter3 !!
        The problem starts to appear in chapter6.7 (Linux-4.12.7 API
        Headers)
        (/tools/bin/gcc file doesnt exist error)
http://archive.linuxfromscratch.org/mail-archives/lfs-support/2016-February/049686.html
        So, I restart from chapter5 and when I reached to  section 5.10.
        (GCC-7.2.0 - Pass 2) , I tried to check the linking of
        /tools/bin/gcc   using the command
        $readelf -l /tools/bin/cc | grep "interpreter"
        [Requesting program interpreter: /lib/ld-linux.so.2]
        __________________________________
        The path for my lfs usr :  $echo $PATH
        --The result :   /tools/bin:/bin:/usr/bin
        __________________________________
        The environmental variables for lfs usr : $env|sort
        HOME=/home/lfs
        LC_ALL=POSIX
        LFS=/mnt/lfs
        LFS_TGT=i686-lfs-linux-gnu
        OLDPWD=/mnt/lfs
        PATH=/tools/bin:/bin:/usr/bin
        PWD=/home/lfs
        SHLVL=1
        TERM=xterm
        _=/usr/bin/env
The above tells me you are building using a 32-bit host OS.
I have not done that for a few years now since I no longer have any 32-bit
In Section 5.7. Glibc-2.27. does the output of the check in the caution block
give "/tools/lib/ld-linux.so.2"?
In section 5.10. GCC-8.1.0 - Pass 2, does the output of
the check in the caution block give "/tools/lib/ld-linux.so.2"?  I see from
the above, tha tit does not, do the problem is before is in the initial
packages.  Do not do beyond 5.10 until the output of the above is correct.
The PS1 variable above is confusing. When you change to the lfs user, (su -
lfs), the startup file .bash_profile should set PS1 to "\u:\w\$ '.  The
debian_chroot should not show up in PS1.
It shows up for me too, even after doing "source .bash_profile". I think
debian sets this in /etc/bash.bashrc, which is executed at startup, according
to "man bash".
There is no mention of /etc/bash.bashrc in the bash man pages, only
~/.bashrc.

Checking a Debian system, when we run bash it sources /etc/profile and
on that distro sources /etc/bash.bashrc. I suppose we could add PS1 to
the lfs user .bashrc for consistency.

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wik
Mohamed Dawod
2018-07-14 16:10:08 UTC
Permalink
Post by Bruce Dubbs
What is the output of "ldd --version | head -n1" on the host system?
result : ldd (GNU libc) 2.26



In Section 5.7. Glibc-2.27. does the output of the check in the caution
Post by Bruce Dubbs
block give "/tools/lib/ld-linux.so.2"?
In section 5.10. GCC-8.1.0 - Pass 2, does the output of
the check in the caution block give "/tools/lib/ld-linux.so.2"? I see
from the above, tha tit does not, do the problem is before is in the
initial packages. Do not do beyond 5.10 until the output of the above is
correct.
All checks that are mentioned in the book had passed successfully !!
even the last check in section 5.10 gives the output as in the book!!!


The PS1 variable above is confusing. When you change to the lfs user, (su -
Post by Bruce Dubbs
lfs), the startup file .bash_profile should set PS1 to "\u:\w\$ '. The
debian_chroot should not show up in PS1.
this is my .bash_profile : exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$
' /bin/bash
Post by Bruce Dubbs
Post by Mohamed Dawod
YES, I removed the build and source dirs after compile ( I need to know
why this is mandatory ? )
Because we build packages multiple times and the old source directory is
compromised from the previous build. Deleting and extracting ensures you
start with a clean source directory. A side effect is that it also saves
space on the /mnt/lfs partition.
and I made sure that seds in gcc pass1 worked well, I opened the effected
Post by Mohamed Dawod
files and noticed the differences between the new files and the original
files as required
BUT.. the only not effected line is that line =(( #define
GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ))
NOTE : my host system is UBUNTU-14.4 LTS
I am not sure where you found GLIBC_DYNAMIC_LINKERX32. We do not mention
it in the book or in the patches.
What is the output of "ldd --version | head -n1" on the host system?
Post by Mohamed Dawod
HI,
I hope that some one can help me..
This is the 8th time i restart LFS building from chapter3 !!
The problem starts to appear in chapter6.7 (Linux-4.12.7 API Headers)
(/tools/bin/gcc file doesnt exist error)
http://archive.linuxfromscratch.org/mail-archives/lfs-
support/2016-February/049686.html
So, I restart from chapter5 and when I reached to section 5.10.
(GCC-7.2.0 - Pass 2) , I tried to check the linking of
/tools/bin/gcc using the command
$readelf -l /tools/bin/cc | grep "interpreter"
[Requesting program interpreter: /lib/ld-linux.so.2]
__________________________________
The path for my lfs usr : $echo $PATH
--The result : /tools/bin:/bin:/usr/bin
__________________________________
The environmental variables for lfs usr : $env|sort
HOME=/home/lfs
LC_ALL=POSIX
LFS=/mnt/lfs
LFS_TGT=i686-lfs-linux-gnu
OLDPWD=/mnt/lfs
PATH=/tools/bin:/bin:/usr/bin
PWD=/home/lfs
SHLVL=1
TERM=xterm
_=/usr/bin/env
The above tells me you are building using a 32-bit host OS.
I have not done that for a few years now since I no longer have any 32-bit
In Section 5.7. Glibc-2.27. does the output of the check in the caution
block give "/tools/lib/ld-linux.so.2"?
In section 5.10. GCC-8.1.0 - Pass 2, does the output of
the check in the caution block give "/tools/lib/ld-linux.so.2"? I see
from the above, tha tit does not, do the problem is before is in the
initial packages. Do not do beyond 5.10 until the output of the above is
correct.
The PS1 variable above is confusing. When you change to the lfs user, (su
- lfs), the startup file .bash_profile should set PS1 to "\u:\w\$ '. The
debian_chroot should not show up in PS1.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style
--
Mohamed Dawod
Computer Engineering Department
Faculty of Engineering
Cairo University
Richard Melville
2018-07-02 09:25:34 UTC
Permalink
Post by Bruce Dubbs
Post by Pierre Labastie
It shows up for me too, even after doing "source .bash_profile". I think
debian sets this in /etc/bash.bashrc, which is executed at startup,
according
to "man bash".
There is no mention of /etc/bash.bashrc in the bash man pages, only
~/.bashrc.
From the bash man pages:-
" When an interactive shell that is not a login shell is started, bash
reads and executes commands from /etc/bash.bashrc and ~/.bashrc,
if
these files exist. This may be inhibited by using the --norc
option.
The --rcfile file option will force bash to read and execute
commands
from file instead of /etc/bash.bashrc and ~/.bashrc."

Richard
Bruce Dubbs
2018-07-02 18:27:02 UTC
Permalink
Post by Bruce Dubbs
Post by Bruce Dubbs
Post by Pierre Labastie
It shows up for me too, even after doing "source .bash_profile". I think
debian sets this in /etc/bash.bashrc, which is executed at startup,
according
to "man bash".
There is no mention of /etc/bash.bashrc in the bash man pages, only
~/.bashrc.
From the bash man pages:-
" When an interactive shell that is not a login shell is started, bash
reads and executes commands from /etc/bash.bashrc and ~/.bashrc,
if
these files exist. This may be inhibited by using the --norc
option.
The --rcfile file option will force bash to read and execute
commands
from file instead of /etc/bash.bashrc and ~/.bashrc."
That must be a customized man page, probably by a distro. Mine
reads:

When an interactive shell that is not a login shell is started, bash
reads and executes commands from ~/.bashrc, if that file exists. This
may be inhibited by using the --norc option. The --rcfile file option
will force bash to read and execute commands from file instead of
~/.bashrc.

The point is that *bash* does not read /etc/bash.bashrc by default as
we use it in LFS. My copy of Debian does read it as an include
in /etc/profile.

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki
Bruce Dubbs
2018-07-02 18:39:23 UTC
Permalink
Post by Pierre Labastie
It shows up for me too, even after doing "source .bash_profile". I think
debian sets this in /etc/bash.bashrc, which is executed at
startup, according
to "man bash".
There is no mention of /etc/bash.bashrc in the bash man pages, only
~/.bashrc.
From the bash man pages:-
" When an interactive shell that is not a login shell  is  started,  bash
       reads  and  executes  commands  from /etc/bash.bashrc and
~/.bashrc, if
       these files exist.  This may be inhibited by using the  --norc
option.
       The  --rcfile  file option will force bash to read and execute
commands
       from file instead of /etc/bash.bashrc and ~/.bashrc."
And to comment further:

https://sources.debian.org/src/bash/4.4.18-3/debian/README/

"5. What is /etc/bash.bashrc? It doesn't seem to be documented.

The Debian version of bash is compiled with a special option
(-DSYS_BASHRC) that makes bash read /etc/bash.bashrc before ~/.bashrc
for interactive non-login shells. So, on Debian systems,
/etc/bash.bashrc is to ~/.bashrc as /etc/profile is to
~/.bash_profile."

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wik
Loading...