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

Linux: Building MultiplayerSample Project fails #424

Open
LB-MichalRodzos opened this issue May 31, 2023 · 2 comments
Open

Linux: Building MultiplayerSample Project fails #424

LB-MichalRodzos opened this issue May 31, 2023 · 2 comments
Labels
kind/bug Something isn't working priority/major Major priority. Work that should be handled after all blocking and critical work is done.

Comments

@LB-MichalRodzos
Copy link

LB-MichalRodzos commented May 31, 2023

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:

  1. Go to https://github.com/o3de/o3de-multiplayersample/blob/development/README_LINUX.md
  2. Follow the instruction to prepare and build the MultiplayerSample Project.
  3. When the ninja: build stopped: subcommand failed. occurs, execute the build command again.
  4. 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.

Screenshots/Video
Screenshot from 2023-05-31 11-39-51

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
@LB-MichalRodzos LB-MichalRodzos added kind/bug Something isn't working needs-triage Issue requires review labels May 31, 2023
@AMZN-Gene
Copy link
Contributor

AMZN-Gene commented Jun 8, 2023

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

@AMZN-Gene AMZN-Gene added priority/major Major priority. Work that should be handled after all blocking and critical work is done. and removed needs-triage Issue requires review labels Jun 8, 2023
@LB-MichalRodzos
Copy link
Author

LB-MichalRodzos commented Jun 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/major Major priority. Work that should be handled after all blocking and critical work is done.
Projects
None yet
Development

No branches or pull requests

2 participants