Skip to content

Commit

Permalink
reverted scrips to fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
WouterJansen committed Dec 4, 2024
1 parent a8f255d commit 6300b30
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 45 deletions.
22 changes: 5 additions & 17 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,12 @@ if [ "$(uname)" == "Darwin" ]; then
export CC="$(brew --prefix)/opt/llvm/bin/clang"
export CXX="$(brew --prefix)/opt/llvm/bin/clang++"
else
VERSION=$(lsb_release -rs | cut -d. -f1)
if $gcc; then
if [ "$VERSION" -gt "22" ]; then
export CC="gcc-13"
export CXX="g++-13"
else
export CC="gcc-12"
export CXX="g++-12"
fi
export CC="gcc-12"
export CXX="g++-12"
else
export CXXFLAGS="-stdlib=libstdc++"
if [ "$VERSION" -gt "22" ]; then
export CC="clang-16"
export CXX="clang++-16"
else
export CC="clang-12"
export CXX="clang++-12"
fi
export CC="clang-12"
export CXX="clang++-12"
fi
fi

Expand Down Expand Up @@ -145,7 +133,7 @@ set +x
echo ""
echo ""
echo "==============================="
echo " Cosys-AirSim plugin is built! "
echo " Cosys-AirSim plugin is built!."
echo "==============================="
echo ""
echo "For further info see for installation see:"
Expand Down
43 changes: 15 additions & 28 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ "$(uname)" == "Darwin" ]; then # osx
brew update
# Update below line for newer versions
brew install llvm@8
else # linux
else #linux
sudo apt-get update
sudo apt-get -y install --no-install-recommends \
lsb-release \
Expand All @@ -40,24 +40,15 @@ else # linux
libvulkan1 \
vulkan-tools

# install clang and build tools
#install clang and build tools
VERSION=$(lsb_release -rs | cut -d. -f1)
if [ "$VERSION" -gt "22" ]; then
clang_version='16'
cpp_version='14'
elif [ "$VERSION" -gt "20" ]; then
clang_version='12'
cpp_version='12'
else
clang_version='12'
cpp_version='10'
fi
sudo apt-get install -y \
clang-$clang_version \
clang++-$clang_version \
libc++-$clang_version-dev \
libc++abi-$clang_version-dev \
libstdc++-$cpp_version-dev
# Since Ubuntu 17 clang is part of the core repository
# See https://packages.ubuntu.com/search?keywords=clang-8
# if [ "$VERSION" -lt "17" ]; then
# 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-12 clang++-12 libc++-12-dev libc++abi-12-dev libstdc++-12-dev
fi

if ! which cmake; then
Expand Down Expand Up @@ -98,10 +89,9 @@ else #linux
sudo apt-get install -y build-essential unzip libunwind-dev

if version_less_than_equal_to $cmake_ver $MIN_CMAKE_VERSION; then
VERSION=$(lsb_release -rs | cut -d. -f1)
# For Ubuntu 18 and up, avoid building cmake from scratch to save time
# ref: https://apt.kitware.com
if [ "$VERSION" -ge "18" ]; then
# in ubuntu 18 docker CI, avoid building cmake from scratch to save time
# ref: https://apt.kitware.com/
if [ "$(lsb_release -rs)" == "18.04" ]; then
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
Expand Down Expand Up @@ -198,9 +188,6 @@ popd >/dev/null

set +x
echo ""
echo ""
echo "============================================"
echo " Cosys-AirSim setup completed successfully! "
echo "============================================"
echo ""
echo "Run ./build.sh to compile."
echo "******************************************"
echo "Cosys-AirSim setup completed successfully!"
echo "******************************************"

2 comments on commit 6300b30

@dizzydrone
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able build and open the blocks example in Ubuntu 22 with UE 5.5 by compiling the plugin with clang++-18. It seems that UE went from clang 16 in 5.4/5.3 and now is using a clang 18 tool chain for 5.5.

@WouterJansen
Copy link
Contributor Author

@WouterJansen WouterJansen commented on 6300b30 Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, for me the strange thing was though that compiling it with clang++-18 caused symbolic linker errors, but I will try again at a later date to fix this. For now it continues to work for me with the airlib build with clang++-12 with 5.5.

Please sign in to comment.