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 on Debian 11 #205

Open
trebor1718 opened this issue Feb 8, 2021 · 4 comments
Open

undefined symbol on Debian 11 #205

trebor1718 opened this issue Feb 8, 2021 · 4 comments

Comments

@trebor1718
Copy link

Hi!
I compiled and installed heekscad and heekscnc on Debian 11 "Bullseye" (current testing branch). When trying to Post-Process (generate the gcode), I get the following error:

18:38:56: Traceback (most recent call last):
  File "/tmp/post.py", line 6, in <module>
    import area
ImportError: /usr/lib/x86_64-linux-gnu/libboost_python39.so.1.74.0: undefined symbol: PyUnicode_AsUTF8String

18:38:56: Traceback (most recent call last):
  File "/usr/lib/heekscnc/backplot.py", line 8, in <module>
    machine_module = __import__('nc.' + reader, fromlist = ['dummy'])
  File "/usr/lib/heekscnc/nc/iso_read.py", line 8, in <module>
    import nc_read as nc
  File "/usr/lib/heekscnc/nc/nc_read.py", line 7, in <module>
    import area
ImportError: /usr/lib/x86_64-linux-gnu/libboost_python39.so.1.74.0: undefined symbol: PyUnicode_AsUTF8String

18:38:56: can't open file '/tmp/backplot.xml' (error 2: No such file or directory)

afterwards heekscad segfaults.

A similar error occurs with the packages from LP-PPA-neomilium-heekscnc-devel/groovy (and libboost-python1.71.0 downloaded from Ubuntu), but in this case the undefined symbol reported is _Py_tracemalloc_config

Is there a way to run heekscad and heekscnc on Debian 11?

BR
Robert

@fra589
Copy link

fra589 commented Feb 9, 2021

Hi Robert,

Maybe this has to do with the fact that the default version of Python in Debian Bullseye has been changed from 2.7 to 3.x ?

@++;
Gauthier.

@trebor1718
Copy link
Author

Hi Gauthier,
possibly, but 2.7 is still there and when compiling I had the dev libraries from python 2.7 on the system (hope I didn't overlook something).
I also tried compiling with 3.9 afterwards, which worked fine but there were different errors at postprocess then.

BR Robert

@fra589
Copy link

fra589 commented Feb 9, 2021

Hi Robert,

Only one of the two version is the default version.
When you type "python --version", you can see wich is the default version used by any software. If you want to use another, you must specify it (in Debian 11, you must explicitely type python2 to use this version).
You can change the default version, user based or system-wide. See procedure here:
https://linuxconfig.org/how-to-change-from-default-to-alternative-python-version-on-debian-linux

It is not recommended to modify the system-wide default Python version since some of the system scripts depend of it.
I advise you instead to use an alias:
$ alias python='/usr/bin/python2'
For testing, and thus change it only when you need it.

@++;
Gauthier.

@trebor1718
Copy link
Author

Hi Gauthier!

It looks like all this does not change anything.

I found there is a new way of defining the standard python version in Bullseye. There are 4 packages available: python-is-python2, python-dev-is-python2 and the same with python3. Those packages only create symlinks to the actual python files of the corresponding version. The description also says that this is only for compatibility with programs not from the repo, as they don't provide packages depending on the python command without version number anymore.

heekscad and heekscnc depend on python, which seems to be only provided by python-is-python2.
Same with python-dev: apt-get selects python-dev-is-python2 instead when installing according to the wiki.
The corresponding python3 packages do not satisfy that dependencies. So I to me it looks pretty sure that heekscad still compiles against and uses python2.7. What do you think?

One possible thing I found is that libboost-python1.74.0 is depending on python3. But this seems to be the case also for the ubuntu Groovy packages, and they still worked some months ago.
Is there anything else I can check or try?

$ python --version
Python 2.7.18
$ LANG=C dpkg -l libboost-python1.74.0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version      Architecture Description
+++-=====================-============-============-=================================
ii  libboost-python1.74.0 1.74.0-8     amd64        Boost.Python Library
$

BR Robert

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

2 participants