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

Arc Linux在执行build_linux.sh脚本的时候,编译失败 #435

Open
InverseDa opened this issue Mar 2, 2023 · 1 comment
Open

Arc Linux在执行build_linux.sh脚本的时候,编译失败 #435

InverseDa opened this issue Mar 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@InverseDa
Copy link

Describe the bug | Bug描述
Arc Linux在执行build_linux.sh脚本的时候,报错,编译失败

Steps to reproduce | 如何复现

  1. git clone git@github.com:BoomingTech/Piccolo.git
  2. cd Piccolo
  3. .\build_linux.sh debug

Expected behavior | 预期行为
按理来说等待make完之后就应该能使用了

Actual behavior | 实际行为
make过程中报错

Screenshots/Logs | 截图/日志

❯ ./build_linux.sh debug
-- The C compiler identification is Clang 15.0.7
-- The CXX compiler identification is Clang 15.0.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Using X11 for window creation
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Build spdlog: 1.9.2
-- Build type: Debug
-- Configuring done
-- Generating done
-- Build files have been written to: /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/build
[0/2] Re-checking globbed directories...
[1/322] Generating /home/miaokeda/Projects/CLionProjects/Picco...ne/shader/generated/spv/mesh_directional_light_shadow.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh_directional_light_shadow.frag
[2/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/fxaa.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/fxaa.vert
[3/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/mesh.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh.vert
[4/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/deferred_lighting.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/deferred_lighting.vert
[5/322] Generating /home/miaokeda/Projects/CLionProjects/Picco...0.9/engine/shader/generated/spv/mesh_inefficient_pick.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh_inefficient_pick.frag
[6/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/color_grading.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/color_grading.frag
[7/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/combine_ui.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/combine_ui.frag
[8/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/fxaa.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/fxaa.frag
[9/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/deferred_lighting.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/deferred_lighting.frag
[10/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/mesh.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh.frag
[11/322] Generating /home/miaokeda/Projects/CLionProjects/Picc...ne/shader/generated/spv/mesh_directional_light_shadow.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh_directional_light_shadow.vert
[12/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/mesh_gbuffer.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh_gbuffer.frag
[20/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/axis.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/axis.frag
[21/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/axis.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/axis.vert
[23/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/debugdraw.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/debugdraw.frag
[24/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/debugdraw.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/debugdraw.vert
[33/322] Generating /home/miaokeda/Projects/CLionProjects/Picc...9/engine/shader/generated/spv/mesh_point_light_shadow.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh_point_light_shadow.frag
[34/322] Generating /home/miaokeda/Projects/CLionProjects/Picc...0.9/engine/shader/generated/spv/mesh_inefficient_pick.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh_inefficient_pick.vert
[35/322] Generating /home/miaokeda/Projects/CLionProjects/Picc...9/engine/shader/generated/spv/mesh_point_light_shadow.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh_point_light_shadow.vert
[36/322] Generating /home/miaokeda/Projects/CLionProjects/Picc...9/engine/shader/generated/spv/mesh_point_light_shadow.geom.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/mesh_point_light_shadow.geom
[39/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/particlebillboard.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/particlebillboard.frag
[40/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/particlebillboard.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/particlebillboard.vert
[43/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/post_process.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/post_process.vert
[45/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/skybox.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/skybox.frag
[46/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/skybox.vert.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/skybox.vert
[47/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/tone_mapping.frag.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/tone_mapping.frag
[49/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/particle_emit.comp.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/particle_emit.comp
[52/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/particle_kickoff.comp.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/particle_kickoff.comp
[55/322] Generating /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/generated/spv/particle_simulate.comp.spv
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/shader/glsl/particle_simulate.comp
[96/322] Building CXX object engine/3rdparty/JoltPhysics/Build/CMakeFiles/Jolt.dir/__/Jolt/Core/JobSystemThreadPool.cpp.o
FAILED: engine/3rdparty/JoltPhysics/Build/CMakeFiles/Jolt.dir/__/Jolt/Core/JobSystemThreadPool.cpp.o 
/usr/bin/clang++ -DJPH_DEBUG_RENDERER -DJPH_PROFILE_ENABLED -DPICCOLO_VK_LAYER_PATH=/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/VulkanSDK/bin/Linux -D_DEBUG -I/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Build/.. -g -std=c++17 -I. -Wall -Werror -mavx2 -mbmi -mpopcnt -mlzcnt -mf16c -mfma -mlzcnt -mbmi -mf16c -mfma -g -std=gnu++17 -MD -MT engine/3rdparty/JoltPhysics/Build/CMakeFiles/Jolt.dir/__/Jolt/Core/JobSystemThreadPool.cpp.o -MF engine/3rdparty/JoltPhysics/Build/CMakeFiles/Jolt.dir/__/Jolt/Core/JobSystemThreadPool.cpp.o.d -o engine/3rdparty/JoltPhysics/Build/CMakeFiles/Jolt.dir/__/Jolt/Core/JobSystemThreadPool.cpp.o -c /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/JobSystemThreadPool.cpp
In file included from /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/JobSystemThreadPool.cpp:6:
In file included from /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Build/../Jolt/Core/JobSystemThreadPool.h:6:
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Build/../Jolt/Core/JobSystem.h:58:65: error: unqualified call to 'std::move' [-Werror,-Wunqualified-std-cast-call]
                inline                          JobHandle(JobHandle &&inHandle) noexcept        : Ref<Job>(move(inHandle)) { }
                                                                                                           ^
                                                                                                           std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Build/../Jolt/Core/JobSystem.h:65:89: error: unqualified call to 'std::move' [-Werror,-Wunqualified-std-cast-call]
                inline JobHandle &      operator = (JobHandle &&inHandle) noexcept      { Ref<Job>::operator = (move(inHandle)); return *this; }
                                                                                                                ^
                                                                                                                std::
In file included from /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/JobSystemThreadPool.cpp:6:
In file included from /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Build/../Jolt/Core/JobSystemThreadPool.h:7:
In file included from /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Build/../Jolt/Core/FixedSizeFreeList.h:127:
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:77:32: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                        new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                    ^
                                                    std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/JobSystemThreadPool.cpp:344:17: note: in instantiation of function template specialization 'JPH::FixedSizeFreeList<JPH::JobSystem::Job>::ConstructObject<const char *&, JPH::Color &, JPH::JobSystemThreadPool *, const std::function<void ()> &, unsigned int &>' requested here
                index = mJobs.ConstructObject(inJobName, inColor, this, inJobFunction, inNumDependencies);
                              ^
In file included from /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/JobSystemThreadPool.cpp:6:
In file included from /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Build/../Jolt/Core/JobSystemThreadPool.h:7:
In file included from /home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Build/../Jolt/Core/FixedSizeFreeList.h:127:
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:77:32: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                        new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                    ^
                                                    std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:77:32: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                        new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                    ^
                                                    std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:77:32: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                        new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                    ^
                                                    std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:77:32: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                        new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                    ^
                                                    std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:95:33: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                                new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                            ^
                                                            std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:95:33: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                                new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                            ^
                                                            std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:95:33: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                                new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                            ^
                                                            std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:95:33: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                                new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                            ^
                                                            std::
/home/miaokeda/Projects/CLionProjects/Piccolo-0.0.9/engine/3rdparty/JoltPhysics/Jolt/Core/FixedSizeFreeList.inl:95:33: error: unqualified call to 'std::forward' [-Werror,-Wunqualified-std-cast-call]
                                new (&storage.mData) Object(forward<Parameters>(inParameters)...);
                                                            ^
                                                            std::
12 errors generated.
[111/322] Building CXX object engine/3rdparty/spdlog/CMakeFiles/spdlog.dir/src/spdlog.cpp.o
ninja: build stopped: subcommand failed.

Desktop | 桌面环境

  • OS: Arch Linux
  • Version: 6.2.1-arch1-1
  • CPU: Intel i7 10875H
  • GPU: Nvidia RTX 2060 (Mobile) and Intel CometLake-H GT2 [UHD Graphics]
  • Memory 16G
  • Compiler Clang 15.0.7
@InverseDa InverseDa added the bug Something isn't working label Mar 2, 2023
@InverseDa
Copy link
Author

解决了,似乎是编译器的版本太新了。但我尝试根据报错的信息,修改了几处源代码就能编译出来了。
简单来说就是有些函数没有std名称空间的修饰从而编译错误,这可能是新版的clang限制严格而导致的。添加std::之后就能编译成功了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant