Giter Site home page Giter Site logo

Comments (4)

eao197 avatar eao197 commented on May 18, 2024 1

Hi! Thanks for reporting this.
Today is too late in my country. I'll take a look tomorrow.

from sobjectizer.

eao197 avatar eao197 commented on May 18, 2024 1

I don't know is it a correct way to go but if I change a line in ~/.conan/profiles/default:

- compiler.libcxx=libstdc++
+ compiler.libcxx=libstdc++11

and then perform commands:

conan install ../ --build=missing
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release

then the sample program compiled and linked without an errors.

from sobjectizer.

eao197 avatar eao197 commented on May 18, 2024

I suppose that the problem in the flag _GLIBCXX_USE_CXX11_ABI=0 that is added when Boost is mentioned in conanfile.txt.

If you don't use Boost then sample project is compiled with the following flags:

CXX_FLAGS =    -O2 -DNDEBUG    -std=gnu++17

CXX_DEFINES = -DSO_5_STATIC_LIB

CXX_INCLUDES = -isystem /root/.conan/data/sobjectizer/5.7.1/stiffstream/stable/package/2a30b7d6ea2202e5393ebda51c8729dd2162b9f8/include

But if Boost is added then an additional flag is added:

CXX_FLAGS =    -O2 -DNDEBUG    -D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++17

CXX_DEFINES = -DSO_5_STATIC_LIB

CXX_INCLUDES = -I/root/.conan/data/boost/1.73.0/_/_/package/91ae5bfe3845753bb397c926531b17117d20c8f9/include -I/root/.conan/data/zlib/1.2.11/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/include -I/root/.conan/data/bzip2/1.0.8/_/_/package/da606cf731e334010b0bf6e85a2a6f891b9f36b0/include -isystem /root/.conan/data/sobjectizer/5.7.1/stiffstream/stable/package/2a30b7d6ea2202e5393ebda51c8729dd2162b9f8/include

And I think that the presence of _GLIBCXX_USE_CXX11_ABI leads to different name mangling and because of that names of some SObjectizer's methods can't be found in the static library that was built (I suppose) without _GLIBCXX_USE_CXX11_ABI.

Unfortunately, I'm not an expert in Conan nor CMake and don't know how to fix it quickly. It needs some time for further investigation.

from sobjectizer.

foxtran avatar foxtran commented on May 18, 2024

Thank you so much! Your advice is working!

If you do not want to patch ~/.conan/profiles/default, you may specify compiler.libcxx by the following flag in conan install: -s compiler.libcxx=libstdc++11. The resulting commands are:

conan install ../ --build=missing -s compiler.libcxx=libstdc++11
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release

from sobjectizer.

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.