Skip to content

Commit

Permalink
fix: update elfutils to 0.190
Browse files Browse the repository at this point in the history
The elfutils version from centos is out of date and sometimes produces
some weird backtraces.
Since it is impossible to remove elfutils without removing the
devtoolset some trickery is required. It is done by first installing
elfutils to /usr/local and later copying that into the devtoolset.
  • Loading branch information
lievenhey committed May 27, 2024
1 parent e1ad131 commit 67e4eb7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/appimage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ RUN sed -i 's#enabled=1#enabled=0#' /etc/yum/pluginconf.d/fastestmirror.conf &&
# kgraphviewer
boost boost-devel graphviz-devel \
# appimages
fuse fuse-libs bzip2 && \
fuse fuse-libs bzip2 \
# elfutils
libmicrohttpd-devel libsqlite3x-devel libarchive-devel && \
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
rm -Rf /var/cache/yum

Expand Down Expand Up @@ -118,13 +120,17 @@ RUN cd /opt && git clone --recursive https://github.com/KDAB/KDDockWidgets.git -
cd KDDockWidgets && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_EXAMPLES=0 -DKDDockWidgets_FRONTENDS="qtwidgets" .. && \
make -j$(nproc) && make install

# build new elfutils version
RUN cd /opt && wget https://sourceware.org/elfutils/ftp/0.190/elfutils-0.190.tar.bz2 && bzip2 -d elfutils-0.190.tar.bz2 && tar -xf elfutils-0.190.tar && cd elfutils-0.190 && ./configure --libdir=/usr/local/lib64 && make && make install

FROM builder AS stripped

WORKDIR /

RUN find /usr -type f -name "*.debug" -exec rm {} \;
RUN find /usr -type f -name "libKF*" -exec strip --strip-all {} \;
RUN find /usr -type f -name "libQt*" -exec strip --strip-all {} \;
RUN find /usr/local/lib -type f -name "lib*" -exec strip --strip-all {} \;

RUN cd /opt && wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage && ./linuxdeploy-x86_64.AppImage --appimage-extract && \
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage && chmod +x linuxdeploy-plugin-qt-x86_64.AppImage && ./linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract && \
Expand All @@ -137,6 +143,7 @@ ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-11/root/usr/lib64:/opt/rh/devtoolset-11/r
ENV PATH=/opt/rh/devtoolset-11/root/usr/bin:/opt/rh/rh-git227/root/usr/bin:/opt/rh/rh-perl530/root/usr/local/bin:/opt/rh/rh-perl530/root/usr/bin${PATH:+:${PATH}}

COPY --from=stripped /usr /usr
COPY --from=stripped /usr/local/lib64 /opt/rh/devtoolset-11/root/lib64

# set the entrypoint to the build script so that the build script will be run by github actions
CMD ["/github/workspace/scripts/appimage/build_appimage.sh", "/github/workspace", "/github/workspace/build"]
Expand Down

0 comments on commit 67e4eb7

Please sign in to comment.