minimal
minimal copied to clipboard
Build issue on Ubuntu 20.04 - 5.8.0-59-generic
I had add --enable-cet to this section in 04_build_glibc.sh to get it to build.
echo "Configuring glibc."
$GLIBC_SRC/configure
--prefix=
--with-headers=$KERNEL_INSTALLED/include
--without-gd
--without-selinux
--disable-werror
--enable-cet
CFLAGS="$CFLAGS"
Otherwise got "undefined reference to `_dl_cet_check'" and follow on errors. Appears to be same issue as was discussed here. https://stackoverflow.com/questions/58995065/undefined-reference-to-dl-cet-check-while-building-glibc
You should have no problems with the latest and greatest GCC and GLIBC, since the issue has been fixed quite a while ago. Have you tried updating and upgrading all packages? Also, instead of modifying how GLIBC is built, perhaps you'd better add the compiler flag -fcf-protection=none
to CFLAGS
(see here).
Thanks for the response. I had done apt update and apt upgrade as per the instructions, my Ubuntu 20.04 is right up to date. Since then I have rebooted if that would make any difference. I still get the same error if try to build without using --enable-cet . I am not expert in this but I changed CFLAGS="$CFLAGS" to CFLAGS="-fcf-protection=none" in the above 04_build_glibc.sh as echo $CFLAGS returned an empty string in my terminal, not sure if that is how was supposed to do it, but that resulted in the same build error. The .iso built with --enable-cet boots fine. Overall, great project, thanks for making it available.
Take a look at the very end of the .config file. Try to add the flag there, rebuild MLL and let me know if this resolves the issue.
Sorry for the late response. Added -fcf-protection=none to the last line of .config and with --enable-cet commented out, get the same build error. build_error.txt
Feel free to close this if I am the only one hitting this issue, i.e. it is not readily reproducible.
Having the same issue. In my case, I wanted to offload the building process into a docker container. Therefore perfect for reproduction. Used the following Dockerfile:
FROM ubuntu
RUN apt update \
&& apt upgrade -y \
&& apt install -y \
# dependencies for building mll:
wget \
make \
gawk \
gcc \
bc \
bison \
flex \
xorriso \
libelf-dev \
libssl-dev \
# own additions (needed for building mll as well):
xz-utils \
rsync \
python3 \
&& apt autoremove -y \
&& apt clean \
# Set python3 as default - not sure if necessary
&& ln -s /usr/bin/python3 /usr/bin/python
RUN wget http://github.com/ivandavidov/minimal/releases/download/15-Dec-2019/minimal_linux_live_15-Dec-2019_src.tar.xz -O /root/mll.tar.xz \
&& tar xf /root/mll.tar.xz -C /root/ --strip 1 \
&& rm /root/mll.tar.xz
# Inserting additional parameter for building glibc. Known error, which should already be fixed in newer versions, but still seems to exist for me.
# '\ ' escapes the space character, '\\' escapes the backslash character
# This line fixes the issue:
#RUN sed -i '/^ CFLAGS="$CFLAGS"/i \ \ --enable-cet \\' /root/04_build_glibc.sh
WORKDIR /root/
CMD ["./build_minimal_linux_live.sh"]