LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS v11.0 binutils 5.2.1 installation fail (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-v11-0-binutils-5-2-1-installation-fail-4175705968/)

TripleDave 01-06-2022 06:46 PM

LFS v11.0 binutils 5.2.1 installation fail
 
Everything completed successfully as per the book until the 'make install -j1' instruction at page 45. I'm doing this as the lfs user however the existing /usr/local/share/ require root to access, hence the Permission denied error. What've I missed?

lfs:/mnt/lfs/sources/binutils-2.37/build$ make install -j1
make[1]: Entering directory '/mnt/lfs/sources/binutils-2.37/build'
/bin/sh ../mkinstalldirs /usr/local /usr/local
make[2]: Entering directory '/mnt/lfs/sources/binutils-2.37/build/bfd'
make install-recursive
make[3]: Entering directory '/mnt/lfs/sources/binutils-2.37/build/bfd'
Making install in doc
make[4]: Entering directory '/mnt/lfs/sources/binutils-2.37/build/bfd/doc'
/bin/mkdir -p '/usr/local/share/info'
/bin/mkdir: cannot create directory '/usr/local/share/info': Permission denied
make[4]: *** [Makefile:826: install-info-am] Error 1
make[4]: Leaving directory '/mnt/lfs/sources/binutils-2.37/build/bfd/doc'
make[3]: *** [Makefile:1643: install-recursive] Error 1
make[3]: Leaving directory '/mnt/lfs/sources/binutils-2.37/build/bfd'
make[2]: *** [Makefile:1751: install] Error 2
make[2]: Leaving directory '/mnt/lfs/sources/binutils-2.37/build/bfd'
make[1]: *** [Makefile:2884: install-bfd] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/binutils-2.37/build'
make: *** [Makefile:2339: install] Error 2

hazel 01-07-2022 05:43 AM

Chapter 5 tools shouldn't be installed into /usr/local but into /$LFS/tools. You must have forgotten the "prefix" option on your build.
Quote:

../configure --prefix=$LFS/tools \
--with-sysroot=$LFS \
--target=$LFS_TGT \
--disable-nls \
--disable-werror
The way configure scripts work is that they always try to install into the /usr/local tree if not told otherwise.

TripleDave 01-07-2022 05:59 PM

Thanks Hazel - you were spot on Sport! I missed the prior ../configure --prefix=$LFS/tools command. I'm doing this build to expand my knowledge of all thing linux and this forum is proving very helpful.


All times are GMT -5. The time now is 08:58 PM.