buildroot icon indicating copy to clipboard operation
buildroot copied to clipboard

Autotools binaries in SDK aren't enough for Mono and conflict with system packages

Open akien-mga opened this issue 3 years ago • 3 comments
trafficstars

SDK version: 2021-02-11 on Linux host

Our SDK provides some autotools binaries but not all of them, and this seems to break building Mono:

Relocating the buildroot SDK from /tmp/buildroot/output/host to /root/x86_64-godot-linux-gnu_sdk-buildroot ...

**Error**: You must have `automake' installed to compile Mono.
Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz
(or a newer version if it is available)
Running command 'autogen': /root/mono-6.12.0.177/autogen.sh
'autogen' exited with error code: 1

Deleting the autotools binaries from the SDK solves it and lets the Mono autogen and further steps proceed properly:

rm -f bin/{aclocal*,auto*,libtool*,m4}

We have two potential options:

  • Either we make sure we don't include autotools stuff in the SDK
  • Or we make sure that the autotools stuff we include is complete/works for Mono

I've been doing the former for a while by just deleting the files, so this might be the simplest option.

Steps to reproduce:

ARG img_version
FROM godot-mono:${img_version}

ARG mono_version

ENV GODOT_SDK_LINUX_X86_64=/root/x86_64-godot-linux-gnu_sdk-buildroot
ENV GODOT_SDK_LINUX_X86=/root/i686-godot-linux-gnu_sdk-buildroot
ENV GODOT_SDK_LINUX_ARMHF=/root/arm-godot-linux-gnueabihf_sdk-buildroot
ENV BASE_PATH=${PATH}

RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
    dnf -y install --setopt=install_weak_deps=False \
      libxcrypt-compat yasm && \
    curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
    tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
    rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
    cd x86_64-godot-linux-gnu_sdk-buildroot && \
    ./relocate-sdk.sh && \
    # rm -f bin/{aclocal*,auto*,libtool*,m4} && \
    cd /root && \
    cp -a /root/files/${mono_version} /root && \
    export MONO_SOURCE_ROOT=/root/${mono_version} && \
    cd /root/${mono_version}/godot-mono-builds && \
    export PATH=${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH} && \
    python3 linux.py configure -j --target=x86_64 && \
    python3 linux.py make -j --target=x86_64

(Basically https://github.com/godotengine/build-containers/blob/main/Dockerfile.linux without the ad hoc fix)

akien-mga avatar May 10 '22 17:05 akien-mga

Is this still a problem on 2023.08.x?

hpvb avatar Nov 01 '23 13:11 hpvb

From a very quick test yesterday it seemed to be reproducible yeah.

But I'm fine with us not bothering to solve it, the workaround works fine and we won't need to compile Mono from source for 4.x so it's no longer an issue.

akien-mga avatar Nov 01 '23 14:11 akien-mga

I think this is caused by the "cleanup" script to reduce the size of the SDK tarball. There's a list of files to keep and I think I haven't included everything required to make autotools function. I will try to fix the cleanup script so it keeps autotools functional.

hpvb avatar Dec 12 '23 18:12 hpvb

This should be fixed in 7810288c77e4f0f610aef01f093d052cae848835

hpvb avatar Aug 29 '24 19:08 hpvb