Giter Site home page Giter Site logo

Comments (6)

FelixPetriconi avatar FelixPetriconi commented on August 26, 2024

I already talked with him verbally about this problem.
I think we should state that using the default_executor from a shared library is problematic and it is even more complicated when the user use our own thread pool implementation.
Keep this issue open, I will add something to the docs.

from libraries.

mrbean-bremen avatar mrbean-bremen commented on August 26, 2024

Just for the record: the issue has been resolved on our side (with the help of @FelixPetriconi) by copying over the await implementation into that common compilation unit, and let it access the priority_task_system instance via a separate function compiled into that unit.

from libraries.

sean-parent avatar sean-parent commented on August 26, 2024

The best answer here is to build your dynamic libraries with default visibility. Another option would be to provide an export list to the linker for all the stlab namespace symbols (--export-dynamic-symbol-list=<file> if using ld or lld or a .def file on Windows). You must ensure that all dynamic libraries are built with the same stlab version and configuration.

I'd consider a PR the used [[gnu::visibility("default")]] in the required places - but if you go this route, please propose an example here so we can see how much it mucks with the code.

from libraries.

mrbean-bremen avatar mrbean-bremen commented on August 26, 2024

Thanks - yes, we are building all libraries with the same version and configuration.
About the visibility - would that really help in this case?
The problem here is that the implementation is all in header files (including the static allocation of the singleton), so there will be a separate instance created for each compilation unit. Would the linker be able to merge these, if using default visibilty? I've never used that, so I may have to read up on that first...

from libraries.

sean-parent avatar sean-parent commented on August 26, 2024

About the visibility - would that really help in this case?

Yes, linking with default visibility would fix it. All template instantiations are marked as "inline" to the linker so the linker will use the first instance it sees in all locations. If you are not linking with default visibility you are almost certainly causing (other) ODR violations as well.

from libraries.

mrbean-bremen avatar mrbean-bremen commented on August 26, 2024

Thank you, I will look into it!

from libraries.

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.