LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   [SOLVED]Step 5.10 GCC 4.9.2 - No Such File Or Directory (https://www.linuxquestions.org/questions/linux-from-scratch-13/%5Bsolved%5Dstep-5-10-gcc-4-9-2-no-such-file-or-directory-4175548659/)

Jon Wilder 07-22-2015 12:13 PM

[SOLVED]Step 5.10 GCC 4.9.2 - No Such File Or Directory
 
Hi all. New to the forum and primarily run Gentoo as my main distribution, but decided to try my hand at an LFS build. The machine is running Gentoo for the host system and I'm logged in as the lfs user. I have also cd'ed into the /mnt/lfs/sources/gcc-4.9.2 directory.

Machine specs (yes it's an old beater system...just using it as my "guinea pig" home server) -

32-bit system
Via C7 Processor
512MB RAM
Gentoo installed on /dev/sda1
LFS build on /dev/sdb1

On step 5.10 GCC 4.9.2 pass 2, there is a step that states to type -

Code:

lfs@Lean-Server /mnt/lfs/sources/gcc-4.9.2 $ cat gcc/limitx.h gcc/limits.h gcc/limity.h > \
  'dirname $($LFS_TGT-gcc -print-libgcc-file-name)'/include-fixed/limits.h

On my system, executing this returns -

Code:

bash: dirname $($LFS_TGT-gcc -print-libgcc-file-name)/include-fixed/limits.h: No such file or directory
Echo'ing the following environment variables returns -

Code:

lfs@Lean-Server /mnt/lfs/sources/gcc-4.9.2 $ echo $LFS_TGT
i686-lfs-linux-gnu
lfs@Lean-Server /mnt/lfs/sources/gcc-4.9.2 $ echo $LFS
/mnt/lfs

What could be causing this issue?

spiky0011 07-22-2015 12:34 PM

Hi

I would try rebuilding it again, Also copy and paste the commands as there is a mistake it what you posted
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \


gcc/limits.h

Jon Wilder 07-22-2015 12:48 PM

Quote:

Originally Posted by spiky0011 (Post 5394962)
Hi

I would try rebuilding it again, Also copy and paste the commands as there is a mistake it what you posted
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \


gcc/limits.h

Thanks for catching that mistake! I actually typed it exactly as shown.

Now since correcting it, it returns -

Code:

lfs@Lean-Server /mnt/lfs/sources/gcc-4.9.2 $ cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
  'dirname $($LFS_TGT-gcc -print-libgcc-file-name)'/include-fixed/limits.h
bash: dirname $($LFS_TGT-gcc -print-libgcc-file-name)/include-fixed/limits.h: Not a directory

When I echo $($LFS_TGT-gcc -print-libgcc-file-name), it returns -

Code:

lfs@Lean-Server /mnt/lfs/sources/gcc-4.9.2 $ echo $($LFS_TGT-gcc -print-libgcc-file-name)
/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.9.2/libgcc.a

Which clearly is a file and not a directory. Am I on to something or...?

Jon Wilder 07-22-2015 09:47 PM

Nevermind I figured it out. I mistook the back ticks for single quotes. Whoops. Should've had -

Code:

lfs@Lean-Server /mnt/lfs/sources/gcc-4.9.2 $ cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
  `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h

Not

Code:

lfs@Lean-Server /mnt/lfs/sources/gcc-4.9.2 $ cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
  'dirname $($LFS_TGT-gcc -print-libgcc-file-name)'/include-fixed/limits.h

Continuing on...


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