Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
build: Updated Docker Linux 64bit image to Qt 5.12.6 and LLVM/Clang 9…
Browse files Browse the repository at this point in the history
….0.0

* updated to CentOS 7
* removed 32bit image
  • Loading branch information
egraether committed Dec 16, 2019
1 parent 67b803b commit 99cc3d9
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 269 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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 ##
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions cmake/linux_package.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
)

Expand Down
155 changes: 0 additions & 155 deletions deployment/dockerfiles/linux/centos6_32/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions deployment/dockerfiles/linux/centos6_32/README.md

This file was deleted.

40 changes: 0 additions & 40 deletions deployment/dockerfiles/linux/centos6_64_base/Dockerfile

This file was deleted.

22 changes: 0 additions & 22 deletions deployment/dockerfiles/linux/centos6_64_dev/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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 && \
Expand All @@ -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/ \
Expand All @@ -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}
Expand All @@ -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

Loading

0 comments on commit 99cc3d9

Please sign in to comment.