Build fail after 98% compiling: raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:88:51: error: ‘numeric_limits’ is not a member of ‘std’ and at linking time: undefined reference to `lua_newuserdatauv'
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 領域
- build-system
調査の方向性
Start with vendor/sol2/include/sol/stack_core.hpp and the CMake configuration used to build raylib-lua-sol. Reproduce the reported compile and link failures, then inspect how the Lua library and sol2 dependency are selected and linked. Done means the project builds through the raylib-lua-sol executable without the numeric_limits or lua_newuserdatauv errors.
索引モデルが issue の本文から書いたものです。
説明
Applied patch as in #45
There is still an issue with the sol2 vendor dependency (at bottom the patch)
[ 96%] Built target raylib
[ 98%] Building CXX object bin/CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o
In file included from /home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack.hpp:28,
from /home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/sol.hpp:50,
from /home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/raylib-lua-sol.cpp:54:
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp: In function ‘void sol::detail::align_one(std::size_t, std::size_t, void*&)’:
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:88:51: error: ‘numeric_limits’ is not a member of ‘std’
88 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~~~~~~~~~~~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:88:77: error: expected primary-expression before ‘>’ token
88 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:88:80: error: ‘::max’ has not been declared; did you mean ‘std::max’?
88 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~
| std::max
In file included from /usr/include/c++/14.2.1/algorithm:61,
from /home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:43:
/usr/include/c++/14.2.1/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here
5715 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp: In function ‘void* sol::detail::align_usertype_pointer(void*)’:
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:111:51: error: ‘numeric_limits’ is not a member of ‘std’
111 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~~~~~~~~~~~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:111:77: error: expected primary-expression before ‘>’ token
111 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:111:80: error: ‘::max’ has not been declared; did you mean ‘std::max’?
111 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~
| std::max
/usr/include/c++/14.2.1/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here
5715 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp: In function ‘void* sol::detail::align_usertype_unique_destructor(void*)’:
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:133:51: error: ‘numeric_limits’ is not a member of ‘std’
133 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~~~~~~~~~~~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:133:77: error: expected primary-expression before ‘>’ token
133 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:133:80: error: ‘::max’ has not been declared; did you mean ‘std::max’?
133 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~
| std::max
/usr/include/c++/14.2.1/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here
5715 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp: In function ‘void* sol::detail::align_usertype_unique_tag(void*)’:
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:155:51: error: ‘numeric_limits’ is not a member of ‘std’
155 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~~~~~~~~~~~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:155:77: error: expected primary-expression before ‘>’ token
155 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:155:80: error: ‘::max’ has not been declared; did you mean ‘std::max’?
155 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~
| std::max
/usr/include/c++/14.2.1/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here
5715 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp: In function ‘void* sol::detail::align_usertype_unique(void*)’:
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:178:51: error: ‘numeric_limits’ is not a member of ‘std’
178 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~~~~~~~~~~~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:178:77: error: expected primary-expression before ‘>’ token
178 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:178:80: error: ‘::max’ has not been declared; did you mean ‘std::max’?
178 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~
| std::max
/usr/include/c++/14.2.1/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here
5715 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp: In function ‘void* sol::detail::align_user(void*)’:
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:195:51: error: ‘numeric_limits’ is not a member of ‘std’
195 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~~~~~~~~~~~~
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:195:77: error: expected primary-expression before ‘>’ token
195 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^
/home/pop/.cache/pacaur/raylib-lua-sol-git/src/raylib-lua-sol/bin/../vendor/sol2/include/sol/stack_core.hpp:195:80: error: ‘::max’ has not been declared; did you mean ‘std::max’?
195 | std::size_t space = (std::numeric_limits<std::size_t>::max)();
| ^~~
| std::max
/usr/include/c++/14.2.1/bits/stl_algo.h:5715:5: note: ‘std::max’ declared here
5715 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
make[2]: *** [bin/CMakeFiles/raylib-lua-sol.dir/build.make:79: bin/CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1296: bin/CMakeFiles/raylib-lua-sol.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
==> ERROR: A failure occurred in build().
Need to apply this patch in vendor/sol2 directory:
patch -p1 -i <path_to>sol2_stdexcept.patch
diff --git a/include/sol/stack_core.hpp b/include/sol/stack_core.hpp
index aef8e47e..5b86db5b 100644
--- a/include/sol/stack_core.hpp
+++ b/include/sol/stack_core.hpp
@@ -43,6 +43,8 @@
#include <algorithm>
#include <sstream>
#include <optional>
+#include <stdexcept>
+#include <limits>
namespace sol {
namespace detail {
Still fail at linking time (undefined reference to `lua_newuserdatauv'):
[100%] Linking CXX executable raylib-lua-sol
/usr/bin/ld: CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o: in function `sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#1}, raylib_lua_sol_structs(sol::state&)::{lambda(Rectangle const&)#1}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float, float, float)#1}>* sol::detail::user_allocate<sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#1}, raylib_lua_sol_structs(sol::state&)::{lambda(Rectangle const&)#1}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float, float, float)#1}> >(lua_State*)':
raylib-lua-sol.cpp:(.text+0x439b8): undefined reference to `lua_newuserdatauv'
/usr/bin/ld: CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o: in function `sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#2}, raylib_lua_sol_structs(sol::state&)::{lambda(unsigned char, unsigned char, unsigned char)#1}, raylib_lua_sol_structs(sol::state&)::{lambda(unsigned char, unsigned char, unsigned char, unsigned char)#1}>* sol::detail::user_allocate<sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#2}, raylib_lua_sol_structs(sol::state&)::{lambda(unsigned char, unsigned char, unsigned char)#1}, raylib_lua_sol_structs(sol::state&)::{lambda(unsigned char, unsigned char, unsigned char, unsigned char)#1}> >(lua_State*)':
raylib-lua-sol.cpp:(.text+0x44384): undefined reference to `lua_newuserdatauv'
/usr/bin/ld: CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o: in function `sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#3}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float)#1}>* sol::detail::user_allocate<sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#3}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float)#1}> >(lua_State*)':
raylib-lua-sol.cpp:(.text+0x44700): undefined reference to `lua_newuserdatauv'
/usr/bin/ld: CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o: in function `sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#4}, raylib_lua_sol_structs(sol::state&)::{lambda(float)#1}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float)#2}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float, float)#1}>* sol::detail::user_allocate<sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#4}, raylib_lua_sol_structs(sol::state&)::{lambda(float)#1}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float)#2}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float, float)#1}> >(lua_State*)':
raylib-lua-sol.cpp:(.text+0x45794): undefined reference to `lua_newuserdatauv'
/usr/bin/ld: CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o: in function `sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#5}, raylib_lua_sol_structs(sol::state&)::{lambda(float)#2}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float)#3}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float, float)#2}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float, float, float)#2}>* sol::detail::user_allocate<sol::function_detail::overloaded_function<0, raylib_lua_sol_structs(sol::state&)::{lambda()#5}, raylib_lua_sol_structs(sol::state&)::{lambda(float)#2}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float)#3}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float, float)#2}, raylib_lua_sol_structs(sol::state&)::{lambda(float, float, float, float)#2}> >(lua_State*)':
raylib-lua-sol.cpp:(.text+0x4685c): undefined reference to `lua_newuserdatauv'
/usr/bin/ld: CMakeFiles/raylib-lua-sol.dir/raylib-lua-sol.cpp.o:raylib-lua-sol.cpp:(.text+0x46fd4): more undefined references to `lua_newuserdatauv' follow
collect2: error: ld returned 1 exit status
make[2]: *** [bin/CMakeFiles/raylib-lua-sol.dir/build.make:109: bin/raylib-lua-sol] Error 1
make[1]: *** [CMakeFiles/Makefile2:1296: bin/CMakeFiles/raylib-lua-sol.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
- 主要言語
- C++
- スター
- 122
- フォーク
- 22
- 平均マージ
- 50分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RobLoach/raylib-lua-sol のほかの issue
-
Compile for Android?オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
RobLoach/raylib-lua-sol#49 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
RobLoach/raylib-lua-sol#45 · コメント 7 件 ·
-
fatal error C1060オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
RobLoach/raylib-lua-sol#44 ·
-
.editorconfig fileオープン
難易度 1/5 1時間未満 初心者へのやさしさ 48/100
RobLoach/raylib-lua-sol#41 · コメント 5 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
RobLoach/raylib-lua-sol#36 · コメント 1 件 ·
RobLoach/raylib-lua-sol の issue をすべて見る
似ている issue
-
backlog bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
EchoTools/nevr-runtime#653 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
InfiniTimeOrg/InfiniTime#2492 ·
-
accessibility good first issue hacktoberfest help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
OpenChemistry/avogadrolibs#3184 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Tracktion/tracktion_engine#475 ·
メンテナーはふだん 1 日以内に返信