Compiled Something

It wasn’t that bad to try to pick up where I left off in Linux From Scratch.

I had a procedure written out for Ch. 5.2, with handwritten questions and corrections. It took maybe two hours to go over it with Google AI Mode.

I checked some things on the Noble Numbat, typed everything up, noted that the AI’s rendition of my procedure was actually better as simpler and more direct. When it came time to actually do it the next day (it took about five minutes), I used the AI’s as less cluttered, and I saw I could use it as a template for the next 22 programs to compile.

However, here was mine:

5.2 Binutils-2.44 Pass 1 – Cross Binutils

“This package supplies a linker, an assembler, and other tools for handling object files. The programs in this package are needed to compile most of the packages in an LFS system.”

1. Log in as lfs user

su – lfs

2. Change to /mnt/lfs/sources directory

cd $LFS/sources

3. Extract package with tar

tar –xJf binutils-2.44.tar.xz

-x Extract

-J Use xz compression

-f file

4. Change to the directory created when the package was extracted

cd binutils-2.44

5. Make a build directoy

mkdir -v build

cd build

6. Configure (and make with one core and install) all in one command with tee

../configure –prefix=$LFS/tools –with-sysroot=$LFS –target=$LFS_TGT –disable-nls –enable-gprofng=no –disable-werror –enable-new-dtags –enable-default-hash-style=gnu && make -j1 && make install 2>&1 | tee binutilscommand.txt

7. Look at log.

tail -n 20 binutilscommand.txt

Looking for: make[1]: Leaving directory ‘/mnt/lfs/sources/binultils-2.44/build’

Also look for new files in $LFS/tools/bin

Then copy log from build

cp binutilscommand.txt $LFS/sources

8. Change back to the sources directory when the build is complete

cd $LFS/sources

9. Delete the extracted directory

rm -rfv binutils-2.44