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

no member named 'construct' in 'optional<type-parameter-0-0 &>' error in with Clang 19 #7097

Open
afarber opened this issue Jan 12, 2025 · 0 comments

Comments

@afarber
Copy link
Contributor

afarber commented Jan 12, 2025

Issue

When updating the file docker/Dockerfile-alpine alpine:3.20.5 -> alpine:3.21.2

Then these 2 programs are updated as can be seen in the "docker build" (attached):

Clang 17.0.6 -> Clang 19.1.4
cmake 3.29.3 -> cmake 3.31.1

And the following warning and error can be seen:

#10 5.460 CMake Warning (dev) at CMakeLists.txt:403 (find_package):
#10 5.460   Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
#10 5.460   --help-policy CMP0167" for policy details.  Use the cmake_policy command to
#10 5.460   set the policy and suppress this warning.
#10 5.460
#10 5.460 This warning is for project developers.  Use -Wno-dev to suppress it.
#10 189.5 In file included from /src/src/extractor/scripting_environment_lua.cpp:1:
#10 189.5 In file included from /src/include/extractor/scripting_environment_lua.hpp:15:
#10 189.5 /src/third_party/sol2/include/sol/sol.hpp:6755:10: error: no member named 'construct' in 'optional<type-parameter-0-0 &>'
#10 189.5  6755 |                         this->construct(std::forward<Args>(args)...);
#10 189.5       |                         ~~~~  ^

Steps to reproduce

Just change to alpine:3.21.2 in docker/Dockerfile-alpine and run:

docker build -f docker/Dockerfile-alpine --build-arg BUILD_CONCURRENCY=4 --build-arg DOCKER_TAG=tag222 --tag tag2 --memory=16g .

Fix

Please do not close this issue, I will submit a fix in few minutes based on these 2 webpages:

Fix for emplace compile error: ThePhD/sol2@d805d02
Fix for cmake warning: https://cmake.org/cmake/help/latest/policy/CMP0167.html

Logfiles

alpine-3.21.2-BROKEN.txt
alpine-3.21.2-FIXED.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant