Coder Social home page Coder Social logo

Comments (6)

rezzeted avatar rezzeted commented on September 22, 2024 2

I have the same problem

from vcpkg.

rjindael avatar rjindael commented on September 22, 2024

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.

from vcpkg.

Kojoley avatar Kojoley commented on September 22, 2024

It seems like either you or Boost.Container (or both) forgot to link to Threads::Threads.

from vcpkg.

rjindael avatar rjindael commented on September 22, 2024

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.

from vcpkg.

Kojoley avatar Kojoley commented on September 22, 2024

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.

from vcpkg.

dg0yt avatar dg0yt commented on September 22, 2024

Duplicates #38469.

from vcpkg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.