toml.lua
toml.lua copied to clipboard
Installation fails (under FreeBSD) with error: no member named 'construct'
Describe the bug
Installation using luarocks54 fails.
From my searches for the cause of the error, brief as they have been, this may be an issue with sol2. I have attempted to install the sol2 package directly under FreeBSD, but I see that during the luarocks54 installation of toml it clones it.
Version and Installation Info
- toml.lua version: 0.4.1
- Operating system: FreeBSD 14.3
- Installation method:
luarocks54 install toml - Compilation log, or Luarocks installation log:
$ luarocks54 install --local toml
Warning: falling back to wget - install luasec >= 1.1 to get native HTTPS support
Installing https://luarocks.org/toml-0.4.1-0.src.rock
toml 0.4.1-0 depends on lua >= 5.1 (5.4-1 provided by VM: success)
Warning: unmatched variable LUA_LIBRARIES
Warning: unmatched variable LINK_FLAGS
-- The C compiler identification is Clang 19.1.7
-- The CXX compiler identification is Clang 19.1.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Cloning toml++
-- Cloning sol2
-- Cloning magic_enum
-- Performing Test COMPILER_SUPPORTS_ARCH_NATIVE
-- Performing Test COMPILER_SUPPORTS_ARCH_NATIVE - Success
-- Configuring done (6.3s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks
[ 14%] Building CXX object CMakeFiles/toml.lua.dir/src/toml.cpp.o
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/src/toml.cpp:2:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/src/DataTypes/DateAndTime/dateAndTime.hpp:7:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/sol.hpp:52:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/stack.hpp:27:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/trampoline.hpp:27:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/types.hpp:28:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/optional.hpp:33:
/tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/optional_implementation.hpp:2194:10: error: no member named 'construct' in 'optional<type-parameter-0-0 &>'
2194 | this->construct(std::forward<Args>(args)...);
| ~~~~ ^
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/src/toml.cpp:2:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/src/DataTypes/DateAndTime/dateAndTime.hpp:7:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/sol.hpp:52:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/stack.hpp:32:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/stack_check_get.hpp:28:
/tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/stack_check_get_qualified.hpp:35:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
35 | #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
| ^
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/src/toml.cpp:2:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/src/DataTypes/DateAndTime/dateAndTime.hpp:7:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/sol.hpp:54:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/function.hpp:28:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/unsafe_function.hpp:30:
In file included from /tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/function_result.hpp:27:
/tmp/luarocks_toml-0.4.1-0-3045856/toml.lua/build.luarocks/_deps/sol2-src/include/sol/protected_function_result.hpp:104:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored [-Wunknown-warning-option]
104 | #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
| ^
2 warnings and 1 error generated.
gmake[2]: *** [CMakeFiles/toml.lua.dir/build.make:79: CMakeFiles/toml.lua.dir/src/toml.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:182: CMakeFiles/toml.lua.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
Error: Build error: Failed building.