Skip to content

Missing __attribute__ ((__visibility__("default"))) with Clang on FreeBSD 11.1 #173

Closed

Description

@thelfer

Dear Boost.Python developpers,

First of all, thank you for your wonderfull work. I am using boost.python for several years with great satisfaction.

The issue is mostly described in the title: if we use the flag -fvisibility=hidden, the "init" function of a module is not visible and thus can not be loaded in python.

The issue is not present on Linux and gcc, because attribute ((visibility("default"))) is added to the declaration of this function.

A quick and dirty workaround is to compile the code with the BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY flag (see boost/python/config/detail.hpp).

I hope this helps.

Best regards,

Thomas Helfer

Activity

  1. stefanseefeld commented on Nov 5, 2017

    @stefanseefeld
    Member

    Hi Thomas,
    I believe I have merged a fix for this two weeks ago: #159 so the current develop branch should work for you. Please confirm !

  2. thelfer commented on Nov 5, 2017

    @thelfer
    Author

    Hi Stefan,
    Indeed, this does the trick. Sorry for the duplicate, I shall have been more cautious.
    Best regards,
    Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions