Python issues on Bookworm

More
23 Nov 2022 21:16 - 27 Nov 2022 01:11 #257512 by mwc
I've finally managed to get Debian 12 (Bookworm) installed on a new Odroid H3+ (along with ethercat), but LinuxCNC won't open any of the screens that need Python.
This is the output from trying to load gmocapy -

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.0~pre0+git20221105.ffb6bda926
Machine configuration directory is '/home/moray/linuxcnc/configs/sim.gmoccapy'
Machine configuration file is 'gmoccapy.ini'
INIFILE=/home/moray/linuxcnc/configs/sim.gmoccapy/gmoccapy.ini
VERSION=1.1

check_config:
  Unexpected multiple values [JOINT_0]HOME: 0.000 10
  Unexpected multiple values [JOINT_1]HOME: 0.000 10
  Unexpected multiple values [JOINT_2]HOME: 0.0 -10

PARAMETER_FILE=sim.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=halui
DISPLAY=gmoccapy
COORDINATES=X Y Z
KINEMATICS=trivkins coordinates=xyz
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./core_sim.hal
Found file(REL): ./spindle_sim.hal
Found file(REL): ./simulated_home.hal
Starting TASK program: milltask
Starting DISPLAY program: gmoccapy
Shutting down and cleaning up LinuxCNC...
task: 823 cycles, min=0.000007, max=0.002603, avg=0.001029, 0 latency excursions (> 10x expected cycle time of 0.001000s)
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
Traceback (most recent call last):
  File "/usr/bin/gmoccapy", line 43, in <module>
    import gladevcp.makepins   # needed for the dialog"s calculator widget
  File "/usr/lib/python3/dist-packages/gladevcp/__init__.py", line 1, in <module>
    from .hal_pythonplugin import *
  File "/usr/lib/python3/dist-packages/gladevcp/hal_pythonplugin.py", line 30, in <module>
    from .hal_gremlin import HAL_Gremlin
  File "/usr/lib/python3/dist-packages/gladevcp/hal_gremlin.py", line 36, in <module>
    import gremlin
  File "/usr/lib/python3/dist-packages/gremlin.py", line 49, in <module>
    from OpenGL.GLUT import *
  File "/usr/lib/python3/dist-packages/OpenGL/GLUT/__init__.py", line 5, in <module>
    from OpenGL.GLUT.fonts import *
  File "/usr/lib/python3/dist-packages/OpenGL/GLUT/fonts.py", line 20, in <module>
    p = platform.getGLUTFontPointer( name )
  File "/usr/lib/python3/dist-packages/OpenGL/platform/baseplatform.py", line 350, in getGLUTFontPointer
    raise NotImplementedError(
NotImplementedError: Platform does not define a GLUT font retrieval function
10481
10525
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime


All python screens ultimately generate the same NotImplementedError: Platform does not define a GLUT font retrieval function error.
The tklinuxcnc screen loads without any issues.

From searching, it appears to have something to do with Bookworm using Python 3.10 as default and not having VTK.

Is it possible to downgrade python?
Or is there any other easy(ish) fix?
Or should I just start again with Bullseye?

Edit - Buster doesn't fully support the H3, as it doesn't recognise the network ports, or run at a decent screen resolution.
Last edit: 27 Nov 2022 01:11 by mwc. Reason: Fixed formatting

Please Log in or Create an account to join the conversation.

More
24 Nov 2022 18:12 - 24 Nov 2022 18:23 #257569 by JPL
Replied by JPL on topic Python issues on Bookworm

For example on do my assignments for me uk, you would use dnf:
 

 

SPAM

Original version (without spam link) : docs.python-guide.org/starting/install3/linux/
Note that the text "Fedora" from the original was replaced with a link (SPAM) to "do my assigment for me uk"
Clever, but still spam.
Last edit: 24 Nov 2022 18:23 by JPL. Reason: Damn editor :(
The following user(s) said Thank You: tommylight, snowgoer540

Please Log in or Create an account to join the conversation.

More
25 Nov 2022 02:05 #257591 by rodw
Replied by rodw on topic Python issues on Bookworm
Steffan, Linuxcnc's Debian developer has been able to build a Bookworm ISO containing Linuxcnc. He shared a copy with me via Google Drive earlier today for testing.
He's aware of this issue and wants to try his ISO on different hardware before proceeding further.

Unfortunately, I've been unable to pull his ISO down as when I did, I found out I have a network fault on our incoming fibre and am running on a sloooow 4G failover link.
 

Please Log in or Create an account to join the conversation.

More
25 Nov 2022 07:26 #257597 by mwc
Replied by mwc on topic Python issues on Bookworm
If Steffan is willing to share the link, I'm willing to give it a try.
I'm probably going to start with a fresh Bullseye install, but can try Bookworm again before I do that.

Please Log in or Create an account to join the conversation.

More
25 Nov 2022 17:13 #257631 by mwc
Replied by mwc on topic Python issues on Bookworm
Just tried a fresh Bullseye install, and I'm back to basic graphics, which a quick search seems to point to the intel chipset not being supported until the 6.x kernel.

It looks like I'm currently stuck between a rock and a hard place, unless I learn how to compile my own version, but that's something I really don't have the time for :/

Please Log in or Create an account to join the conversation.

More
25 Nov 2022 21:05 #257642 by rodw
Replied by rodw on topic Python issues on Bookworm
I dont think its anything to do with hardware becasue it affects my 8 year old J1900 (similar to the Odroid's Celeron CPU)
Its pretty clear from the error messages that Linuxcnc is calling a function that does not exist in the packages installed.
Its quite possible that the issue can be resolved by installing another package.

Installing the source and checking for dependencies and install any missing ones might resolve the issue. I have a video about how to do that. (You don't need to build Linuxcnc, just check for and install missing dependencies.)

 
The following user(s) said Thank You: mwc

Please Log in or Create an account to join the conversation.

More
25 Nov 2022 22:01 #257645 by mwc
Replied by mwc on topic Python issues on Bookworm
I've set the updater running to move back to Bookworm, so once that's finished, I'll install LinuxCNC again, and go from there.

Please Log in or Create an account to join the conversation.

More
26 Nov 2022 00:54 #257658 by rodw
Replied by rodw on topic Python issues on Bookworm
I took my own advice as I already had th elinuxcnc source code on the pc. Using the XFCE desktop, I git pulled the latest version, then check dor build dependecies par the Linuxcnc docs.

It found a couple of dependencies that were missing so I installed them and opened Gmocappy fine.
packing@packing:~/devel/linuxcnc$ dpkg-checkbuilddeps
dpkg-checkbuilddeps: error: Unmet build dependencies: po4a texlive-lang-european
packing@packing:~/devel/linuxcnc$ sudo apt-get install po4a texlive-lang-european

Are you running XFCE graphical environment?
 
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
26 Nov 2022 09:26 - 26 Nov 2022 09:28 #257670 by mwc
Replied by mwc on topic Python issues on Bookworm

 

Are you running XFCE graphical environment?

 
I've installed Mate this time, but I'll swap if needed.

 
Last edit: 26 Nov 2022 09:28 by mwc.

Please Log in or Create an account to join the conversation.

More
26 Nov 2022 12:00 #257678 by mwc
Replied by mwc on topic Python issues on Bookworm
So I ran through that, and got the following list -
debhelper-compat (= 13) dh-python docbook-xsl asciidoc imagemagick source-highlight asciidoc-dblatex autoconf automake intltool libboost-python-dev libgl1-mesa-dev | libgl1-mesa-swx11-dev libglu1-mesa-dev libgtk2.0-dev libmodbus-dev (>= 3.0) libeditreadline-dev libxmu-dev netcat python3-dev tcl8.6-dev tk8.6-dev yapps2 dblatex (>= 0.2.12) dvipng groff inkscape python3-lxml w3c-linkchecker xsltproc texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-lang-cyrillic texlive-lang-french texlive-lang-german texlive-lang-polish texlive-lang-spanish texlive-latex-recommended texlive-xetex

And cleaned it up into this -
debhelper-compat dh-python docbook-xsl asciidoc imagemagick source-highlight asciidoc-dblatex autoconf automake intltool libboost-python-dev libgl1-mesa-swx11-dev libglu1-mesa-dev libgtk2.0-dev libmodbus-dev libeditreadline-dev libxmu-dev netcat python3-dev tcl8.6-dev tk8.6-dev yapps2 dblatex dvipng groff inkscape python3-lxml w3c-linkchecker xsltproc texlive-extra-utils texlive-font-utils texlive-fonts-recommended texlive-lang-cyrillic texlive-lang-french texlive-lang-german texlive-lang-polish texlive-lang-spanish texlive-latex-recommended texlive-xetex

However it couldn't find the mesa libs and needed the netcat defined.
I just removed the mesa references, and changed netcat to netcat-openbsd.

That all downloaded/installed as normal, however when I ran the ./configure --with-realtime=uspace, it fails while testing Python-
checking for the sysconfig Python package... yes checking for Python include path... -I/usr/include/python3.11 checking for Python library path... -L/usr/lib/x86_64-linux-gnu -lpython3.11 checking for Python site-packages path... /usr/local/lib/python3.11/dist-packages checking for Python platform specific site-packages path... checking python extra libraries... -ldl -lm checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions checking consistency of all components of python development environment... no configure: error: in `/home/lcnc/linuxcnc-dev/src': configure: error: Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LIBS environment variable. Example: ./configure LIBS="-L/usr/non-standard-path/python/lib" ============================================================================ ERROR! You probably have to install the development version of the Python package for your distribution. The exact name of this package varies among them. ============================================================================

For just now, I think I'll just run Axis, as that should at least let me test the ethercat steppers that should be getting delivered on Monday.

Please Log in or Create an account to join the conversation.

Time to create page: 0.144 seconds
Powered by Kunena Forum