Open tekinas opened 5 months ago
Also having this issue. Full logs:
[4/9] /home/rj/dev/emsdk/upstream/emscripten/em++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/rj/dev/kiseki/aya/build/vcpkg_installed/wasm32-emscripten/include -g -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o -MF libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o.d -o libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o -c /home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/synchronized_pool_resource.cpp
FAILED: libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o
/home/rj/dev/emsdk/upstream/emscripten/em++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/rj/dev/kiseki/aya/build/vcpkg_installed/wasm32-emscripten/include -g -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o -MF libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o.d -o libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o -c /home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/synchronized_pool_resource.cpp
In file included from /home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/synchronized_pool_resource.cpp:14:
/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:109:12: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
109 | extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(::_RTL_CRITICAL_SECTION *);
| ^
/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:109:39: warning: '__stdcall' calling convention is not supported for this target [-Wignored-attributes]
109 | extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(::_RTL_CRITICAL_SECTION *);
| ^
/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:111:12: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
111 | extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRITICAL_SECTION *);
| ^
/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:111:39: warning: '__stdcall' calling convention is not supported for this target [-Wignored-attributes]
111 | extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRITICAL_SECTION *);
| ^
/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:112:12: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
112 | extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *);
| ^
/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:112:39: warning: '__stdcall' calling convention is not supported for this target [-Wignored-attributes]
112 | extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *);
| ^
/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:113:12: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
113 | extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(::_RTL_CRITICAL_SECTION *);
| ^
/home/rj/dev/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:113:39: warning: '__stdcall' calling convention is not supported for this target [-Wignored-attributes]
113 | extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(::_RTL_CRITICAL_SECTION *);
| ^
4 warnings and 4 errors generated.
Adding -fdeclspec
/-fms-extensions
to my CMAKE_CXX_COMPILER_FLAGS, either in my configure settings or through my CMakeLists (using add_compile_options) doesn't seem to work either.
It seems like either you or Boost.Container (or both) forgot to link to Threads::Threads
.
It seems like either you or Boost.Container (or both) forgot to link to
Threads::Threads
.
I am not sure how this would be the source of the problem. In my case, I am installing "boost" entirely in my vcpkg JSON manifest, and in my app's CMakeLists I run find_package(Boost COMPONENTS filesystem system iostreams thread exception program_options REQUIRED)
. I am convinced it is a problem with Boost itself -- however, if that is the case, then it is more likely because of the __declspec
keyword not being recognized by the compiler since it is not being run with the -fms-extensions
flag.
It seems like either you or Boost.Container (or both) forgot to link to
Threads::Threads
.I am not sure how this would be the source of the problem. In my case, I am installing "boost" entirely in my vcpkg JSON manifest, and in my app's CMakeLists I run
find_package(Boost COMPONENTS filesystem system iostreams thread exception program_options REQUIRED)
. I am convinced it is a problem with Boost itself -- however, if that is the case, then it is more likely because of the__declspec
keyword not being recognized by the compiler since it is not being run with the-fms-extensions
flag.
Because Boost.Container code is structured the way that windows platform specific code is a 'fallback' - when pthreads wasn't enabled (emscripten is not windows, it doesn't have winapi) you are getting these errors. Emscripten shouldn't get in that code path in the first place.
I have the same problem
Duplicates #38469.
Package: boost-container:wasm32-emscripten@1.85.0
Host Environment
To Reproduce
vcpkg install boost-math:wasm32-emscripten
Failure logs
/home/tekinas/Documents/vcpkg/buildtrees/boost-container/install-wasm32-emscripten-rel-out.log
``` Change Dir: '/home/tekinas/Documents/vcpkg/buildtrees/boost-container/wasm32-emscripten-rel' Run Build Command(s): /home/tekinas/Documents/vcpkg/downloads/tools/ninja/1.10.2-linux/ninja -v -v -j9 install [1/9] /home/tekinas/Documents/emsdk/upstream/emscripten/em++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/tekinas/Documents/vcpkg/installed/wasm32-emscripten/include -O3 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/dlmalloc.cpp.o -MF libs/container/CMakeFiles/boost_container.dir/src/dlmalloc.cpp.o.d -o libs/container/CMakeFiles/boost_container.dir/src/dlmalloc.cpp.o -c /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/dlmalloc.cpp [2/9] /home/tekinas/Documents/emsdk/upstream/emscripten/em++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/tekinas/Documents/vcpkg/installed/wasm32-emscripten/include -O3 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/unsynchronized_pool_resource.cpp.o -MF libs/container/CMakeFiles/boost_container.dir/src/unsynchronized_pool_resource.cpp.o.d -o libs/container/CMakeFiles/boost_container.dir/src/unsynchronized_pool_resource.cpp.o -c /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/unsynchronized_pool_resource.cpp [3/9] /home/tekinas/Documents/emsdk/upstream/emscripten/em++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/tekinas/Documents/vcpkg/installed/wasm32-emscripten/include -O3 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o -MF libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o.d -o libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o -c /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/synchronized_pool_resource.cpp FAILED: libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o /home/tekinas/Documents/emsdk/upstream/emscripten/em++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/tekinas/Documents/vcpkg/installed/wasm32-emscripten/include -O3 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o -MF libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o.d -o libs/container/CMakeFiles/boost_container.dir/src/synchronized_pool_resource.cpp.o -c /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/synchronized_pool_resource.cpp In file included from /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/synchronized_pool_resource.cpp:14: /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:109:12: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes 109 | extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(::_RTL_CRITICAL_SECTION *); | ^ /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:109:39: warning: '__stdcall' calling convention is not supported for this target [-Wignored-attributes] 109 | extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(::_RTL_CRITICAL_SECTION *); | ^ /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:111:12: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes 111 | extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRITICAL_SECTION *); | ^ /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:111:39: warning: '__stdcall' calling convention is not supported for this target [-Wignored-attributes] 111 | extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRITICAL_SECTION *); | ^ /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:112:12: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes 112 | extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *); | ^ /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:112:39: warning: '__stdcall' calling convention is not supported for this target [-Wignored-attributes] 112 | extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *); | ^ /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:113:12: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes 113 | extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(::_RTL_CRITICAL_SECTION *); | ^ /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include/boost/container/detail/thread_mutex.hpp:113:39: warning: '__stdcall' calling convention is not supported for this target [-Wignored-attributes] 113 | extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(::_RTL_CRITICAL_SECTION *); | ^ 4 warnings and 4 errors generated. [4/9] /home/tekinas/Documents/emsdk/upstream/emscripten/em++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/tekinas/Documents/vcpkg/installed/wasm32-emscripten/include -O3 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/monotonic_buffer_resource.cpp.o -MF libs/container/CMakeFiles/boost_container.dir/src/monotonic_buffer_resource.cpp.o.d -o libs/container/CMakeFiles/boost_container.dir/src/monotonic_buffer_resource.cpp.o -c /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/monotonic_buffer_resource.cpp [5/9] /home/tekinas/Documents/emsdk/upstream/emscripten/em++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/tekinas/Documents/vcpkg/installed/wasm32-emscripten/include -O3 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/pool_resource.cpp.o -MF libs/container/CMakeFiles/boost_container.dir/src/pool_resource.cpp.o.d -o libs/container/CMakeFiles/boost_container.dir/src/pool_resource.cpp.o -c /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/pool_resource.cpp [6/9] /home/tekinas/Documents/emsdk/upstream/emscripten/em++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/tekinas/Documents/vcpkg/installed/wasm32-emscripten/include -O3 -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/global_resource.cpp.o -MF libs/container/CMakeFiles/boost_container.dir/src/global_resource.cpp.o.d -o libs/container/CMakeFiles/boost_container.dir/src/global_resource.cpp.o -c /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/global_resource.cpp [7/9] /home/tekinas/Documents/emsdk/upstream/emscripten/emcc -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -I/home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/include -isystem /home/tekinas/Documents/vcpkg/installed/wasm32-emscripten/include -O3 -DNDEBUG -fvisibility=hidden -MD -MT libs/container/CMakeFiles/boost_container.dir/src/alloc_lib.c.o -MF libs/container/CMakeFiles/boost_container.dir/src/alloc_lib.c.o.d -o libs/container/CMakeFiles/boost_container.dir/src/alloc_lib.c.o -c /home/tekinas/Documents/vcpkg/buildtrees/boost-container/src/ost-1.85.0-b589bd4c0b.clean/libs/container/src/alloc_lib.c ninja: build stopped: subcommand failed. ```