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

Copy of fix: compile on Ubuntu 21.10 and Unreal 4.27.2 #4561

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-21.10]

steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 1 addition & 7 deletions Unreal/Plugins/AirSim/Source/AirSim.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using UnrealBuildTool;
using System;
using System.IO;

public class AirSim : ModuleRules
Expand Down Expand Up @@ -104,13 +105,6 @@ private void AddOSLibDependencies(ReadOnlyTargetRules Target)
PublicAdditionalLibraries.Add("dinput8.lib");
PublicAdditionalLibraries.Add("dxguid.lib");
}

if (Target.Platform == UnrealTargetPlatform.Linux)
{
// needed when packaging
PublicAdditionalLibraries.Add("stdc++");
PublicAdditionalLibraries.Add("supc++");
}
}

static void CopyFileIfNewer(string srcFilePath, string destFolder)
Expand Down
2 changes: 1 addition & 1 deletion Unreal/Plugins/AirSim/Source/UnrealImageCapture.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "common/ImageCaptureBase.hpp"
#include "common/common_utils/UniqueValueMap.hpp"

class UnrealImageCapture : public msr::airlib::ImageCaptureBase
class AIRSIM_API UnrealImageCapture : public msr::airlib::ImageCaptureBase
{
public:
typedef msr::airlib::ImageCaptureBase::ImageType ImageType;
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ else
export CC="gcc-8"
export CXX="g++-8"
else
export CC="clang-8"
export CXX="clang++-8"
export CC="clang-11"
export CXX="clang++-11"
fi
fi

Expand Down
4 changes: 2 additions & 2 deletions cmake/cmake-modules/CommonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

Expand Down
10 changes: 5 additions & 5 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ else #linux
VERSION=$(lsb_release -rs | cut -d. -f1)
# 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-8 clang++-8 libc++-8-dev libc++abi-8-dev
# 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-11 clang++-11 libc++-11-dev libc++abi-11-dev
fi

if ! which cmake; then
Expand Down