Skip to content
Permalink
Browse files

build: Updated Docker Linux 64bit image to Qt 5.12.6 and LLVM/Clang 9…

….0.0

* updated to CentOS 7
* removed 32bit image
  • Loading branch information
egraether committed Dec 16, 2019
1 parent bb9c219 commit 3518404a736f5cdb87af620c50c72f478350148d
@@ -1,6 +1,6 @@
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
IMAGE_64: coatisoftware/centos6_64_qt_llvm:qt5101-llvm800
IMAGE_64: coatisoftware/centos7_64_qt_llvm:qt5126-llvm900
IMAGE_32: coatisoftware/centos6_32_qt_llvm:qt5101-llvm800

## Templates ##
@@ -6,6 +6,7 @@ endif()
set(BUILD_CXX_LANGUAGE_PACKAGE OFF CACHE BOOL "Add C and C++ support to the Sourcetrail indexer.")
set(BUILD_JAVA_LANGUAGE_PACKAGE OFF CACHE BOOL "Add Java support to the Sourcetrail indexer.")
set(BUILD_PYTHON_LANGUAGE_PACKAGE OFF CACHE BOOL "Add Python support to the Sourcetrail indexer.")
set(DOCKER_BUILD OFF CACHE BOOL "Build runs in Docker")

#set (CMAKE_VERBOSE_MAKEFILE ON)

@@ -82,6 +83,11 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
ADD_COMPILE_OPTIONS(/MP)
endif()

# FIXME: necessary to fix build in Docker
if (DOCKER_BUILD)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
endif()

# For debugging the release build on linux
#if (UNIX AND "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
#add_definitions(-fno-omit-frame-pointer)
@@ -1,6 +1,6 @@

function(InstallQtModule module qtversion)
get_filename_component(realpath $ENV{QT_DIR}/lib/libQt5${module}.so.${qtversion} REALPATH)
get_filename_component(realpath $ENV{Qt5_DIR}/lib/libQt5${module}.so.${qtversion} REALPATH)
INSTALL(FILES
${realpath}
DESTINATION Sourcetrail/lib
@@ -99,7 +99,7 @@ function(AddSharedToComponent)
GetAndInstallLibrary(libcrypto.so 1)

INSTALL(DIRECTORY
$ENV{QT_DIR}/plugins/platforms
$ENV{Qt5_DIR}/plugins/platforms
DESTINATION Sourcetrail/lib
)

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,36 +1,39 @@
FROM coatisoftware/centos6_64_base
FROM coatisoftware/centos7_64_base

MAINTAINER "Andreas Stallinger" <astallinger@coati.io>
MAINTAINER "Eberhard Graether" <egraether@coati.io>

RUN make --version
RUN cmake --version
RUN mvn --version
RUN ninja --version

WORKDIR /opt

## set env
ARG QVERSION_SHORT=5.10
ARG QTVERSION=5.10.1
ARG QTVERSION_SHORT=5.12
ARG QTVERSION=5.12.6

ENV QT_DIR=/opt/qt${QTVERSION} \
LLVM_DIR=/opt/llvm \
BOOST_DIR=/opt/boost \
LD_LIBRARY_PATH=$QT_DIR/lib/
ENV Qt5_DIR=/opt/qt${QTVERSION} \
Clang_DIR=/opt/llvm \
BOOST_ROOT=/opt/boost \
LD_LIBRARY_PATH=$Qt5_DIR/lib/

# Install Qt
# Qt
RUN mkdir -p /qt && cd /qt && \
wget http://download.qt.io/archive/qt/${QVERSION_SHORT}/${QTVERSION}/\
wget http://download.qt.io/archive/qt/${QTVERSION_SHORT}/${QTVERSION}/\
single/qt-everywhere-src-${QTVERSION}.tar.xz && \
tar xvf qt-everywhere-src-${QTVERSION}.tar.xz && \
ln -sf /opt/rh/devtoolset-6/root/usr/bin/g++ /usr/bin/g++ && \
ln -sf /opt/rh/devtoolset-6/root/usr/bin/c++ /usr/bin/c++ && \
ln -sf /opt/rh/devtoolset-7/root/usr/bin/g++ /usr/bin/g++ && \
ln -sf /opt/rh/devtoolset-7/root/usr/bin/c++ /usr/bin/c++ && \
cd /qt/qt-everywhere-src-${QTVERSION} && \
./configure -v \
-prefix /opt/qt${QTVERSION} \
-skip qtgamepad \
-platform linux-g++ \
#-no-rpath \
-qt-pcre \
-qt-xcb \
-qt-xkbcommon \
-xkbcommon \
-no-pch \
-xkb-config-root /usr/share/X11/xkb \
-no-use-gold-linker \
-release \
-no-compile-examples \
@@ -51,8 +54,8 @@ cd /qt/qt-everywhere-src-${QTVERSION} && \
make -j8 && \
make -j8 install && rm -Rf /qt

## Install llvm
ARG LLVM_VERSION=8.0.0
# LLVM/Clang
ARG LLVM_VERSION=9.0.0
RUN mkdir -p /llvm && cd /llvm && \
wget http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz && \
tar xvf llvm-${LLVM_VERSION}.src.tar.xz && \
@@ -61,7 +64,7 @@ cd tools && \
wget http://llvm.org/releases/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz && \
tar xvf cfe-${LLVM_VERSION}.src.tar.xz && \
. /opt/rh/python27/enable && \
. /opt/rh/devtoolset-6/enable && \
. /opt/rh/devtoolset-7/enable && \
python --version && \
cd /llvm/llvm-${LLVM_VERSION}.src && mkdir -p build && cd build && \
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/llvm/ \
@@ -71,9 +74,9 @@ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/llvm/ \

WORKDIR /opt

## Boost
# Boost
ARG BOOST_MAJOR=1
ARG BOOST_MINOR=68
ARG BOOST_MINOR=67
ARG BOOST_PATCH=0
ENV BOOST_VERSION=${BOOST_MAJOR}.${BOOST_MINOR}.${BOOST_PATCH} \
BOOST_VERSION_UNDERSCORE=${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH}
@@ -84,21 +87,7 @@ tar -xzf boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && cd boost_${BOOST_VERSION_UN
./b2 install cxxstd=14 --link=static --variant=release --threading=multi --runtime-link=static --cxxflags="-std=c++14 -fPIC" && \
cd .. && rm boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && rm boost_${BOOST_VERSION_UNDERSCORE} -r

## Ninja
RUN git clone https://github.com/martine/ninja.git && \
cd ninja && \
git checkout release && \
./configure.py --bootstrap && \
mv ninja /usr/bin/ && \
cd .. && rm -rf ninja

#add user
RUN useradd -u 1000 builder

# Make sure the above SCLs are already enabled
ENTRYPOINT ["/usr/bin/scl", "enable", "python27", "devtoolset-6", "--"]
CMD ["/usr/bin/scl", "enable", "python27", "devtoolset-6", "--", "/bin/bash"]

WORKDIR /home/builder
USER builder

0 comments on commit 3518404

Please sign in to comment.
You can’t perform that action at this time.