Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issue on Ubuntu 20.04 - 5.8.0-59-generic #236

Open
mjsearle opened this issue Jul 19, 2021 · 5 comments
Open

Build issue on Ubuntu 20.04 - 5.8.0-59-generic #236

mjsearle opened this issue Jul 19, 2021 · 5 comments

Comments

@mjsearle
Copy link

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

@ivandavidov
Copy link
Owner

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).

@mjsearle
Copy link
Author

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.

@ivandavidov
Copy link
Owner

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.

@mjsearle
Copy link
Author

mjsearle commented Jul 26, 2021

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.

@thetillhoff
Copy link

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"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants