Open iagupov opened 1 year ago
Some problem!!!
I installed clang-11 and changed it in setup.sh, but build.sh failed to find -lc++fs: no file or directory
facing the same issue, has someone found the solution? It looks like clang-8 is not supported in Ubuntu 22.04. @chenfei8888 did you figure out the solution?
According to this SO post it seems like the C/C++ filesystem library was added to the base standard library in later releases so removing them should suffice.
Changes to remove them here: https://github.com/Kanaderu/AirSim/commit/ac76e3908a768cc6e6fada54b77897695f48bcb7
Seems to build successfully, haven't tested anything as of yet.
I installed it with clang-12 here is what I have changed within the files. Im using it with Unity
Row | Old Value --> New Value
setup.sh
53 | vulkan-utils --> vulkan-tools 63 | sudo apt-get install -y clang-8 clang++-8 libc++-8-dev libc++abi-8-dev --> sudo apt-get install -y clang-12 clang++-12 libc++-12-dev libc++abi-12-dev
build.sh
67 | export CC="gcc-8" --> export CC="gcc-12" 68 | export CXX="g++-8" --> export CXX="g++-12" 70 | export CC="clang-8" --> export CC="clang-12" 71 | export CXX="clang++-12" --> export CXX="clang++-12"
cmake/cmake-modules/CommonSetup.cmake
62 | set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -lc++fs -ferror-limit=10") --> set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -ferror-limit=10") 64 | set(CXX_EXP_LIB "-lstdc++fs -fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel") --> set(CXX_EXP_LIB "-fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel")
ros2/src/airsim_ros_pks/CMakeLists.txt
37 | -lstdc++fs -fmax-errors=10") --> -fmax-errors=10")
Unity/build.sh
21 | export CC=/usr/local/opt/llvm@8/bin/clang --> export CC=/usr/local/opt/llvm@12/bin/clang 22 | export CXX=/usr/local/opt/llvm@8/bin/clang++ --> export CXX=/usr/local/opt/llvm@12/bin/clang++ 24 | export CC="clang-8" --> export CC="clang-12" 25 | export CXX="clang++-8" --> export CXX="clang++-12"
I installed it with clang-12 here is what I have changed within the files. Im using it with Unity
Row | Old Value --> New Value
setup.sh
53 | vulkan-utils --> vulkan-tools 63 | sudo apt-get install -y clang-8 clang++-8 libc++-8-dev libc++abi-8-dev --> sudo apt-get install -y clang-12 clang++-12 libc++-12-dev libc++abi-12-dev
build.sh
67 | export CC="gcc-8" --> export CC="gcc-12" 68 | export CXX="g++-8" --> export CXX="g++-12" 70 | export CC="clang-8" --> export CC="clang-12" 71 | export CXX="clang++-12" --> export CXX="clang++-12"
cmake/cmake-modules/CommonSetup.cmake
62 | set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -lc++fs -ferror-limit=10") --> set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -ferror-limit=10") 64 | set(CXX_EXP_LIB "-lstdc++fs -fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel") --> set(CXX_EXP_LIB "-fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel")
ros2/src/airsim_ros_pks/CMakeLists.txt
37 | -lstdc++fs -fmax-errors=10") --> -fmax-errors=10")
Unity/build.sh
21 | export CC=/usr/local/opt/llvm@8/bin/clang --> export CC=/usr/local/opt/llvm@12/bin/clang 22 | export CXX=/usr/local/opt/llvm@8/bin/clang++ --> export CXX=/usr/local/opt/llvm@12/bin/clang++ 24 | export CC="clang-8" --> export CC="clang-12" 25 | export CXX="clang++-8" --> export CXX="clang++-12"
I got following errors, -lstdc++ No such file or directory
> ./build.sh
+ debug=false
+ gcc=false
+ [[ 0 -gt 0 ]]
+ RPC_VERSION_FOLDER=rpclib-2.3.0
+ '[' '!' -d ./external/rpclib/rpclib-2.3.0 ']'
+ '[' -d ./cmake_build ']'
++ which cmake
+ CMAKE=/usr/bin/cmake
+ false
+ build_dir=build_release
++ uname
+ '[' Linux == Darwin ']'
+ false
+ export CC=clang-12
+ CC=clang-12
+ export CXX=clang++-12
+ CXX=clang++-12
+ [[ ! -d ./AirLib/deps/eigen3/Eigen ]]
+ echo 'putting build in build_release folder, to clean, just delete the directory...'
putting build in build_release folder, to clean, just delete the directory...
+ [[ -f ./cmake/CMakeCache.txt ]]
+ [[ -d ./cmake/CMakeFiles ]]
+ [[ ! -d build_release ]]
+ mkdir -p build_release
+ CMAKE_VARS=
++ uname
+ '[' Linux == Darwin ']'
+ pushd build_release
+ false
+ folder_name=Release
+ /usr/bin/cmake ../cmake -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is Clang 12.0.1
-- The CXX compiler identification is Clang 12.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang-12 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/clang++-12
-- Check for working CXX compiler: /usr/bin/clang++-12 - broken
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"/usr/bin/clang++-12"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/iit/AirSim/build_release/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_ba24f/fast && /usr/bin/gmake -f CMakeFiles/cmTC_ba24f.dir/build.make CMakeFiles/cmTC_ba24f.dir/build
gmake[1]: Entering directory '/home/iit/AirSim/build_release/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o
/usr/bin/clang++-12 -MD -MT CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o -c /home/iit/AirSim/build_release/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_ba24f
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ba24f.dir/link.txt --verbose=1
/usr/bin/clang++-12 CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o -o cmTC_ba24f
/usr/bin/ld: cannot find -lstdc++: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_ba24f.dir/build.make:100: cmTC_ba24f] Error 1
gmake[1]: Leaving directory '/home/iit/AirSim/build_release/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_ba24f/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/home/iit/AirSim/build_release/CMakeFiles/CMakeOutput.log".
See also "/home/iit/AirSim/build_release/CMakeFiles/CMakeError.log".
+ popd
~/AirSim ~/AirSim
+ rm -r build_release
+ exit 1
facing the same issue, has someone found the solution? It looks like clang-8 is not supported in Ubuntu 22.04. @chenfei8888 did you figure out the solution?
I ended up using ubuntu20.04.
I installed it with clang-12 here is what I have changed within the files. Im using it with Unity
Row | Old Value --> New Value
setup.sh53 | vulkan-utils --> vulkan-tools 63 | sudo apt-get install -y clang-8 clang++-8 libc++-8-dev libc++abi-8-dev --> sudo apt-get install -y clang-12 clang++-12 libc++-12-dev libc++abi-12-dev
build.sh67 | export CC="gcc-8" --> export CC="gcc-12" 68 | export CXX="g++-8" --> export CXX="g++-12" 70 | export CC="clang-8" --> export CC="clang-12" 71 | export CXX="clang++-12" --> export CXX="clang++-12"
cmake/cmake-modules/CommonSetup.cmake62 | set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -lc++fs -ferror-limit=10") --> set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -ferror-limit=10") 64 | set(CXX_EXP_LIB "-lstdc++fs -fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel") --> set(CXX_EXP_LIB "-fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel")
ros2/src/airsim_ros_pks/CMakeLists.txt37 | -lstdc++fs -fmax-errors=10") --> -fmax-errors=10")
Unity/build.sh21 | export CC=/usr/local/opt/llvm@8/bin/clang --> export CC=/usr/local/opt/llvm@12/bin/clang 22 | export CXX=/usr/local/opt/llvm@8/bin/clang++ --> export CXX=/usr/local/opt/llvm@12/bin/clang++ 24 | export CC="clang-8" --> export CC="clang-12" 25 | export CXX="clang++-8" --> export CXX="clang++-12"
I got following errors, -lstdc++ No such file or directory
> ./build.sh + debug=false + gcc=false + [[ 0 -gt 0 ]] + RPC_VERSION_FOLDER=rpclib-2.3.0 + '[' '!' -d ./external/rpclib/rpclib-2.3.0 ']' + '[' -d ./cmake_build ']' ++ which cmake + CMAKE=/usr/bin/cmake + false + build_dir=build_release ++ uname + '[' Linux == Darwin ']' + false + export CC=clang-12 + CC=clang-12 + export CXX=clang++-12 + CXX=clang++-12 + [[ ! -d ./AirLib/deps/eigen3/Eigen ]] + echo 'putting build in build_release folder, to clean, just delete the directory...' putting build in build_release folder, to clean, just delete the directory... + [[ -f ./cmake/CMakeCache.txt ]] + [[ -d ./cmake/CMakeFiles ]] + [[ ! -d build_release ]] + mkdir -p build_release + CMAKE_VARS= ++ uname + '[' Linux == Darwin ']' + pushd build_release + false + folder_name=Release + /usr/bin/cmake ../cmake -DCMAKE_BUILD_TYPE=Release -- The C compiler identification is Clang 12.0.1 -- The CXX compiler identification is Clang 12.0.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/clang-12 - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compiler: /usr/bin/clang++-12 -- Check for working CXX compiler: /usr/bin/clang++-12 - broken CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message): The C++ compiler "/usr/bin/clang++-12" is not able to compile a simple test program. It fails with the following output: Change Dir: /home/iit/AirSim/build_release/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_ba24f/fast && /usr/bin/gmake -f CMakeFiles/cmTC_ba24f.dir/build.make CMakeFiles/cmTC_ba24f.dir/build gmake[1]: Entering directory '/home/iit/AirSim/build_release/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o /usr/bin/clang++-12 -MD -MT CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o -c /home/iit/AirSim/build_release/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Linking CXX executable cmTC_ba24f /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ba24f.dir/link.txt --verbose=1 /usr/bin/clang++-12 CMakeFiles/cmTC_ba24f.dir/testCXXCompiler.cxx.o -o cmTC_ba24f /usr/bin/ld: cannot find -lstdc++: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) gmake[1]: *** [CMakeFiles/cmTC_ba24f.dir/build.make:100: cmTC_ba24f] Error 1 gmake[1]: Leaving directory '/home/iit/AirSim/build_release/CMakeFiles/CMakeTmp' gmake: *** [Makefile:127: cmTC_ba24f/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project) -- Configuring incomplete, errors occurred! See also "/home/iit/AirSim/build_release/CMakeFiles/CMakeOutput.log". See also "/home/iit/AirSim/build_release/CMakeFiles/CMakeError.log". + popd ~/AirSim ~/AirSim + rm -r build_release + exit 1
Just in case anyone else arrives here via google. Run the following in terminal and then re-run build.sh:
sudo apt-get -y install libunwind-dev libstdc++-12-dev
Should work now.
Happy to create a PR for @JulianDev24 + my changes if repo maintainers are interested?
Happy to create a PR for @JulianDev24 + my changes if repo maintainers are interested?
The maintainers were unfortunately laid off. Initially, microsoft announced they were deprecated this repo for a newer, "Project Airsim" (probably an internal reorg). In October 2023, https://wonderfulengineering.com/microsoft-just-shut-down-its-industrial-metaverse-project-airsim-and-laid-off-its-team/
Microsoft Just Shut Down Its ‘Industrial Metaverse’ Project Airsim And Laid Off Its Team
I wonder if someone should/could fork it, maybe that person could be me in many months time - just getting started with Airsim right now 😂️
Warning: After getting Airsim to build, I couldn't open the Blocks unreal project in Unreal 4.27:
I use Debian 12 (admittedly, not ubuntu 22.04), and had to use LLVM/clang18 and remove usage of -lc++fs
since that is no longer necessary. Apply these changes:
diff --git a/Unity/build.sh b/Unity/build.sh
index 5e0aa938..1a2f3741 100755
--- a/Unity/build.sh
+++ b/Unity/build.sh
@@ -18,11 +18,11 @@ fi
cd linux-build
if [ "$(uname)" == "Darwin" ]; then
- export CC=/usr/local/opt/llvm@8/bin/clang
- export CXX=/usr/local/opt/llvm@8/bin/clang++
+ export CC=/usr/local/opt/llvm@18/bin/clang
+ export CXX=/usr/local/opt/llvm@18/bin/clang++
else
- export CC="clang-8"
- export CXX="clang++-8"
+ export CC="clang-18"
+ export CXX="clang++-18"
fi
# check for local cmake build created by setup.sh
diff --git a/build.sh b/build.sh
index 8b45d64b..cfde0f4f 100755
--- a/build.sh
+++ b/build.sh
@@ -64,11 +64,11 @@ if [ "$(uname)" == "Darwin" ]; then
export CXX="$(brew --prefix)/opt/llvm/bin/clang++"
else
if $gcc; then
- export CC="gcc-8"
- export CXX="g++-8"
+ export CC="gcc-18"
+ export CXX="g++-18"
else
- export CC="clang-8"
- export CXX="clang++-8"
+ export CC="clang-18"
+ export CXX="clang++-18"
fi
fi
diff --git a/cmake/cmake-modules/CommonSetup.cmake b/cmake/cmake-modules/CommonSetup.cmake
index 11d0c9bc..f814b18f 100644
--- a/cmake/cmake-modules/CommonSetup.cmake
+++ b/cmake/cmake-modules/CommonSetup.cmake
@@ -59,9 +59,9 @@ macro(CommonSetup)
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(CMAKE_CXX_FLAGS "-stdlib=libc++ -Wno-documentation -Wno-unknown-warning-option ${CMAKE_CXX_FLAGS}")
find_package(LLVM REQUIRED CONFIG)
- set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -lc++fs -ferror-limit=10")
+ set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -ferror-limit=10")
else()
- set(CXX_EXP_LIB "-lstdc++fs -fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel")
+ set(CXX_EXP_LIB "-fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel")
endif ()
endif ()
diff --git a/ros2/src/airsim_ros_pkgs/CMakeLists.txt b/ros2/src/airsim_ros_pkgs/CMakeLists.txt
index 6d961a43..b2684f7c 100644
--- a/ros2/src/airsim_ros_pkgs/CMakeLists.txt
+++ b/ros2/src/airsim_ros_pkgs/CMakeLists.txt
@@ -34,7 +34,7 @@ set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -Wnoexcept -Wstrict-null-sentinel")
set(CXX_EXP_LIB "-nostdinc++ -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -nodefaultlibs
-l/usr/lib/x86_64-linux-gnu/libc++.so -l/usr/lib/x86_64-linux-gnu/libc++abi.so
-lm -lc -lgcc_s -lgcc
--lstdc++fs -fmax-errors=10")
+-fmax-errors=10")
set(RPC_LIB_INCLUDES " ${AIRSIM_ROOT}/external/rpclib/rpclib-2.3.0/include")
set(RPC_LIB rpc)
message(STATUS "found RPC_LIB_INCLUDES=${RPC_LIB_INCLUDES}")
diff --git a/setup.sh b/setup.sh
index fd0b71e2..5edf8785 100755
--- a/setup.sh
+++ b/setup.sh
@@ -50,7 +50,7 @@ else #linux
software-properties-common \
wget \
libvulkan1 \
- vulkan-utils
+ vulkan-tools
#install clang and build tools
VERSION=$(lsb_release -rs | cut -d. -f1)
@@ -60,7 +60,7 @@ else #linux
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
fi
- sudo apt-get install -y clang-8 clang++-8 libc++-8-dev libc++abi-8-dev
+ sudo apt-get install -y clang-18 clang++-18 libc++-18-dev libc++abi-18-dev
fi
if ! which cmake; then
@xxEoD2242, your repo has the same issues since it still uses clang 8 and references old libraries like vulkan-utils
? See https://github.com/CodexLabsLLC/Colosseum/blob/2383b0adfc674d34e68cb05ef163ca1c00479352/setup.sh#L53 and https://github.com/CodexLabsLLC/Colosseum/blob/2383b0adfc674d34e68cb05ef163ca1c00479352/setup.sh#L63
@ben-xD We don't support Ubuntu 22.04 natively. You need to update the clang and vulkan libraries if you want to install it locally. Or use Docker
We're struggling with a similar issue on our sim. Changing clang version from 8 → 12 breaks compatibility on Ubuntu 20.04, because of pthread symbols that are exposed in the rpclib library that are undefined for the cross-compile tool for Unreal Engine 4.27. Apparently this PR fixes the issues on Ubuntu 22.04. We do however use an older version of Airsim that was stripped down a lot.
@xxEoD2242 Do you see a similar issue when changing from clang version 8 → 12 when using UE 5+? The symbol I'm talking about is pthread_cond_clockwait
which is available since glibc 2.30, while the crosscompile toolchain for UE 4.27 uses glibc v2.17.
I installed it with clang-12 here is what I have changed within the files. Im using it with Unity
Row | Old Value --> New Value
setup.sh
53 | vulkan-utils --> vulkan-tools 63 | sudo apt-get install -y clang-8 clang++-8 libc++-8-dev libc++abi-8-dev --> sudo apt-get install -y clang-12 clang++-12 libc++-12-dev libc++abi-12-dev
build.sh
67 | export CC="gcc-8" --> export CC="gcc-12" 68 | export CXX="g++-8" --> export CXX="g++-12" 70 | export CC="clang-8" --> export CC="clang-12" 71 | export CXX="clang++-12" --> export CXX="clang++-12"
cmake/cmake-modules/CommonSetup.cmake
62 | set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -lc++fs -ferror-limit=10") --> set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -ferror-limit=10") 64 | set(CXX_EXP_LIB "-lstdc++fs -fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel") --> set(CXX_EXP_LIB "-fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel")
ros2/src/airsim_ros_pks/CMakeLists.txt
37 | -lstdc++fs -fmax-errors=10") --> -fmax-errors=10")
Unity/build.sh
21 | export CC=/usr/local/opt/llvm@8/bin/clang --> export CC=/usr/local/opt/llvm@12/bin/clang 22 | export CXX=/usr/local/opt/llvm@8/bin/clang++ --> export CXX=/usr/local/opt/llvm@12/bin/clang++ 24 | export CC="clang-8" --> export CC="clang-12" 25 | export CXX="clang++-8" --> export CXX="clang++-12"
it works for me! thx!
Similar to @ben-xD adding that I was also able to get this to work on Ubuntu 24.04.1 by replacing references to clang-8 with clang-18 (the version of clang you get with sudo apt install clang
) and removing linker references to -lc++fs
. Also made the vulkan-tools change, but no need to do the gcc change, since I wasn't building with gcc anyway (didn't even try it tbh).
In other interesting news, the LinuxBlocks 1.8.1 binary works again -- I guess they got Vulkan figured out. Woo!
Bug report
What's the issue you encountered?
I follow the instruction: https://microsoft.github.io/AirSim/build_linux/ to install AirSim in Ubuntu In a section "Build AirSim" I cloned repository and then executed
./setup.sh
This provoke an error: "Package 'clang-8' has no installation candidate" I did not find any similar issue or any relative information. The full log is shown below. Please help if you have any idea how to fix it. I saw that clang is not supported for Ubuntu 22.04, but maybe there is a way to run it without reinstalling Ubuntu.Settings
How can the issue be reproduced?
Include full error message in text form
./setup.sh