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

undefined symbol: Py_InitModule #12

Open
lefuturiste opened this issue Nov 1, 2018 · 3 comments
Open

undefined symbol: Py_InitModule #12

lefuturiste opened this issue Nov 1, 2018 · 3 comments

Comments

@lefuturiste
Copy link

when running, whatever the case

Traceback (most recent call last):
  File "/usr/bin/btproxy", line 4, in <module>
    __import__('pkg_resources').run_script('btproxy==0.1', 'btproxy')
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 661, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1441, in run_script
    exec(code, namespace, namespace)
  File "/usr/lib/python3.7/site-packages/btproxy-0.1-py3.7-linux-x86_64.egg/EGG-INFO/scripts/btproxy", line 4, in <module>
    from libbtproxy.argparser import args,parser
  File "/usr/lib/python3.7/site-packages/btproxy-0.1-py3.7-linux-x86_64.egg/libbtproxy/__init__.py", line 3, in <module>
    import clone
ImportError: /usr/lib/python3.7/site-packages/btproxy-0.1-py3.7-linux-x86_64.egg/clone.cpython-37m-x86_64-linux-gnu.so: undefined symbol: Py_InitModule
@tachwali
Copy link

it seems this is a python 3 support issue. I encounter this problem with cosim flow (python driver) but not with simulation

@HengLou
Copy link

HengLou commented Feb 16, 2021

I encountered this issue with python 3.8. Anyone have a solution to build btproxy?

@Furuidemu
Copy link

I encountered this issue with python 3.8. Anyone have a solution to build btproxy?

Replacing https://github.com/conorpp/btproxy/blob/master/lib/btproxy_clone.c#L118 with #if PY_MAJOR_VERSION >= 3 at least makes btproxy run on my machine

If you don't want to edit the c file, you can also define a macro in btproxy/setup.py

git clone https://github.com/conorpp/btproxy
sed -i "12a\ \ \ \ define_macros=[('PYTHON34', 'true')]," btproxy/setup.py
cd btproxy 
sudo python3 setup.py install 

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

4 participants