Can't build LinuxCNC pre2.9 with python3

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
24 Oct 2021 07:54 #224070 by nhanpham
hi, 
i'm building a RIP inuxcnc 2.9.
i'm using config 

cd linuxcnc-dev/src
./autogen.sh
./configure --with-realtime=uspace --with-python=python3 --with-boost-python=boost_python3-py37 

Àter i got this message : configure: WARNING: unrecognized options: --with-python

​​​​​​I can't load the widgets in QTVCP with this build. 
it's always error :    ImportError: /home/lmycon/linuxcnc-dev/lib/python/_hal.so: undefined symbol: _Py_FalseStruct

can you help me with this issue?

thank you very much
 

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

More
24 Oct 2021 08:18 #224071 by cmorley
Replied by cmorley on topic Can't build LinuxCNC pre2.9 with python3
--with-python is not needed anymore - master is always python3

make sure you run make clean if you had compiled any other version before hand.

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

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
24 Oct 2021 08:24 #224072 by nhanpham
Replied by nhanpham on topic Can't build LinuxCNC pre2.9 with python3
hi sir,

yes, i ran "make clean ."

My build:

cd linuxcnc-dev/debian
./configure uspace 
cd ..
dpkg-buildpackage -b -uc

cd linuxcnc-dev/src
./autogen.sh
./configure --with-realtime=uspace --with-python=python3 --with-boost-python=boost_python3-py37
make clean
make
sudo make setuid
source ../scripts/rip-environment

After, I linked qtvcp_plugin to qt designer and ran it.
i got this error:

/home/mwork/linuxcnc-dev/scripts/rip-environment designer -qt=5
('Qtvcp python plugin found:', '/home/mwork/.designer/plugins/python/qtvcp_plugin.pyc')
Traceback (most recent call last):
  File "/home/mwork/.designer/plugins/python/qtvcp_plugin.py", line 23, in <module>
    from qtvcp.plugins.simplewidgets_plugin import *
  File "/home/mwork/linuxcnc-dev/lib/python/qtvcp/plugins/simplewidgets_plugin.py", line 5, in <module>
    from qtvcp.widgets.simple_widgets import IndicatedPushButton
  File "/home/mwork/linuxcnc-dev/lib/python/qtvcp/widgets/simple_widgets.py", line 17, in <module>
    from qtvcp.widgets.widget_baseclass import (_HalWidgetBase,
  File "/home/mwork/linuxcnc-dev/lib/python/qtvcp/widgets/widget_baseclass.py", line 19, in <module>
    import hal
  File "/home/mwork/linuxcnc-dev/lib/python/hal.py", line 30, in <module>
    import _hal
ImportError: /home/mwork/linuxcnc-dev/lib/python/_hal.so: undefined symbol: _Py_FalseStruct

thank you so much

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

More
24 Oct 2021 09:45 #224079 by cmorley
Replied by cmorley on topic Can't build LinuxCNC pre2.9 with python3
how did you linktto qtvc_plugin?

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

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
24 Oct 2021 13:30 #224090 by nhanpham
Replied by nhanpham on topic Can't build LinuxCNC pre2.9 with python3
i used 

ln -s  /home/mwork/mworkcnc/lib/python/qtvcp/plugins/qtvcp_plugin.py /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/python

and 

ln -s  /home/mwork/mworkcnc/lib/python/qtvcp/plugins/qtvcp_plugin.py  /home/mwork/.designer/plugins/python

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

More
24 Oct 2021 17:53 #224109 by cmorley
Replied by cmorley on topic Can't build LinuxCNC pre2.9 with python3
Ok did you add libpyqt5_py2 (You shouldn't)

Also does the example QTVCP screens work?

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

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
24 Oct 2021 23:25 #224145 by nhanpham
Replied by nhanpham on topic Can't build LinuxCNC pre2.9 with python3
hi sir,

I deleted  libpyqt5_py2 in /usr/lib/x86_64-linux-gnu/qt5/plugins/designer.
I'm using old file in LinuxCNC, this name file is libpyqt5.so
I can open linuxcnc file ini with dèfault GUI.
But I can't open QT designer to modify my GUI. it's can't load QTVCP widgets.

/home/mwork/linuxcnc-dev/scripts/rip-environment designer -qt=5
('Qtvcp python plugin found:', '/home/mwork/.designer/plugins/python/qtvcp_plugin.pyc')
Traceback (most recent call last):
  File "/home/mwork/.designer/plugins/python/qtvcp_plugin.py", line 23, in <module>
    from qtvcp.plugins.simplewidgets_plugin import *
  File "/home/mwork/linuxcnc-dev/lib/python/qtvcp/plugins/simplewidgets_plugin.py", line 5, in <module>
    from qtvcp.widgets.simple_widgets import IndicatedPushButton
  File "/home/mwork/linuxcnc-dev/lib/python/qtvcp/widgets/simple_widgets.py", line 17, in <module>
    from qtvcp.widgets.widget_baseclass import (_HalWidgetBase,
  File "/home/mwork/linuxcnc-dev/lib/python/qtvcp/widgets/widget_baseclass.py", line 19, in <module>
    import hal
  File "/home/mwork/linuxcnc-dev/lib/python/hal.py", line 30, in <module>
    import _hal
ImportError: /home/mwork/linuxcnc-dev/lib/python/_hal.so: undefined symbol: _Py_FalseStruct

thank you for your helping!!!!

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

More
25 Oct 2021 06:39 #224225 by cmorley
Replied by cmorley on topic Can't build LinuxCNC pre2.9 with python3
There is so much that could be doing this. There is a script to set up designer in lib/python/qtvcp/designer. I would try that.

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

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
25 Oct 2021 08:05 - 25 Oct 2021 08:14 #224233 by nhanpham
Replied by nhanpham on topic Can't build LinuxCNC pre2.9 with python3
hi, i built  insall_script in lib/python/qtvcp/designer folder.
it built success. But i still see this error when I run qtdesign.
Last edit: 25 Oct 2021 08:14 by nhanpham.

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

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
25 Oct 2021 08:07 #224235 by nhanpham
Replied by nhanpham on topic Can't build LinuxCNC pre2.9 with python3

~/linuxcnc-dev/lib/python/qtvcp/designer$ ./install_script

installing common base packages
[sudo] password for mwork:
Reading package lists... Done
Building dependency tree
Reading state information... Done
espeak is already the newest version (1.48.04+dfsg-7+deb10u1).
espeak-ng is already the newest version (1.49.2+dfsg-8+deb10u1).
gstreamer1.0-tools is already the newest version (1.14.4-1).
sound-theme-freedesktop is already the newest version (0.8-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

installing base packages for python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-dbus is already the newest version (1.2.8-3).
python3-opencv is already the newest version (3.2.0+dfsg-6).
python3-cairo is already the newest version (1.16.2-1+b1).
python3-gi-cairo is already the newest version (3.30.4-1).
python3-opengl is already the newest version (3.1.0+dfsg-2).
python3-dbus.mainloop.pyqt5 is already the newest version (5.11.3+dfsg-1+b3).
python3-pyqt5 is already the newest version (5.11.3+dfsg-1+b3).
python3-pyqt5.qtopengl is already the newest version (5.11.3+dfsg-1+b3).
python3-pyqt5.qtsvg is already the newest version (5.11.3+dfsg-1+b3).
python3-pyqt5.qtwebkit is already the newest version (5.11.3+dfsg-1+b3).
python3-espeak is already the newest version (0.5-1+b6).
python3-numpy is already the newest version (1:1.16.2-1).
python3-xlib is already the newest version (0.23-2).
python3-pyqt5.qsci is already the newest version (2.10.4+dfsg-2.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Do you wish to install Qt Designer for creating or modifying a GUI
 1 = No, exit
 2 = Yes, for a Run In Place installation
 3 = Yes, for a package installation

Selection? 2

installing common tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
qttools5-dev is already the newest version (5.11.3-4).
qttools5-dev-tools is already the newest version (5.11.3-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

installing python3 tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
pyqt5-dev-tools is already the newest version (5.11.3+dfsg-1+b3).
libpython3-dev is already the newest version (3.7.3-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

create plugin link at:
~/.designer/plugins/python/


Installation complete, designer can be started with:

designer -qt=5

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

Time to create page: 0.192 seconds
Powered by Kunena Forum