From eb2bb75f58a44150ab532a0f4f539b122b8711e5 Mon Sep 17 00:00:00 2001 From: Marcel Pi Date: Tue, 19 Apr 2022 17:06:38 +0200 Subject: [PATCH] Revert "Removed more compiler/linker version requirements." This reverts commit dc64b8344886f0e4c0ee7e7ede463e8c088c788c. --- .travis.yml | 4 ++-- Docs/build_linux.md | 6 +++--- Docs/build_system.md | 2 +- Docs/cont_coding_standard.md | 2 +- Examples/CppClient/Makefile | 4 ++-- Examples/CppClient/README.md | 4 ++-- Util/Docker/Prerequisites.Dockerfile | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index fa1d0360e..b04f14b21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,8 @@ matrix: - ubuntu-toolchain-r-test - llvm-toolchain-xenial-8 packages: - - g++ # we need this one for the libstdc++. - - clang + - g++-7 # we need this one for the libstdc++. + - clang-8 - ninja-build - python - python-pip diff --git a/Docs/build_linux.md b/Docs/build_linux.md index f7f63a9da..abc333f57 100644 --- a/Docs/build_linux.md +++ b/Docs/build_linux.md @@ -51,17 +51,17 @@ sudo apt-get update __Ubuntu 18.04__. ```sh -sudo apt-get install build-essential clang lld g++ cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git +sudo apt-get install build-essential clang-8 lld-8 g++-7 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git ``` __Previous Ubuntu__ versions. ```sh -sudo apt-get install build-essential clang lld g++ cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng16-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git +sudo apt-get install build-essential clang-8 lld-8 g++-7 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng16-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git ``` __All Ubuntu systems__. -To avoid compatibility issues between Unreal Engine and the CARLA dependencies, use the same compiler version and C++ runtime library to compile everything. The CARLA team uses clang and LLVM's libc++. Change the default clang version to compile Unreal Engine and the CARLA dependencies. +To avoid compatibility issues between Unreal Engine and the CARLA dependencies, use the same compiler version and C++ runtime library to compile everything. The CARLA team uses clang-8 and LLVM's libc++. Change the default clang version to compile Unreal Engine and the CARLA dependencies. ```sh sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ && diff --git a/Docs/build_system.md b/Docs/build_system.md index caee93490..af4e68a77 100644 --- a/Docs/build_system.md +++ b/Docs/build_system.md @@ -15,7 +15,7 @@ The goal is to be able to call Unreal Engine's functions from a separate Python ![modules](img/build_modules.jpg) -In Linux, we compile CARLA and all the dependencies with clang.0 and C++14 standard. We however link against different runtime C++ libraries depending on where the code going to be used, since all the code that is going to be linked with Unreal Engine needs to be compiled using `libc++`. +In Linux, we compile CARLA and all the dependencies with clang-8.0 and C++14 standard. We however link against different runtime C++ libraries depending on where the code going to be used, since all the code that is going to be linked with Unreal Engine needs to be compiled using `libc++`. --- ## Setup diff --git a/Docs/cont_coding_standard.md b/Docs/cont_coding_standard.md index e23631221..5c6e04d1f 100644 --- a/Docs/cont_coding_standard.md +++ b/Docs/cont_coding_standard.md @@ -29,7 +29,7 @@ * Comments should not exceed 80 columns, code may exceed this limit a bit in rare occasions if it results in clearer code. * Compilation should not give any error or warning - (`clang++ -Wall -Wextra -std=C++14 -Wno-missing-braces`). + (`clang++-8 -Wall -Wextra -std=C++14 -Wno-missing-braces`). * The use of `throw` is forbidden, use `carla::throw_exception` instead. * Unreal C++ code (CarlaUE4 and Carla plugin) follow the [Unreal Engine's Coding Standard][ue4link] with the exception of using diff --git a/Examples/CppClient/Makefile b/Examples/CppClient/Makefile index 927dc45b9..05713a94c 100644 --- a/Examples/CppClient/Makefile +++ b/Examples/CppClient/Makefile @@ -4,8 +4,8 @@ BINDIR=$(CURDIR)/bin INSTALLDIR=$(CURDIR)/libcarla-install TOOLCHAIN=$(CURDIR)/ToolChain.cmake -CC=/usr/bin/gcc -CXX=/usr/bin/g++ +CC=/usr/bin/gcc-7 +CXX=/usr/bin/g++-7 CXXFLAGS=-std=c++14 -pthread -fPIC -O3 -DNDEBUG -Werror -Wall -Wextra define log diff --git a/Examples/CppClient/README.md b/Examples/CppClient/README.md index c72797949..d2e0db61e 100644 --- a/Examples/CppClient/README.md +++ b/Examples/CppClient/README.md @@ -24,8 +24,8 @@ want ```cmake # Example ToolChain.cmake -set(CMAKE_C_COMPILER /usr/bin/clang) -set(CMAKE_CXX_COMPILER /usr/bin/clang++) +set(CMAKE_C_COMPILER /usr/bin/clang-8) +set(CMAKE_CXX_COMPILER /usr/bin/clang++-8) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O3 -DNDEBUG" CACHE STRING "" FORCE) ``` diff --git a/Util/Docker/Prerequisites.Dockerfile b/Util/Docker/Prerequisites.Dockerfile index e5a8217b1..7cd781167 100644 --- a/Util/Docker/Prerequisites.Dockerfile +++ b/Util/Docker/Prerequisites.Dockerfile @@ -12,9 +12,9 @@ RUN apt-get update ; \ apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" && \ apt-get update ; \ apt-get install -y build-essential \ - clang \ - lld \ - g++ \ + clang-8 \ + lld-8 \ + g++-7 \ cmake \ ninja-build \ libvulkan1 \