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

Release version of shared library broken (at least for Asio code) #31

Closed
erakadjiev opened this issue Feb 26, 2015 · 1 comment
Closed

Comments

@erakadjiev
Copy link

Hi Oliver,

This is the issue that was traced down in #29. I encountered it today again with another application. Because #29 was originally not about this problem, and you closed it meanwhile anyway, I'm opening a new one.

Problem: When dynamically linking against the RELEASE version of the Boost Fiber shared library, compilation and linking are successful, but when the binary is run, it fails.
The problem occurs with the "official" Boost Fiber Asio examples, and also with two different applications of mine.

When dynamically linking against the debug shared library, or statically linking against either the debug or release static library, everything works.

Note: I have tested this only with code using Asio. I don't know if the issue affects non-Asio Fibers code.

Environment: Ubuntu 14.04 64-bit, GCC 4.9.2, latest Modular Boost, latest Boost Fiber (develop) branch

To reproduce it with the official examples:

  1. cd /modboost-folder/libs/fiber/examples
  2. Change Jamfile.v2:
    -      <link>static
    +      <link>shared
    +      <linkflags>-lboost_context
    +      <linkflags>-lboost_thread
    
  3. debug build:
    • b2 toolset=gcc cxxflags="-std=c++14" address-model=64 architecture=x86 debug
      cd /modboost-folder/bin.v2/libs/fiber/examples/gcc-4.9.2/debug/address-model-64/architecture-x86/threading-multi/asio
    • In one terminal ./echo_server 1234, in another ./echo_client 127.0.0.1 1234
    • Works
  4. release build
    • b2 toolset=gcc cxxflags="-std=c++14" address-model=64 architecture=x86 release
      cd /modboost-folder/bin.v2/libs/fiber/examples/gcc-4.9.2/release/address-model-64/architecture-x86/threading-multi/asio
    • In one terminal ./echo_server 1234, in another ./echo_client 127.0.0.1 1234
    • Doesn't work
@olk
Copy link
Member

olk commented Dec 15, 2015

do you have checked your library-search-paths?

@olk olk closed this as completed Dec 15, 2015
@jxfwinter jxfwinter mentioned this issue Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants