LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   x86_64-lfs-linux-gnu-gcc: command not found (https://www.linuxquestions.org/questions/linux-from-scratch-13/x86_64-lfs-linux-gnu-gcc-command-not-found-4175564531/)

federicoponzi 01-20-2016 03:36 PM

x86_64-lfs-linux-gnu-gcc: command not found
 
I'm at chapter 5.7 of LFS. I've got no problems until now, when I tried
Code:

$LFS_TGT-gcc dummy.c
it says:

Code:

x86_64-lfs-linux-gnu-gcc: command not found
Someone has any ideas on why this is happening? Thanks in advance for any help!

Keith Hedger 01-20-2016 05:01 PM

You must have missed a bit, did you do make install?
Is your PATH variablre correct?
It may be easier to start from scratch as you are so near the begining anyway.

federicoponzi 01-21-2016 06:14 AM

Hi and thanks for the answer! Maybe i missed the part where i should have updated my PATH variabile. Where can I find it?

Also it's not the first time that I start again, so I would like to fix instead of repeating. Thanks again!

Keith Hedger 01-21-2016 06:26 AM

PATH should have been set here:
http://www.linuxfromscratch.org/lfs/...vironment.html

cola 01-24-2016 09:20 AM

Quote:

Originally Posted by federicoponzi (Post 5481712)
I'm at chapter 5.7 of LFS. I've got no problems until now, when I tried
Code:

$LFS_TGT-gcc dummy.c
it says:

Code:

x86_64-lfs-linux-gnu-gcc: command not found
Someone has any ideas on why this is happening? Thanks in advance for any help!

Start from here again: http://www.linuxfromscratch.org/lfs/...roduction.html

Vidy 12-06-2018 11:26 AM

Quote:

Originally Posted by cola (Post 5486668)

Hai, when in chapter 4.3. Adding the LFS User, i got missed this command mistakenly (chown -v lfs $LFS/tools) and continuous till 5.7. Glibc-2.27.

When doing this code ($LFS_TGT-gcc dummy.c) gets the same error says (x86_64-lfs-linux-gnu-gcc: command not found). Is this error because what i missed in chapter 4?

If, yes should i do again chapter 4 all over again and chapter 5 from beginning?

Please help, I'm new to Linux. Thank you

KIOPRET 12-06-2018 02:13 PM

You had better start chapter 4 again and note everything you do, I think that you`ve missed something important

Vidy 12-06-2018 09:56 PM

Quote:

Originally Posted by KIOPRET (Post 5934168)
You had better start chapter 4 again and note everything you do, I think that you`ve missed something important

I mean, should I create again LFS as root user all over again?..Because previously I'm already created. Is it possible to do again?

Or should I just do 4.2. Creating the $LFS/tools Directory and 4.4. Setting Up the Environment?

Keith Hedger 12-07-2018 08:44 AM

Once the LFS user is created you dont need to re create it.

spatial dreams 01-15-2019 05:06 AM

LFS 8.8
 
Greetings all,

I've seemingly followed the instructions listed in 4.4-5.7 without a problem, but I'm still getting the same error as the OP.

some proofs:

Code:

lfs@debian:/mnt/lfs/home/lfs$ echo $LFS $LC_ALL $LFS_TGT $PATH
/mnt/lfs POSIX x86_64-lfs-linux-gnu /tools/bin:/bin:/usr/bin

Code:

lfs@debian:/mnt/lfs/sources/gcc-8.2.0/build$ readlink -f /tools
/mnt/lfs/tools

Code:

lfs@debian:/mnt/lfs/home/lfs$ ls /tools/
bin  etc  include  lib  lib64  libexec  sbin  share  var  x86_64-lfs-linux-gnu

Code:

lfs@debian:/mnt/lfs/home/lfs$ ls -l $LFS
total 44
drwxr-xr-x  2 root root 16384 Dec 31  1969 boot
drwxr-xr-x  3 root root  4096 Jan 15 01:29 home
drwx------  2 root root 16384 Jan 14 23:04 lost+found
drwxrwxrwt  6 lfs  lfs  4096 Jan 15 04:43 sources
drwxr-xr-x 11 lfs  lfs  4096 Jan 15 04:55 tools

but I don't have the gnu-gcc bin :/ so clearly I did something wrong.
Code:

lfs@debian:/mnt/lfs/home/lfs$ ls /tools/bin/
catchsegv  localedef      tzselect                        x86_64-lfs-linux-gnu-ld      x86_64-lfs-linux-gnu-size
gencat    makedb        x86_64-lfs-linux-gnu-addr2line  x86_64-lfs-linux-gnu-ld.bfd  x86_64-lfs-linux-gnu-strings
getconf    mtrace        x86_64-lfs-linux-gnu-ar        x86_64-lfs-linux-gnu-nm      x86_64-lfs-linux-gnu-strip
getent    pcprofiledump  x86_64-lfs-linux-gnu-as        x86_64-lfs-linux-gnu-objcopy  xtrace
iconv      pldd          x86_64-lfs-linux-gnu-c++filt    x86_64-lfs-linux-gnu-objdump
ldd        sotruss        x86_64-lfs-linux-gnu-elfedit    x86_64-lfs-linux-gnu-ranlib
locale    sprof          x86_64-lfs-linux-gnu-gprof      x86_64-lfs-linux-gnu-readelf

I'm following LFS 8.3
Have I posted enough information for us to at least speculate where I went wrong?

Thanks,
SD

spatial dreams 01-15-2019 04:37 PM

Huh, apparently I double posted.

Keith Hedger 01-16-2019 09:58 AM

Quote:

Originally Posted by spatial dreams (Post 5949583)
...
I'm following LFS 8.8
...

There is no version 8.8, if this is the 1st time you have tried LFS stick to the STABLE version of the book.

spatial dreams 01-19-2019 06:48 PM

My mistake, that was a typo- I've been following version 8.3

charles_melara 03-04-2019 08:14 PM

Hi, I've been following the LFS too and I've had the same problem with the GCC. Turns out I found this post: https://stackoverflow.com/questions/...e-or-directory
In which the author suggests the following:

Quote:

For Googlers with x86-64 systems:

Code:

ln -sv /tools/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2

It seens to have worked for me. I'm now moving on to section 6.7.
Yet, I think that an explanation for the error we've been experiencing is needed (that I leave for more experienced users).


All times are GMT -5. The time now is 01:41 AM.