Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Build Issue on Ubuntu 20.04 #6974

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SwiftGust
Copy link

@SwiftGust SwiftGust commented Dec 5, 2023

Description

Fixes #

  1. Added missing c++ standard header, updated library version & compile command
  2. Updated std C++ to 17
  3. Updated Boost to 1.83.0 and build command accordingly - use local clang packaged under Unreal Engine
  4. Updated Proj to 9.3.0 according to the [v0.9.14, Ubuntu 20.04] make setup fails on libproj build #6776
  5. Made sure to build dependencies to be built with Position Independent Code

Where has this been tested?

  • Platform(s): Ubuntu 20.04
  • Python version(s): Python 3.8
  • Unreal Engine version(s): UE 4.26

Possible Drawbacks

Introduction of C++ 17, boost 1.83.0, proj 9.3.0 may introduce compatibility issue


This change is Reviewable

Added missing header, updated library version & compile command
@SwiftGust SwiftGust requested a review from a team as a code owner December 5, 2023 15:29
Copy link

update-docs bot commented Dec 5, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes.

@ll7
Copy link
Contributor

ll7 commented Jan 24, 2024

I do have the the mentioned errors, however checking out this PR still results in the same 'thread' error in my case.

carla$ make PythonAPI
Util/BuildTools/Linux.mk:163: warning: overriding recipe for target 'downloadplugins'
Util/BuildTools/Linux.mk:142: warning: ignoring old recipe for target 'downloadplugins'
Setup.sh: Retrieving boost.
Setup.sh: Extracting boost for Python 3.
Building B2 engine..

A C++11 capable compiler is required for building the B2 engine.
Toolset 'clang' does not appear to support C++11.

> clang++ -x c++ -std=c++11  check_cxx11.cpp
check_cxx11.cpp:14:10: fatal error: 'thread' file not found
#include <thread>
         ^~~~~~~~
1 error generated.


** Note, the C++11 capable compiler is _only_ required for building the B2
** engine. The B2 build system allows for using any C++ level and any other
** supported language and resource in your projects.


You can specify the toolset as the argument, i.e.:
    ./build.sh [options] gcc

Toolsets supported by this script are:
    acc, clang, como, gcc, intel-darwin, intel-linux, kcc, kylix, mipspro,
    pathscale, pgi, qcc, sun, sunpro, tru64cxx, vacpp

For any toolset you can override the path to the compiler with the '--cxx'
option. You can also use additional flags for the compiler with the
'--cxxflags' option.

A special toolset; cxx, is available which is used as a fallback when a more
specific toolset is not found and the cxx command is detected. The 'cxx'
toolset will use the '--cxx' and '--cxxflags' options, if present.

Options:
    --help                  Show this help message.
    --verbose               Show messages about what this script is doing.
    --debug                 Build b2 with debug information, and no
                            optimizations.
    --guess-toolset         Print the toolset we can detect for building.
    --cxx=CXX               The compiler exec to use instead of the detected
                            compiler exec.
    --cxxflags=CXXFLAGS     The compiler flags to use in addition to the
                            flags for the detected compiler.



Failed to build B2 build engine
make: *** [Util/BuildTools/Linux.mk:142: setup] Error 1

@juliancao
Copy link

The fix didn't work for me, either.

@SwiftGust
Copy link
Author

@ll7 @juliancao sorry for inconvenience, this error could be related to trying to build boost with clang included in Carla's fork of UnrealEngine, would you test build with system installed g++ by removing include="${LLVM_INCLUDE},${LLVM_LIBPATH} in https://github.com/carla-simulator/carla/pull/6974/files#diff-b617d525d7cf7a5c9bb4a0a916007bd224ad09709521611a0b23df1701084624R122-R123

@juliancao
Copy link

I tried removing include="${LLVM_INCLUDE},${LLVM_LIBPATH} , the error still exists

@ll7
Copy link
Contributor

ll7 commented Feb 20, 2024

@ll7 @juliancao sorry for inconvenience, this error could be related to trying to build boost with clang included in Carla's fork of UnrealEngine, would you test build with system installed g++ by removing include="${LLVM_INCLUDE},${LLVM_LIBPATH} in https://github.com/carla-simulator/carla/pull/6974/files#diff-b617d525d7cf7a5c9bb4a0a916007bd224ad09709521611a0b23df1701084624R122-R123

Sorry, I upgraded to ubuntu 22.04 and no longer have any issues. Therefore, I am unable to test your suggestion.

@Blyron
Copy link
Contributor

Blyron commented May 6, 2024

All PRs must be against dev. We have fixed issues with Ubuntu 22.04 So please check latest docs and see if this is still necesary
https://carla.readthedocs.io/en/latest/build_linux/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants