Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


Hi *,

as briefly talked about in a FOSDEM lightning talk, we managed to get
-m32 cross builds on master going for CentOS with devtoolset-7.

There's an existing setup for CentOS6 (Dockerfile attached) with a
number of ugly hacks; I'm working on a CentOS7 setup that looks much
cleaner, but suffers from one killer bug: a missing
devtoolset-7-libstdc++-devel.i686 package.

This is reported for upstream CentOS already here:
https://bugs.centos.org/view.php?id=15452

Does anybody have good suggestions how to get that fixed (whom to
lobby, whether to roll a custom package via COPR like mlampe did for
CentOS6, or anything else)?

Cheers,

-- Thorsten
# Dockerfile - this is for LibreOffice >=6.2 32bit
FROM centos:centos6

# basic setup & packages
RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
# update first, to prevent SSL issues below - touch is due to 
https://bugzilla.redhat.com/show_bug.cgi?id=1213602
RUN touch /var/lib/rpm/* && yum -y update
# pull in more build prerequisite repos
# devtoolset-7: need both repos for 64-bit compiler and 32-bit library/headers
RUN cd /etc/yum.repos.d && \
    curl -sLO 
http://download.opensuse.org/repositories/home:/fstrba:/LibreOffice/CentOS_6/home:fstrba:LibreOffice.repo
 && \
    curl -sLO 
https://copr.fedorainfracloud.org/coprs/mlampe/devtoolset-7/repo/epel-6/mlampe-devtoolset-7-epel-6.repo
 && \
    sed -e 's/\[mlampe-devtoolset-7\]/\[mlampe-devtoolset-7-32bit\]/' -e 's/$basearch/i386/' < 
mlampe-devtoolset-7-epel-6.repo > mlampe-devtoolset-7-epel-6-32bit.repo
# get build prereqs - touch is due to https://bugzilla.redhat.com/show_bug.cgi?id=1213602
RUN touch /var/lib/rpm/* && yum -y install fakeroot automake bison ccache dpkg dpkg-devel doxygen 
git devtoolset-7-gcc-c++ devtoolset-7-make gettext perl-Archive-Zip rpm-build zip screen tar nasm 
glibc-devel devtoolset-7-libstdc++-devel autoconf268 \
gnome-vfs2-devel.i686 cups-devel.i686 libffi-devel.i686 gstreamer-devel.i686 
gstreamer-plugins-base-devel.i686 gtk2-devel.i686 kdelibs-devel.i686 avahi-devel.i686 
devtoolset-7-libstdc++-devel.i686 glibc-devel.i686 zlib-devel.i686 fontconfig-devel.i686 
freetype-devel.i686 krb5-devel.i686 libcom_err-devel.i686 openssl-devel.i686 libICE-devel.i686 
libSM-devel.i686 libXrender-devel.i686 libXau-devel.i686 dbus-glib-devel.i686 dbus-devel.i686 
glib2-devel.i686 pango-devel.i686 cairo-devel.i686 pixman-devel.i686 libpng-devel.i686 
gdk-pixbuf2-devel.i686 atk-devel.i686 libxml2-devel.i686 mesa-libGL-devel.i686 qt-devel.i686 
libX11-devel.i686 libxcb-devel.i686

# 32-bit JDK is only in 32-bit CentOS because it's not parallel-installable with 64-bit JDK
RUN sed -e 's/\[\(.*\)\]/\[\1-32\]/' -e 's/$basearch/i386/' < /etc/yum.repos.d/CentOS-Base.repo > 
/etc/yum.repos.d/CentOS-Base-32.repo && yum -y install java-1.7.0-openjdk-devel.i686 
java-1.7.0-openjdk.i686

# std UID for builder user (for easier sharing on the host side)
RUN useradd -m -o -u 9001 -s /bin/bash builder

# self-built stuff, needed for versions >= LibO-5.3
RUN curl -sLO https://ftp.gnome.org/pub/gnome/sources/glib/2.50/glib-2.50.3.tar.xz && \
    cd /home/builder && \
    linux32 su - -c "tar -xf /glib-2.50.3.tar.xz ; cd glib-2.50.3 ; 
PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/share/pkgconfig 
CC=\"/opt/rh/devtoolset-7/root/usr/bin/gcc -m32\" ./configure --disable-libmount 
--with-pcre=internal --prefix=/home/builder/gst10-deps ; make -j3; make install" builder && \
    rm -rf glib-2.50.3 /glib-2.50.3.tar.xz

# get a newer gperf (for LibreOffice 6.2 on)
RUN curl -sLO https://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz && \
    cd /home/builder && \
    su - -c "tar -xf /gperf-3.1.tar.gz ; cd gperf-3.1 ; ./configure --prefix /home/builder/deps 
CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ ; make -j3; make 
install" builder && \
    rm -rf gperf-3.1 /gperf-3.1.tar.gz

# get a newer flex (for LibreOffice 6.2 on)
RUN curl -sLO https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz && \
    cd /home/builder && \
    su - -c "tar -xf /flex-2.6.4.tar.gz ; cd flex-2.6.4 ; ./configure --prefix /home/builder/deps 
CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CC_FOR_BUILD=/opt/rh/devtoolset-7/root/usr/bin/gcc ; make 
-j3; make install" builder && \
    rm -rf flex-2.6.4 /flex-flex-2.6.4.tar.gz

# self-built stuff, needed for versions >= LibO-5.3
RUN curl -sLO https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.8.3.tar.xz && \
    cd /home/builder && \
    linux32 su - -c "tar -xf /gstreamer-1.8.3.tar.xz ; cd gstreamer-1.8.3 ; 
PATH="/home/builder/deps/bin:${PATH}" CC=\"/opt/rh/devtoolset-7/root/usr/bin/gcc -m32\" 
PKG_CONFIG_PATH=/home/builder/gst10-deps/lib/pkgconfig ./configure  
--prefix=/home/builder/gst10-deps ; make -j3; make install" builder && \
    rm -rf gstreamer-1.8.3 /gstreamer-1.8.3.tar.xz
RUN curl -sLO https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.8.3.tar.xz 
&& \
    cd /home/builder && \
    linux32 su - -c "tar -xf /gst-plugins-base-1.8.3.tar.xz ; cd gst-plugins-base-1.8.3 ; 
CC=\"/opt/rh/devtoolset-7/root/usr/bin/gcc -m32\" 
PKG_CONFIG_PATH=/home/builder/gst10-deps/lib/pkgconfig ./configure  
--prefix=/home/builder/gst10-deps ; make -j3; make install" builder && \
    rm -rf gst-plugins-base-1.8.3 /gst-plugins-base-1.8.3.tar.xz

# libnumbertext requires newer autoconf
RUN ln -s /usr/bin/autoreconf268 /home/builder/deps/bin/autoreconf

# static setup, and prebuilt tools
COPY apache-ant-1.9.8-bin.tar.bz2 /home/builder/
RUN cd /home/builder && tar -xf apache-ant-1.9.8-bin.tar.bz2
COPY junit-4.10.jar /home/builder/
COPY qt.patch /
RUN patch -p0 < /qt.patch

# env vars used during build
ENV CC "/opt/rh/devtoolset-7/root/usr/bin/gcc -m32"
ENV CXX "/opt/rh/devtoolset-7/root/usr/bin/g++ -m32"
ENV PKG_CONFIG_LIBDIR "/usr/lib/pkgconfig:/usr/share/pkgconfig"
ENV GSTREAMER_1_0_CFLAGS "-pthread -I/home/builder/gst10-deps/include/gstreamer-1.0 
-I/home/builder/gst10-deps/lib/gstreamer-1.0/include -I/home/builder/gst10-deps/include/glib-2.0 
-I/home/builder/gst10-deps/lib/glib-2.0/include"
ENV GSTREAMER_1_0_LIBS "-L/home/builder/gst10-deps/lib -lgstpbutils-1.0 -lgstvideo-1.0 
-lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0"
ENV PATH "/home/builder/deps/bin:${PATH}"

ENV CCACHE_DIR /cache

USER builder

Attachment: signature.asc
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.