dayjaby / zebra-scanner

Read barcodes in python with zebra barcode scanner
MIT License
23 stars 18 forks source link

undefined symbol: _Z11GetScannersPtPSt6vectorIjSaIjEERSsP8StatusID #24

Closed nProuteau closed 2 years ago

nProuteau commented 2 years ago

Hello, i have an issue trying to use zebra-scanner package. Installation of the package and libraries was not a problem as well as the SDK in prerequisites but when testing the example code i have an ImportError like this :

File "test_QR.py", line 5, in from zebra_scanner import CoreScanner ImportError: /lib/python3.8/site-packages/zebra_scanner.cpython-38-i386-linux-gnu.so: undefined symbol: _Z11GetScannersPtPSt6vectorIjSaIjEERSsP8StatusID

I tried to installing the package from the repo with "pip3 install . " and with "pip3 install zebra-scanner" but both gives the same error. Also, the file "zebra_scanner.cpython-38-i386-linux-gnu.so" exists and is where it should be.

Zebra Scanner Model: DS457 Ubuntu 16.04 LTS SDK installed: SDK_for_Linux_v4.4.1-16_Debian_Packages_x86_32bit_C11

Thank you in advance for your help

nProuteau commented 2 years ago

Sorry it was a similar issue than with #1 .

dayjaby commented 2 years ago

You upgraded your gcc or what helped fix the issue? Nice that it's working for you now :)

nProuteau commented 2 years ago

To fix the issue i commented on the line #define _GLIBCXX_USE_CXX11_ABI 0 as shown in the referenced issue but may be upgrading gcc is a better solution. after this error, i encountered the segmentation fault error but solved it by adding o.inc_ref() as proposed but is it a stable solution from the best of your knowledge ?