Skip to content

initModule symbol not visible in 1.64 #131

Closed

Description

@rosswhitfield

I'm compiling a project that sets the default visibility to hidden using CMAKE_CXX_VISIBILITY_PRESET=hidden. This worked in 1.63 as the initModule is set back to default here, unfortunately after #1 BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY is no longer defined so the visibility is not getting set back to default.

So I'm getting errors like ImportError: dynamic module does not define init function (init_kernel) and the equivalent for python 3 ImportError: dynamic module does not define module export function (PyInit__kernel)

Activity

  1. lukaszforynski commented on Aug 22, 2017

    @lukaszforynski

    This seems to be the offending change..

    include/boost/python/object/instance.hpp
    @@ -11,7 +11,7 @@
     
     namespace boost { namespace python
     {
    -  struct BOOST_PYTHON_DECL_FORWARD instance_holder;
    +  struct instance_holder;
     }} // namespace boost::python
     
     namespace boost { namespace python { namespace objects { 

    Changing it back (*to what was originally intended? in #1):

    include/boost/python/object/instance.hpp
    @@ -11,7 +11,7 @@
     
     namespace boost { namespace python
     {
    -  struct instance_holder;
    +  struct BOOST_PYTHON_DECL instance_holder;
    
     }} // namespace boost::python
     
     namespace boost { namespace python { namespace objects { 

    Seems to fix the issue.

  2. added a commit that references this issue on Aug 22, 2017
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