Linux: Building MultiplayerSample Project fails
Opened this issue · 2 comments
Describe the bug
This issue should be considered as Blocker.
MultiplayerSample Project cannot be build, due to the following error:
[1/16] Building CXX object External/Gem-48c9b58a/Code/CMakeFiles/MultiplayerSample.Server.Static.dir/profile/Unity/unity_4_cxx.cxx.o
FAILED: External/Gem-48c9b58a/Code/CMakeFiles/MultiplayerSample.Server.Static.dir/profile/Unity/unity_4_cxx.cxx.o
/usr/bin/clang++-12 -DAZ_BUILD_CONFIGURATION_TYPE=\"profile\" -DAZ_ENABLE_DEBUG_TOOLS -DAZ_ENABLE_TRACING -DAZ_PHYSICS_DEBUG_ENABLED -DAZ_PROFILE_BUILD -DAZ_TRAIT_CLIENT=0 -DAZ_TRAIT_SERVER=1 -DEMFX_ANIMGRAPH_PROFILER_ENABLED -DEMFX_DEVELOPMENT_BUILD -DIMGUI_API_IMPORT -DIMGUI_ENABLED -DIMGUI_INCLUDE_IMGUI_USER_H -DLINUX -DLINUX64 -DNDEBUG -DPAL_TRAIT_LINUX_WINDOW_MANAGER_XCB -DPHYSX_ENABLE_MULTI_THREADING -D_FORTIFY_SOURCE=2 -D_HAS_EXCEPTIONS=0 -D_PROFILE -D__linux__ -DCMAKE_INTDIR=\"profile\" -I/home/gpc-559/my-o3de-projects/o3de-multiplayersample/Gem/Code/Source -I/home/gpc-559/my-o3de-projects/o3de-multiplayersample/Gem/Code/. -I/home/gpc-559/my-o3de-projects/o3de-multiplayersample/Gem/Code/Include -I/home/gpc-559/my-o3de-projects/o3de-multiplayersample/build/linux/External/Gem-48c9b58a/Code/Azcg/Generated/MultiplayerSample.Server.Static -I/home/gpc-559/Builds/o3de/Gems/StartingPointInput/Code/Include -I/home/gpc-559/Builds/o3de/Gems/PhysX/Code/Include -I/home/gpc-559/Builds/o3de/Gems/Multiplayer/Code/Include -I/home/gpc-559/Builds/o3de/Gems/LmbrCentral/Code/include -I/home/gpc-559/Builds/o3de/Gems/AudioSystem/Code/Include/Engine -I/home/gpc-559/Builds/o3de/Code/Framework/AzCore/. -I/home/gpc-559/Builds/o3de/Code/Framework/AzCore/Platform/Linux -I/home/gpc-559/Builds/o3de/Code/Framework/AzCore/Platform/Common -I/home/gpc-559/my-o3de-projects/o3de-multiplayersample/build/linux/External/Multiplayer-cae90806/Code/Azcg/Generated/Multiplayer.Server.Static -I/home/gpc-559/my-o3de-projects/o3de-multiplayersample/build/linux/External/Multiplayer-cae90806/Code/Azcg/Generated/Multiplayer.Common.Static -I/home/gpc-559/Builds/o3de/Code/Framework/AzFramework/. -I/home/gpc-559/Builds/o3de/Code/Framework/AzFramework/Platform/Linux -I/home/gpc-559/Builds/o3de/Code/Framework/AzFramework/Platform/Common/Xcb -I/home/gpc-559/Builds/o3de/Code/Framework/AzNetworking/. -I/home/gpc-559/Builds/o3de/Code/Framework/AzNetworking/Platform/Common -I/home/gpc-559/Builds/o3de/Code/Framework/AzNetworking/Platform/Linux -I/home/gpc-559/my-o3de-projects/o3de-multiplayersample/build/linux/o3de/Code/Framework/AzNetworking/Azcg/Generated/AzNetworking -I/home/gpc-559/Builds/o3de/Gems/PhysX/Code/. -I/home/gpc-559/Builds/o3de/Gems/PhysX/Code/Source -I/home/gpc-559/Builds/o3de/Gems/PhysX/Code/Source/Platform/Linux -I/home/gpc-559/Builds/o3de/Code/Legacy/CryCommon/. -I/home/gpc-559/Builds/o3de/Code/Legacy/CryCommon/.. -I/home/gpc-559/Builds/o3de/Code/Legacy/CryCommon/Platform/Linux -I/home/gpc-559/Builds/o3de/Gems/GameState/Code/Include -I/home/gpc-559/Builds/o3de/Gems/EMotionFX/Code/. -I/home/gpc-559/Builds/o3de/Gems/EMotionFX/Code/Include -I/home/gpc-559/Builds/o3de/Gems/EMotionFX/Code/Source -I/home/gpc-559/Builds/o3de/Code/Framework/AtomCore/. -I/home/gpc-559/Builds/o3de/Gems/Atom/RPI/Code/Include -I/home/gpc-559/Builds/o3de/Gems/Atom/RPI/Code/External -I/home/gpc-559/Builds/o3de/Gems/Atom/RHI/Code/Include -I/home/gpc-559/Builds/o3de/Gems/AtomLyIntegration/CommonFeatures/Code/Include -I/home/gpc-559/Builds/o3de/Gems/Atom/Feature/Common/Code/Include -I/home/gpc-559/Builds/o3de/Gems/Atom/Feature/Common/Code/3rdParty/ACES -I/home/gpc-559/Builds/o3de/Gems/Atom/Utils/Code/Include -I/home/gpc-559/Builds/o3de/Gems/Profiler/Code/Include -I/home/gpc-559/Builds/o3de/Gems/ImGui/Code/../External/ImGui/v1.82 -I/home/gpc-559/Builds/o3de/Gems/ImGui/Code/Include -I/home/gpc-559/Builds/o3de/Gems/AtomLyIntegration/AtomImGuiTools/Code/Include -I/home/gpc-559/Builds/o3de/Gems/GradientSignal/Code/Include -I/home/gpc-559/Builds/o3de/Gems/SurfaceData/Code/Include -I/home/gpc-559/Builds/o3de/Gems/Atom/Feature/Common/Code/Source -I/home/gpc-559/Builds/o3de/Gems/Atom/Asset/ImageProcessingAtom/Code/Include -I/home/gpc-559/Builds/o3de/Gems/Atom/Bootstrap/Code/Include -isystem /home/gpc-559/o3de-packages/packages/Lua-5.4.4-rev1-linux/Lua/include -isystem /home/gpc-559/o3de-packages/packages/RapidJSON-1.1.0-rev1-multiplatform/RapidJSON/include -isystem /home/gpc-559/o3de-packages/packages/RapidXML-1.13-rev1-multiplatform/RapidXML/include -isystem /home/gpc-559/o3de-packages/packages/zlib-1.2.11-rev5-linux/zlib/include -isystem /home/gpc-559/o3de-packages/packages/cityhash-1.1-multiplatform/cityhash/src -isystem /home/gpc-559/o3de-packages/packages/lz4-1.9.4-rev2-linux/lz4/include -isystem /home/gpc-559/o3de-packages/packages/PhysX-4.1.2.29882248-rev5-linux/PhysX/shared/include -isystem /home/gpc-559/o3de-packages/packages/PhysX-4.1.2.29882248-rev5-linux/PhysX/shared/include/foundation -isystem /home/gpc-559/o3de-packages/packages/PhysX-4.1.2.29882248-rev5-linux/PhysX/shared/include/geometry -isystem /home/gpc-559/o3de-packages/packages/png-1.6.37-rev2-linux/png/include -isystem /home/gpc-559/o3de-packages/packages/tiff-4.2.0.15-rev3-linux/tiff/include -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Wno-inconsistent-missing-override -Wrange-loop-analysis -Wno-unknown-warning-option -Wno-parentheses -Wno-reorder -Wno-switch -Wno-undefined-var-template -msse4.1 -O2 -g -fstack-protector-all -fstack-check -std=c++17 -fPIC -MD -MT External/Gem-48c9b58a/Code/CMakeFiles/MultiplayerSample.Server.Static.dir/profile/Unity/unity_4_cxx.cxx.o -MF External/Gem-48c9b58a/Code/CMakeFiles/MultiplayerSample.Server.Static.dir/profile/Unity/unity_4_cxx.cxx.o.d -o External/Gem-48c9b58a/Code/CMakeFiles/MultiplayerSample.Server.Static.dir/profile/Unity/unity_4_cxx.cxx.o -c /home/gpc-559/my-o3de-projects/o3de-multiplayersample/build/linux/External/Gem-48c9b58a/Code/CMakeFiles/MultiplayerSample.Server.Static.dir/Unity/unity_4_cxx.cxx
In file included from /home/gpc-559/my-o3de-projects/o3de-multiplayersample/build/linux/External/Gem-48c9b58a/Code/CMakeFiles/MultiplayerSample.Server.Static.dir/Unity/unity_4_cxx.cxx:3:
In file included from /home/gpc-559/my-o3de-projects/o3de-multiplayersample/Gem/Code/Source/Weapons/TraceWeapon.cpp:8:
In file included from /home/gpc-559/my-o3de-projects/o3de-multiplayersample/Gem/Code/./Source/Weapons/TraceWeapon.h:10:
In file included from /home/gpc-559/my-o3de-projects/o3de-multiplayersample/Gem/Code/./Source/Weapons/BaseWeapon.h:10:
In file included from /home/gpc-559/my-o3de-projects/o3de-multiplayersample/Gem/Code/./Source/Weapons/IWeapon.h:10:
In file included from /home/gpc-559/my-o3de-projects/o3de-multiplayersample/Gem/Code/./Source/Weapons/WeaponTypes.h:11:
/home/gpc-559/my-o3de-projects/o3de-multiplayersample/Gem/Code/./Source/Effects/GameEffect.h:88:21: error: private field 'm_emitterType' is not used [-Werror,-Wunused-private-field]
EmitterType m_emitterType = EmitterType::ReusableEmitter;
^
1 error generated.
ninja: build stopped: subcommand failed.
The ninja: build stopped: subcommand failed.
occurs several times during the building process. Executing the build command again reduces number of processes to build. However, at some point building process fails with error mentioned above.
Attached screenshot shows the error in the terminal.
Steps to reproduce
Steps to reproduce the behavior:
- Go to https://github.com/o3de/o3de-multiplayersample/blob/development/README_LINUX.md
- Follow the instruction to prepare and build the MultiplayerSample Project.
- When the
ninja: build stopped: subcommand failed.
occurs, execute the build command again. - Repeat step 3 several times (to the point when number of processes to build don't decrease).
Expected behavior
Following the MultiplayerSample README instruction User is able to build the project.
Actual behavior
Building MultiplayerSample Project fails.
Found in Branch
Development (a9511c5)
.deb Installer (https://o3debinaries.org/development/Latest/Linux/O3DE_latest.deb)
Desktop/Device:
- Device: PC
- OS: Ubuntu
- Version: 20.04
- CPU: AMD Ryzen 7 3800X 8-Core Processor
- GPU: AMD Radeon RX 5700 XT
- Memory: 16 GB
Nice find! If you want to unblock yourself, the the compiler errors says that EmitterType m_emitterType isn't used. m_emitterType should live inside of the #if AZ_TRAIT_CLIENT
block
There's a pretty quick work around, so I'll make this major, but it's very visible for Linux users
I verified the workaround today. I changed the 88th line in the:
https://github.com/o3de/o3de-multiplayersample/blob/development/Gem/Code/Source/Effects/GameEffect.h
to:
[[maybe_unused]] EmitterType m_emitterType = EmitterType::ReusableEmitter;
With this change MultiplayerSample Project was built with server and launcher launched successfully. Please note that in the Asset Processor, PopcornFX assets are failing which can be linked to #397.