xantares / nfc-bindings

scripting language bindings for libnfc
BSD 3-Clause "New" or "Revised" License
23 stars 9 forks source link

"undefined symbol: fromPyString" on Ubuntu 18.04 #11

Closed z3ntu closed 5 years ago

z3ntu commented 5 years ago

Distribution is Ubuntu 18.04

$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=~/.local -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.6 ..
$ make install
$ python3 /home/user/.local/share/nfc-bindings/examples/nfc-list.py
Traceback (most recent call last):                                                                       
  File "/home/user/.local/lib/python3.6/site-packages/nfc.py", line 17, in swig_import_helper         
    return importlib.import_module(mname)                                                                
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module                            
    return _bootstrap._gcd_import(name[level:], package, level)                                          
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import                                         
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load                                      
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked                             
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked                                      
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec                                    
  File "<frozen importlib._bootstrap_external>", line 922, in create_module                              
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed                           
ImportError: /home/user/.local/lib/python3.6/site-packages/_nfc.so: undefined symbol: fromPyString    

During handling of the above exception, another exception occurred:                                      

Traceback (most recent call last):                                                                       
  File "/home/user/.local/share/nfc-bindings/examples/nfc-list.py", line 7, in <module>               
    import nfc                                                                                           
  File "/home/user/.local/lib/python3.6/site-packages/nfc.py", line 20, in <module>                   
    _nfc = swig_import_helper()                                                                          
  File "/home/user/.local/lib/python3.6/site-packages/nfc.py", line 19, in swig_import_helper         
    return importlib.import_module('_nfc')                                                               
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module                            
    return _bootstrap._gcd_import(name[level:], package, level)                                          
ImportError: /home/user/.local/lib/python3.6/site-packages/_nfc.so: undefined symbol: fromPyString

On commit a754afb30a0a3ee3145c031a34809520c63dd8b5 it still works properly.

xantares commented 5 years ago

Fixed in 8f6507dd7a16d2e28ff712f798150b4b72eeefa6