gettext and texinfo are failing

This commit is contained in:
Denis Benato 2024-12-08 03:47:12 +01:00
parent 7d7e7eb0fc
commit ce0af65a6d

191
build.sh
View file

@ -440,6 +440,7 @@ export READELF="$LFS_TGT-readelf"
# remove hardening options for building libraries
export CFLAGS="-U_FORTIFY_SOURCE -O2 -L$LFS_TOOLS/lib -L$LFS/usr/lib -I$LFS_TOOLS/include -I$LFS_TOOLS/$LFS_TGT/include"
export CPPFLAGS="-U_FORTIFY_SOURCE -O2 -L$LFS_TOOLS/lib -L$LFS/usr/lib -I$LFS_TOOLS/include -I$LFS_TOOLS/$LFS_TGT/include -I$LFS_TOOLS/$LFS_TGT/include/c++/14.2.0/ -I$LFS_TOOLS/$LFS_TGT/include/c++/14.2.0/$LFS_TGT"
export LDFLAGS="-L$LFS/usr/lib -L$LFS_TOOLS/lib"
export LD_LIBRARY_PATH_old="$LD_LIBRARY_PATH"
unset LD_LIBRARY_PATH
@ -763,6 +764,8 @@ if [ ! -f "$STEPS_DIR/gawk" ]; then
make -j 32
make -j 32 install
"$STRIP" --strip-unneeded "$LFS/bin/gawk"
cd "$BASE_DIR"
rm -rf "$STEPS_DIR/gawk"
@ -790,6 +793,8 @@ if [ ! -f "$STEPS_DIR/grep" ]; then
make -j 32
make -j 32 install
"$STRIP" --strip-unneeded "$LFS/bin/grep"
cd "$BASE_DIR"
rm -rf "$LFS_BUILD/grep"
touch "$STEPS_DIR/grep"
@ -815,8 +820,10 @@ if [ ! -f "$STEPS_DIR/gzip" ]; then
make -j 32
make -j 32 install
cd "$BASE_DIR"
"$STRIP" --strip-unneeded "$LFS/bin/gzip"
cd "$BASE_DIR"
rm -rf "$LFS_BUILD/gzip"
touch "$STEPS_DIR/gzip"
fi
@ -841,7 +848,7 @@ if [ ! -f "$STEPS_DIR/make" ]; then
make -j 32 install
cd "$BASE_DIR"
rm -rf "$LFS_BUILD/make"
touch "$STEPS_DIR/make"
fi
@ -871,39 +878,159 @@ if [ ! -f "$STEPS_DIR/libiconv" ]; then
make -j 32 DESTDIR="$LFS" install
cd "$BASE_DIR"
rm -rf "$LFS_BUILD/libiconv"
touch "$STEPS_DIR/libiconv"
fi
## build gettext
#if [ ! -f "$STEPS_DIR/gettext" ]; then
# if [ ! -d "$LFS_BUILD/gettext" ]; then
# tar -xf "$BASE_DIR/sources/gettext-0.23.tar.gz"
# mv "gettext-0.23" "$LFS_BUILD/gettext"
# fi
# cd "$LFS_BUILD/gettext"
#
# EMACS="no" autoreconf -fi
#
# mkdir -vp build
# cd build
#
# EMACS="no" "../configure" \
# --prefix=$LFS \
# --host=${LFS_TGT} \
# --build=${BUILD_MACHINE_TRIPLET} \
# --disable-shared \
# --libdir=$LFS/usr/lib \
# --cache-file=config.cache
#
#
# make -j 32
# make -j 32 install
#
# cd "$BASE_DIR"
#
# touch "$STEPS_DIR/gettext"
#fi
# build patch
if [ ! -f "$STEPS_DIR/patch" ]; then
if [ ! -d "$LFS_BUILD/patch" ]; then
tar -xf "$BASE_DIR/sources/patch-2.7.6.tar.gz"
mv "patch-2.7.6" "$LFS_BUILD/patch"
fi
cd "$LFS_BUILD/patch"
mkdir -vp build
cd build
"../configure" \
--prefix=$LFS/usr \
--host=${LFS_TGT} \
--build=${BUILD_MACHINE_TRIPLET} \
--cache-file=config.cache
make -j 32
make -j 32 DESTDIR="$LFS" install
cd "$BASE_DIR"
rm -rf "$LFS_BUILD/patch"
touch "$STEPS_DIR/patch"
fi
# build sed
if [ ! -f "$STEPS_DIR/sed" ]; then
if [ ! -d "$LFS_BUILD/sed" ]; then
tar -xf "$BASE_DIR/sources/sed-4.9.tar.xz"
mv "sed-4.9" "$LFS_BUILD/sed"
fi
cd "$LFS_BUILD/sed"
mkdir -vp build
cd build
"../configure" \
--prefix=$LFS \
--host=${LFS_TGT} \
--build=${BUILD_MACHINE_TRIPLET} \
--cache-file=config.cache
make -j 32 install
cd "$BASE_DIR"
rm -rf "$LFS_BUILD/sed"
touch "$STEPS_DIR/sed"
fi
# build tar
if [ ! -f "$STEPS_DIR/tar" ]; then
if [ ! -d "$LFS_BUILD/tar" ]; then
tar -xf "$BASE_DIR/sources/tar-1.35.tar.xz"
mv "tar-1.35" "$LFS_BUILD/tar"
fi
cd "$LFS_BUILD/tar"
export LDFLAGS_old="$LDFLAGS"
export LDFLAGS="$LDFLAGS -liconv"
mkdir -vp build
cd build
# cat > config.cache << EOF
#gl_cv_func_wcwidth_works=yes
#gl_cv_func_btowc_eof=yes
#ac_cv_func_malloc_0_nonnull=yes
#gl_cv_func_mbrtowc_incomplete_state=yes
#gl_cv_func_mbrtowc_nul_retval=yes
#gl_cv_func_mbrtowc_null_arg1=yes
#gl_cv_func_mbrtowc_null_arg2=yes
#gl_cv_func_mbrtowc_retval=yes
#gl_cv_func_wcrtomb_retval=yes
#EOF
"../configure" \
--prefix=$LFS \
--host=${LFS_TGT} \
--build=${BUILD_MACHINE_TRIPLET} \
--cache-file=config.cache
make -j 32
make -j 32 install
"$LFS_TGT-strip" --strip-unneeded $LFS/bin/tar
cd "$BASE_DIR"
rm -rf "$LFS_BUILD/tar"
touch "$STEPS_DIR/tar"
fi
# build gettext
if [ ! -f "$STEPS_DIR/gettext" ]; then
if [ ! -d "$LFS_BUILD/gettext" ]; then
tar -xf "$BASE_DIR/sources/gettext-0.23.tar.gz"
mv "gettext-0.23" "$LFS_BUILD/gettext"
fi
cd "$LFS_BUILD/gettext"
EMACS="no" autoreconf -fi
mkdir -vp build
cd build
EMACS="no" "../configure" \
--prefix=$LFS \
--host=${LFS_TGT} \
--build=${BUILD_MACHINE_TRIPLET} \
--disable-shared \
--libdir=$LFS/usr/lib \
--cache-file=config.cache
make -j 32
make -j 32 install
cd "$BASE_DIR"
touch "$STEPS_DIR/gettext"
fi
# build texinfo
if [ ! -f "$STEPS_DIR/texinfo" ]; then
if [ ! -d "$LFS_BUILD/texinfo" ]; then
tar -xf "$BASE_DIR/sources/texinfo-7.1.1.tar.xz"
mv "texinfo-7.1.1" "$LFS_BUILD/texinfo"
fi
cd "$LFS_BUILD/texinfo"
mkdir -vp build
cd build
PERL=/usr/bin/perl \
"../configure" \
--prefix=$LFS \
--host=${LFS_TGT} \
--build=${BUILD_MACHINE_TRIPLET} \
--cache-file=config.cache
#make -j 32
make -j 32 DESTDIR="$LFS" install
cd "$BASE_DIR"
touch "$STEPS_DIR/texinfo"
fi
#"$LFS_TGT-strip" --strip-unneeded $LFS/bin/*