Skip to content

Errors with homebrew python3 after successful compilation #6

Open
@shakfu

Description

@shakfu

I compiled flext successfully and used the following to build py without errors (python3.9 is installed via homebrew):

NP_INCL=`python3 -c "import numpy; print(numpy.get_include())"`
make CPPFLAGS="-I ../flext/source -DPY_NUMPY" \
     CFLAGS="-mmacosx-version-min=10.9 `python3-config --cflags` -I $NP_INCL" \
     LDFLAGS="-mmacosx-version-min=10.9 `python3-config --ldflags`"

After trying to run in PD, I get the following errors:

pyext simple ex3
... couldn't create
/Users/me/py/py.pd_darwin: dlopen(/Users/me/py/py.pd_darwin, 10): Symbol not found: _PyCapsule_Type
  Referenced from: /Users/me/py/py.pd_darwin
  Expected in: flat namespace
 in /Users/me/py/py.pd_darwin
 py script strcat
... couldn't create
/Users/me/py/py.pd_darwin: dlopen(/Users/me/py/py.pd_darwin, 10): Symbol not found: _PyCapsule_Type
  Referenced from: /Users/me/py/py.pd_darwin
  Expected in: flat namespace
 in /Users/me/py/py.pd_darwin
 py script addall
... couldn't create
/Users/me/py/py.pd_darwin: dlopen(/Users/me/py/py.pd_darwin, 10): Symbol not found: _PyCapsule_Type
  Referenced from: /Users/me/py/py.pd_darwin
  Expected in: flat namespace
 in /Users/me/py/py.pd_darwin
 py script
... couldn't create
/Users/me/py/py.pd_darwin: dlopen(/Users/me/py/py.pd_darwin, 10): Symbol not found: _PyCapsule_Type
  Referenced from: /Users/me/py/py.pd_darwin
  Expected in: flat namespace
 in /Users/me/py/py.pd_darwin
 py script strlen
... couldn't create
/Users/me/py/py.pd_darwin: dlopen(/Users/me/py/py.pd_darwin, 10): Symbol not found: _PyCapsule_Type
  Referenced from: /Users/me/py/py.pd_darwin
  Expected in: flat namespace
 in /Users/me/py/py.pd_darwin
 py script ret3
... couldn't create

Furthermore, running otool -L on the external shows that its not linked to any python lib:

$ otool -L py.pd_darwin
py.pd_darwin:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1677.104.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 902.1.0)

Any ideas on what to do next?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions