carla
carla copied to clipboard
Cleanup and harmonize Carla server build to use Unreal sysroot
Ensure that actually only the unreal sysroot is deployed for all C as well C++ compilations including dependencies. That ensures the server is NOT anymore linked against the system glibc (which is in Ubuntu22.04 incompatible with the Unreal one). Harmonized naming split into client/server (instead of libcpp and libstdcpp) to ensure nothing mixed up (and there were things mixed up before!)
Refactor C# Unreal build using CarlaRules base class to provide common functionality. Fixing windows build without ROS2 and added intitial windows build with ROS2
Minors:
- Update osm2odr commit
- Fix windows install scripts and forward arguments for building libcarla
- Add some helper scripts to run under Linux
Description
Fixes #
Where has this been tested?
Ubunut 22.04, Ros2 humble, python 3.10 Windows 11, ahhh, no idea what python version there was installed, assume python3.10, but python is in each case irrelevant for this commit as it's mainly affecting the server build. Let's see if the CI builds under Windows (still) correctly
- Platform(s): ...
- Python version(s): ...
- Unreal Engine version(s): ...
Possible Drawbacks
I have added couple comments on your code, additionally could you merge dev branch?
In terms of code formatting, the .clang-format can be placed in the respective folders with different content (so the Unreal part can get one with Unreal formatting style). When having this in place one could even go one step further and make the codeformat.py call a pre-commit hook that is then always executed before commiting (don't ask me how to introduce this, but I've seen that at other repos recently and loved it immediately). Then the formating of spaces and braces etc. is clear and one saves a lot of review-time; since persons tend to forget running codeformater if not automated ;-).
Hey Bernd!
When launching a make clean I receive this error:
Util/BuildTools/Linux.mk:163: warning: overriding recipe for target 'downloadplugins' Util/BuildTools/Linux.mk:142: warning: ignoring old recipe for target 'downloadplugins' BuildUE4Plugins.sh: Cleaning intermediate files and folders. BuildUE4Plugins.sh: StreetMap Success! BuildCarlaUE4.sh: Using Unreal Engine at '/home/adas/UnrealEngine_4.26' BuildCarlaUE4.sh: Cleaning intermediate files and folders. BuildCarlaUE4.sh: Success! BuildPythonAPI.sh: Cleaning intermediate files and folders. BuildPythonAPI.sh: Success! BuildLibCarla.sh: Cleaning intermediate files and folders. BuildLibCarla.sh: Success! BuildOSM2ODR.sh: Cleaning intermediate files and folders. rm: invalid option -- 'c' Try 'rm --help' for more information. make: *** [Util/BuildTools/Linux.mk:34: clean.osm2odr] Error 1
Then when I do a make launch, this issue appears:
FAILED: LibCarla/cmake/test/CMakeFiles/libcarla_test_server_release.dir///source/test/common/test_buffer.cpp.o /home/adas/UnrealEngine_4.26/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++ -DASIO_NO_EXCEPTIONS -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_NO_EXCEPTIONS -DLIBCARLA_ENABLE_PROFILER -DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=true -DLIBCARLA_NO_EXCEPTIONS -DLIBCARLA_TEST_CONTENT_FOLDER="/home/adas/CARLA/carla/Build/test-content" -DLIBCARLA_WITH_GTEST -DPUGIXML_NO_EXCEPTIONS -I/home/adas/CARLA/carla/LibCarla/cmake/../source -I/home/adas/CARLA/carla/LibCarla/cmake/../source/third-party -I/home/adas/CARLA/carla/LibCarla/cmake/../source/test -isystem /home/adas/CARLA/carla/Build/boost-1.80.0-c10-install/include -isystem /home/adas/CARLA/carla/Build/rpclib-v2.2.1_c5-c10-server-install/include -isystem /home/adas/CARLA/carla/Build/gtest-1.8.1-c10-server-install/include -isystem /home/adas/CARLA/carla/LibCarla/cmake/test -std=c++14 -pthread -fPIC -Wall -Wextra -Wpedantic -Wdeprecated -Wshadow -Wuninitialized -Wunreachable-code -Wpessimizing-move -Wold-style-cast -Wnull-dereference -Wduplicate-enum -Wnon-virtual-dtor -Wheader-hygiene -Wconversion -Wfloat-overflow-conversion -std=c++14 -fPIC -stdlib=libc++ -DBOOST_NO_EXCEPTIONS -DASIO_NO_EXCEPTIONS --sysroot=/home/adas/UnrealEngine_4.26/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/ -isystem /home/adas/UnrealEngine_4.26/Engine/Source/ThirdParty/Linux/LibCxx/include/c++/v1 -std=c++14 -pthread -fPIC -Wall -Wextra -Wpedantic -Wdeprecated -Wshadow -Wuninitialized -Wunreachable-code -Wpessimizing-move -Wold-style-cast -Wnull-dereference -Wduplicate-enum -Wnon-virtual-dtor -Wheader-hygiene -Wconversion -Wfloat-overflow-conversion -std=c++14 -fPIC -stdlib=libc++ -DBOOST_NO_EXCEPTIONS -DASIO_NO_EXCEPTIONS --sysroot=/home/adas/UnrealEngine_4.26/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v17_clang-10.0.1-centos7/x86_64-unknown-linux-gnu/ -isystem /home/adas/UnrealEngine_4.26/Engine/Source/ThirdParty/Linux/LibCxx/include/c++/v1 -O3 -DNDEBUG -MD -MT LibCarla/cmake/test/CMakeFiles/libcarla_test_server_release.dir///source/test/common/test_buffer.cpp.o -MF LibCarla/cmake/test/CMakeFiles/libcarla_test_server_release.dir///source/test/common/test_buffer.cpp.o.d -o LibCarla/cmake/test/CMakeFiles/libcarla_test_server_release.dir///source/test/common/test_buffer.cpp.o -c /home/adas/CARLA/carla/LibCarla/source/test/common/test_buffer.cpp In file included from /home/adas/CARLA/carla/LibCarla/source/test/common/test_buffer.cpp:7: In file included from /home/adas/CARLA/carla/LibCarla/cmake/../source/test/test.h:13: In file included from /home/adas/CARLA/carla/LibCarla/cmake/../source/test/Buffer.h:9: In file included from /home/adas/CARLA/carla/LibCarla/cmake/../source/carla/Buffer.h:9: /home/adas/CARLA/carla/LibCarla/cmake/../source/carla/Debug.h:71:12: fatal error: 'gtest/gtest.h' file not found
include <gtest/gtest.h>
I wasn't able to reproduce the gtest.h issue, even uninstalling my ros2-humble packages including gtest headers. Nevertheless I've found other compilation issues, which I fixed ;-)