Code Monkey home page Code Monkey logo

Comments (4)

rezzeted avatar rezzeted commented on July 17, 2024

Error on vcpkg

from container.

dg0yt avatar dg0yt commented on July 17, 2024

Basically it uses windows code because it doesn't see pthreads.

from container.

igaztanaga avatar igaztanaga commented on July 17, 2024

Sorry but the library does not support emscriptem and it's not tested in that platform.

It seems that Emscriptem wronly defines "_POSIX_THREADS " as -1, since POSIX defines that meaning quite well:

If a symbolic constant is defined with the value -1, the option is not supported. Headers, data types, and function interfaces required only for the option need not be supplied. An application that attempts to use anything associated only with the option is considered to be requiring an extension.

from container.

dg0yt avatar dg0yt commented on July 17, 2024

The _POSIX_THREADS value on emscripten changes with -pthread which is the official way to enable it.
https://emscripten.org/docs/porting/pthreads.html#compiling-with-pthreads-enabled
However, even cmake's

  set(THREADS_PREFER_PTHREAD_FLAG 1)
  find_package(Threads REQUIRED)

doesn't add the flag, so it has to be done explicitly.

https://github.com/microsoft/vcpkg/pull/38806/files#diff-8728338e87238c609e4a490888aebbc1d428166bdc0a0b6b1303281b27732a0e

The other point is that the (CMake) build behaviour is misleading: If it doesn't find POSIX threads, it immediately uses Windows code, even on non-Windows platforms. This leads to unexpected error messages which do not point to the lack of POSIX threads.

from container.

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.