Revert "Removed more compiler/linker version requirements."
This reverts commit dc64b83448
.
This commit is contained in:
parent
7e6ac6a679
commit
eb2bb75f58
|
@ -15,8 +15,8 @@ matrix:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-xenial-8
|
- llvm-toolchain-xenial-8
|
||||||
packages:
|
packages:
|
||||||
- g++ # we need this one for the libstdc++.
|
- g++-7 # we need this one for the libstdc++.
|
||||||
- clang
|
- clang-8
|
||||||
- ninja-build
|
- ninja-build
|
||||||
- python
|
- python
|
||||||
- python-pip
|
- python-pip
|
||||||
|
|
|
@ -51,17 +51,17 @@ sudo apt-get update
|
||||||
__Ubuntu 18.04__.
|
__Ubuntu 18.04__.
|
||||||
|
|
||||||
```sh
|
```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.
|
__Previous Ubuntu__ versions.
|
||||||
|
|
||||||
```sh
|
```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__.
|
__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
|
```sh
|
||||||
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ &&
|
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ &&
|
||||||
|
|
|
@ -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)
|
![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
|
## Setup
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
* Comments should not exceed 80 columns, code may exceed this limit a bit in
|
* Comments should not exceed 80 columns, code may exceed this limit a bit in
|
||||||
rare occasions if it results in clearer code.
|
rare occasions if it results in clearer code.
|
||||||
* Compilation should not give any error or warning
|
* 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.
|
* The use of `throw` is forbidden, use `carla::throw_exception` instead.
|
||||||
* Unreal C++ code (CarlaUE4 and Carla plugin) follow the
|
* Unreal C++ code (CarlaUE4 and Carla plugin) follow the
|
||||||
[Unreal Engine's Coding Standard][ue4link] with the exception of using
|
[Unreal Engine's Coding Standard][ue4link] with the exception of using
|
||||||
|
|
|
@ -4,8 +4,8 @@ BINDIR=$(CURDIR)/bin
|
||||||
INSTALLDIR=$(CURDIR)/libcarla-install
|
INSTALLDIR=$(CURDIR)/libcarla-install
|
||||||
TOOLCHAIN=$(CURDIR)/ToolChain.cmake
|
TOOLCHAIN=$(CURDIR)/ToolChain.cmake
|
||||||
|
|
||||||
CC=/usr/bin/gcc
|
CC=/usr/bin/gcc-7
|
||||||
CXX=/usr/bin/g++
|
CXX=/usr/bin/g++-7
|
||||||
CXXFLAGS=-std=c++14 -pthread -fPIC -O3 -DNDEBUG -Werror -Wall -Wextra
|
CXXFLAGS=-std=c++14 -pthread -fPIC -O3 -DNDEBUG -Werror -Wall -Wextra
|
||||||
|
|
||||||
define log
|
define log
|
||||||
|
|
|
@ -24,8 +24,8 @@ want
|
||||||
|
|
||||||
```cmake
|
```cmake
|
||||||
# Example ToolChain.cmake
|
# Example ToolChain.cmake
|
||||||
set(CMAKE_C_COMPILER /usr/bin/clang)
|
set(CMAKE_C_COMPILER /usr/bin/clang-8)
|
||||||
set(CMAKE_CXX_COMPILER /usr/bin/clang++)
|
set(CMAKE_CXX_COMPILER /usr/bin/clang++-8)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O3 -DNDEBUG" CACHE STRING "" FORCE)
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@ RUN apt-get update ; \
|
||||||
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" && \
|
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" && \
|
||||||
apt-get update ; \
|
apt-get update ; \
|
||||||
apt-get install -y build-essential \
|
apt-get install -y build-essential \
|
||||||
clang \
|
clang-8 \
|
||||||
lld \
|
lld-8 \
|
||||||
g++ \
|
g++-7 \
|
||||||
cmake \
|
cmake \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
libvulkan1 \
|
libvulkan1 \
|
||||||
|
|
Loading…
Reference in New Issue