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

Commit 3518404

Browse files
committed
build: Updated Docker Linux 64bit image to Qt 5.12.6 and LLVM/Clang 9.0.0
* updated to CentOS 7 * removed 32bit image
1 parent bb9c219 commit 3518404

File tree

12 files changed

+86
-269
lines changed

12 files changed

+86
-269
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
variables:
22
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
3-
IMAGE_64: coatisoftware/centos6_64_qt_llvm:qt5101-llvm800
3+
IMAGE_64: coatisoftware/centos7_64_qt_llvm:qt5126-llvm900
44
IMAGE_32: coatisoftware/centos6_32_qt_llvm:qt5101-llvm800
55

66
## Templates ##

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ endif()
66
set(BUILD_CXX_LANGUAGE_PACKAGE OFF CACHE BOOL "Add C and C++ support to the Sourcetrail indexer.")
77
set(BUILD_JAVA_LANGUAGE_PACKAGE OFF CACHE BOOL "Add Java support to the Sourcetrail indexer.")
88
set(BUILD_PYTHON_LANGUAGE_PACKAGE OFF CACHE BOOL "Add Python support to the Sourcetrail indexer.")
9+
set(DOCKER_BUILD OFF CACHE BOOL "Build runs in Docker")
910

1011
#set (CMAKE_VERBOSE_MAKEFILE ON)
1112

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

86+
# FIXME: necessary to fix build in Docker
87+
if (DOCKER_BUILD)
88+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
89+
endif()
90+
8591
# For debugging the release build on linux
8692
#if (UNIX AND "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
8793
#add_definitions(-fno-omit-frame-pointer)

cmake/linux_package.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

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

101101
INSTALL(DIRECTORY
102-
$ENV{QT_DIR}/plugins/platforms
102+
$ENV{Qt5_DIR}/plugins/platforms
103103
DESTINATION Sourcetrail/lib
104104
)
105105

deployment/dockerfiles/linux/centos6_32/Dockerfile

Lines changed: 0 additions & 155 deletions
This file was deleted.

deployment/dockerfiles/linux/centos6_32/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

deployment/dockerfiles/linux/centos6_64_base/Dockerfile

Lines changed: 0 additions & 40 deletions
This file was deleted.

deployment/dockerfiles/linux/centos6_64_dev/Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
1-
FROM coatisoftware/centos6_64_base
1+
FROM coatisoftware/centos7_64_base
22

3-
MAINTAINER "Andreas Stallinger" <[email protected]>
3+
MAINTAINER "Eberhard Graether" <[email protected]>
4+
5+
RUN make --version
6+
RUN cmake --version
7+
RUN mvn --version
8+
RUN ninja --version
49

510
WORKDIR /opt
611

712
## set env
8-
ARG QVERSION_SHORT=5.10
9-
ARG QTVERSION=5.10.1
13+
ARG QTVERSION_SHORT=5.12
14+
ARG QTVERSION=5.12.6
1015

11-
ENV QT_DIR=/opt/qt${QTVERSION} \
12-
LLVM_DIR=/opt/llvm \
13-
BOOST_DIR=/opt/boost \
14-
LD_LIBRARY_PATH=$QT_DIR/lib/
16+
ENV Qt5_DIR=/opt/qt${QTVERSION} \
17+
Clang_DIR=/opt/llvm \
18+
BOOST_ROOT=/opt/boost \
19+
LD_LIBRARY_PATH=$Qt5_DIR/lib/
1520

16-
# Install Qt
21+
# Qt
1722
RUN mkdir -p /qt && cd /qt && \
18-
wget http://download.qt.io/archive/qt/${QVERSION_SHORT}/${QTVERSION}/\
23+
wget http://download.qt.io/archive/qt/${QTVERSION_SHORT}/${QTVERSION}/\
1924
single/qt-everywhere-src-${QTVERSION}.tar.xz && \
2025
tar xvf qt-everywhere-src-${QTVERSION}.tar.xz && \
21-
ln -sf /opt/rh/devtoolset-6/root/usr/bin/g++ /usr/bin/g++ && \
22-
ln -sf /opt/rh/devtoolset-6/root/usr/bin/c++ /usr/bin/c++ && \
26+
ln -sf /opt/rh/devtoolset-7/root/usr/bin/g++ /usr/bin/g++ && \
27+
ln -sf /opt/rh/devtoolset-7/root/usr/bin/c++ /usr/bin/c++ && \
2328
cd /qt/qt-everywhere-src-${QTVERSION} && \
2429
./configure -v \
2530
-prefix /opt/qt${QTVERSION} \
2631
-skip qtgamepad \
2732
-platform linux-g++ \
28-
#-no-rpath \
2933
-qt-pcre \
3034
-qt-xcb \
31-
-qt-xkbcommon \
35+
-xkbcommon \
3236
-no-pch \
33-
-xkb-config-root /usr/share/X11/xkb \
3437
-no-use-gold-linker \
3538
-release \
3639
-no-compile-examples \
@@ -51,8 +54,8 @@ cd /qt/qt-everywhere-src-${QTVERSION} && \
5154
make -j8 && \
5255
make -j8 install && rm -Rf /qt
5356

54-
## Install llvm
55-
ARG LLVM_VERSION=8.0.0
57+
# LLVM/Clang
58+
ARG LLVM_VERSION=9.0.0
5659
RUN mkdir -p /llvm && cd /llvm && \
5760
wget http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz && \
5861
tar xvf llvm-${LLVM_VERSION}.src.tar.xz && \
@@ -61,7 +64,7 @@ cd tools && \
6164
wget http://llvm.org/releases/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz && \
6265
tar xvf cfe-${LLVM_VERSION}.src.tar.xz && \
6366
. /opt/rh/python27/enable && \
64-
. /opt/rh/devtoolset-6/enable && \
67+
. /opt/rh/devtoolset-7/enable && \
6568
python --version && \
6669
cd /llvm/llvm-${LLVM_VERSION}.src && mkdir -p build && cd build && \
6770
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/llvm/ \
@@ -71,9 +74,9 @@ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/llvm/ \
7174

7275
WORKDIR /opt
7376

74-
## Boost
77+
# Boost
7578
ARG BOOST_MAJOR=1
76-
ARG BOOST_MINOR=68
79+
ARG BOOST_MINOR=67
7780
ARG BOOST_PATCH=0
7881
ENV BOOST_VERSION=${BOOST_MAJOR}.${BOOST_MINOR}.${BOOST_PATCH} \
7982
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
8487
./b2 install cxxstd=14 --link=static --variant=release --threading=multi --runtime-link=static --cxxflags="-std=c++14 -fPIC" && \
8588
cd .. && rm boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && rm boost_${BOOST_VERSION_UNDERSCORE} -r
8689

87-
## Ninja
88-
RUN git clone https://github.com/martine/ninja.git && \
89-
cd ninja && \
90-
git checkout release && \
91-
./configure.py --bootstrap && \
92-
mv ninja /usr/bin/ && \
93-
cd .. && rm -rf ninja
94-
9590
#add user
9691
RUN useradd -u 1000 builder
97-
98-
# Make sure the above SCLs are already enabled
99-
ENTRYPOINT ["/usr/bin/scl", "enable", "python27", "devtoolset-6", "--"]
100-
CMD ["/usr/bin/scl", "enable", "python27", "devtoolset-6", "--", "/bin/bash"]
101-
10292
WORKDIR /home/builder
10393
USER builder
104-
File renamed without changes.

0 commit comments

Comments
 (0)