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

Hundreds of warnings while compiling AirSim for Unity on Linux #2478

Open
rajat2004 opened this issue Mar 25, 2020 · 4 comments
Open

Hundreds of warnings while compiling AirSim for Unity on Linux #2478

rajat2004 opened this issue Mar 25, 2020 · 4 comments

Comments

@rajat2004
Copy link
Contributor

OS: Ubuntu 18.04
Unity 2019.f2

Reproduction -

cd Unity
./build.sh

And watch as hundreds of warnings(about 340) scroll by on your screen. Total output size after redirecting it to a file comes out to be 9 MB

I believe this is happening due to compiler warning flags used to compile RPC being applied to the entire source code. This is quite bothersome, especially when trying to setup Travis for testing where the max output size is 4 MB, and thus requires additional workarounds to reduce output

From my poking around and diving into the CMake files, the problem seems to occur due to -

  1. Unity/AirlibWrapper has it's own CMakeLists.txt, where cmake/rpc-setup.cmake is included, which is modified from the original one used in RPC

  2. CMake project() is used here, which is the first and the only instance of this being used in the Unity CMake setup, and hence defines the PROJECT_NAME in all the subsequent ones

rpc-setup.cmake sets the compiler flags for the project, and this causes them to be applied everywhere. Usage of PROJECT_NAME can be seen by searching for it in the file

Such a thing doesn't happen in Unreal because it uses a wrapper over RPC's CMakeList itself with a separate project which doesn't affect the other files

This is just my current understanding of trying to figure of why this is happening. I'm not experienced in using CMake, and would love to have others's input in trying to figure out this problem

This was referenced Mar 27, 2020
@saihv
Copy link
Contributor

saihv commented Apr 30, 2020

Well, using -Weverything will do that I guess : https://github.com/microsoft/AirSim/blob/master/Unity/AirLibWrapper/AirsimWrapper/cmake/rpc-setup.cmake#L271

I don't think such heavy diagnostics are needed for us, especially when our code doesn't really adhere to any of those standards. I think we should relax the warning level by removing -Weverything and use -Wall and maybe -Wextra.

@madratman

@rajat2004
Copy link
Contributor Author

Removing some of the warning flags might reduce the amount, but this doesn't address the core problem here as far as I understand currently

@rajat2004
Copy link
Contributor Author

#2672 reduces the warnings, but I feel that the issue (if I'm correct in my understanding) is still applicable. Therefore keeping the issue open for now

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had activity from the community in the last year. It will be closed if no further activity occurs within 20 days.

@stale stale bot added the stale label Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants