开源改变世界

python3 发行版支持和依赖项。 #820

推推 grbl 2年前 (2023-01-30) 182次浏览
关闭
rene-dev 打开了这个问题 2020 年 5 月 3 日 · 21条评论
关闭

python3 发行版支持和依赖项。#820

rene-dev 打开了这个问题 2020 年 5 月 3 日 · 21条评论

注释

python3 发行版支持和依赖项。 #820
合作者

我们可以在 python3 上支持哪些发行版?
需要哪些依赖项(boost、bindings、gtk、tk)?
请测试您使用的是什么:
./configure --with-python=python3 --with-boost-python=boost_python3-py37
启动 sim/axis,然后运行测试。
到目前为止,我只在 Buster 上测试过,使用 python 3.7.3
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?MinimumSoftwareVersions

python3 发行版支持和依赖项。 #820 rene-dev 添加了 蟒蛇3 标签 2020 年 5 月 3 日
python3 发行版支持和依赖项。 #820
奥兹罗布 评论了 2020 年 5 月 3 日  

尝试使用 Mint-19.2 (ubuntu bionic)
`uname -msr
Linux 4.19.106-rt44-lcnc x86_64′

./configure --with-python=python3 --with-boost-python=boost_python3-py36
配置运行正常必须从 bionic repo 安装 python3-tk,从 focal repo 安装 python3-yapps。
由于构建失败,在我添加整个相关信息之前您想要什么信息
以下是构建失败时的片段(libboost 版本问题?)
failed.txt
libbost 版本信息
libboost-versions.txt

运行./configure --wth-realtime=uspace生成成功的构建。

python3 发行版支持和依赖项。 #820
合作者作者
再生开发 评论了 2020 年 5 月 3 日  

它试图链接 python2 boost:-lboost_python
run ls -la /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libboost*
也确保在构建之前运行 make clean。

python3 发行版支持和依赖项。 #820

嗯嗯可能需要在台式机上再试一次在
笔记本电脑上运行:
./configure -with-python=python3 --with-boost-python=boost_python3-py36
make clean
make --jobs=2
sudo make setuid
scritpts/runtests

运行测试:233 次测试运行,229 次成功,4 次失败 + 0 次预期
失败:
/home/rmurphy/packages/emc-2.9/tests/halmodule.0
/home/rmurphy/packages/emc-2.9/tests/interp/python-self
/home/rmurphy/packages/emc-2.9/tests/remap/introspect
/home/rmurphy/packages/emc-2.9/tests/remap/oword-pycall

python3 发行版支持和依赖项。 #820
合作者作者

我知道 halmodule 失败了,你能检查一下其他的问题是什么吗?

python3 发行版支持和依赖项。 #820
奥兹罗布 评论了 2020 年 5 月 3 日  

解决了桌面问题….
使用(但我们失败了) ./
configure -with-python=python3 –with-boost-python= boost_python3-py3.6

而不是(我们成功了) ./
configure -with-python=python3 –with-boost-python= boost_python3-py36

典型的 ID-10-Tea 错误
虽然我还有一些失败
运行测试:233 次测试运行,215 次成功,18 次失败 + 0 预期
失败:
/home/rmurphy/emc-test/linuxcnc/tests/halmodule.0
/home/rmurphy /emc-test/linuxcnc/tests/interp/m98m99/12-M99-endless-main-program
/home/rmurphy/emc-test/linuxcnc/tests/interp/oword-mdi-sub-update
/home/rmurphy/emc -test/linuxcnc/tests/interp/python-self
/home/rmurphy/emc-test/linuxcnc/tests/linuxcncrsh-tcp
/home/rmurphy/emc-test/linuxcnc/tests/linuxcncrsh
/home/rmurphy/emc-test /linuxcnc/tests/mdi-queue/oword-queue-buster
/home/rmurphy/emc-test/linuxcnc/tests/mdi-queue/simple-queue-buster
/home/rmurphy/emc-test/linuxcnc/tests/motion -记录器/山露
/home/rmurphy/emc-test/linuxcnc/tests/motion-logger/startup-gcode-abort
/home/rmurphy/emc-test/linuxcnc/tests/remap/introspect
/home/rmurphy/emc-test/linuxcnc/tests /remap/oword-pycall
/home/rmurphy/emc-test/linuxcnc/tests/remap/remap-io
/home/rmurphy/emc-test/linuxcnc/tests/t0/nonrandom
/home/rmurphy/emc-test/linuxcnc /tests/t0/random-with-t0
/home/rmurphy/emc-test/linuxcnc/tests/t0/random-without-t0
/home/rmurphy/emc-test/linuxcnc/tests/toolchanger/toolno-pocket-differ /nonrandom
/home/rmurphy/emc-test/linuxcnc/tests/toolchanger/toolno-pocket-differ/random

python3 发行版支持和依赖项。 #820

好的,如果你能忍受我。说到运行测试套件,我还很新手。
检查失败测试问题的方法是什么?

python3 发行版支持和依赖项。 #820
合作者

cd 到失败测试的 /tests/… 目录。
以详细模式重新运行它:(
runtests -v .  您可以将任何路径传递给运行测试,它会运行该路径中的所有测试)
如果这不能使问题变得明显,那么您可能需要更仔细地查看。
如果您看到“预期”和“结果”
diff expected result
可能会显示问题。
一些测试运行一个 Python 脚本来检查结果本身。

python3 发行版支持和依赖项。 #820
合作者
andypugh@holbrook:~/linuxcnc-dev$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 7.10 (wheezy)
Release:	7.10
Codename:	wheezy

需要安装 libusb-1.0-0-dev 和 Python3(当然)

但是之后

checking for python pango and cairo modules... Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named pango
no
configure: error: Python pango and cairo modules not found!\ninstall with "sudo apt-get install python-gtk2"

但:

andypugh@holbrook:~/linuxcnc-dev/src$ sudo apt-get install python-gtk2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-gtk2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 233 not upgraded.
python3 发行版支持和依赖项。 #820
合作者作者
再生开发 评论了 2020 年 5 月 3 日  

@andypugh配置脚本的建议不正确。
sudo apt install gobject-introspection python3-gi python3-cairo-dev python3-gi-cairo

python3 发行版支持和依赖项。 #820
合作者

进一步看,我认为这个测试是错误的:https
://github.com/LinuxCNC/linuxcnc/blob/master/src/configure.ac#L1458 这里使用相同的测试:
https ://github.com/LinuxCNC/ linuxcnc/blob/master/src/configure.ac#L1657
也失败了。

在这两种情况下,删除“if”和“else”子句都可以继续配置。
后者需要安装“python3-tk”,因此可能也需要更改消息。

python3 发行版支持和依赖项。 #820
合作者
安迪普 评论了 2020 年 5 月 3 日  

下一个障碍:

checking whether the Boost::Python headers are available... no
configure: error: boost::python is required to build LinuxCNC
...
andypugh@holbrook:~/linuxcnc-dev/src$ sudo apt-cache search libboost-python
libboost-python-dev - Boost.Python Library development files (default version)
libboost-python1.49-dev - Boost.Python Library development files
libboost-python1.49.0 - Boost.Python Library

.configure 行中的“3.7”是什么?

python3 发行版支持和依赖项。 #820
合作者作者

它的python版本。libboost-python1.49 似乎非常非常旧。
查看 ls -la /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libboost*
是否有 python3 版本。

python3 发行版支持和依赖项。 #820
合作者

这是 Wheezy,它很老了。

-rw-r--r-- 1 root root  94280 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_iostreams.so.1.49.0
lrwxrwxrwx 1 root root     22 Dec 17  2017 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python.a -> libboost_python-py27.a
lrwxrwxrwx 1 root root     22 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-mt-py26.a -> libboost_python-py26.a
lrwxrwxrwx 1 root root     30 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-mt-py26.so -> libboost_python-py26.so.1.49.0
lrwxrwxrwx 1 root root     22 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-mt-py27.a -> libboost_python-py27.a
lrwxrwxrwx 1 root root     30 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-mt-py27.so -> libboost_python-py27.so.1.49.0
lrwxrwxrwx 1 root root     22 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-mt-py32.a -> libboost_python-py32.a
lrwxrwxrwx 1 root root     30 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-mt-py32.so -> libboost_python-py32.so.1.49.0
-rw-r--r-- 1 root root 508958 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-py26.a
lrwxrwxrwx 1 root root     30 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-py26.so -> libboost_python-py26.so.1.49.0
-rw-r--r-- 1 root root 303608 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-py26.so.1.49.0
-rw-r--r-- 1 root root 508958 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-py27.a
lrwxrwxrwx 1 root root     30 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-py27.so -> libboost_python-py27.so.1.49.0
-rw-r--r-- 1 root root 303608 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-py27.so.1.49.0
-rw-r--r-- 1 root root 504564 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-py32.a
lrwxrwxrwx 1 root root     30 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-py32.so -> libboost_python-py32.so.1.49.0
-rw-r--r-- 1 root root 301624 Feb  4  2013 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python-py32.so.1.49.0
lrwxrwxrwx 1 root root     23 Dec 17  2017 /usr/lib/gcc/i486-linux-gnu/4.7.2/../../../libboost_python.so -> libboost_python-py27.so
andypugh@holbrook:~/linuxcnc-dev/src$ 

我试过 –with-libboost-python32 但结果是一样的。

python3 发行版支持和依赖项。 #820
合作者作者

您确实需要在构建之间运行 make clean

python3 发行版支持和依赖项。 #820
贡献者

我们可以在 python3 上支持哪些发行版?

我设法在copr中为所有当前支持的 Fedora 版本编译和打包(作为 rpm) linuxcnc (不包括 qtvcp 

它使用and to和的组合编译得很好(除了fedora-32-aarch64上的一个奇怪的链接问题 )gcc 9.3.1python 3.7.7gcc 10.0.1python 3.8.3

生成文档有问题(我观察到很多“未找到图像”消息) ——但我稍后会调查它。

它仍处于非常早期的阶段,但总的来说,看起来很有希望。

启动 sim/axis,并运行测试。

axis工作并且所有测试都通过。所有需要的更改都作为 PR 提交。

python3 发行版支持和依赖项。 #820
贡献者

(第一次实际运行 RIP,所以请耐心等待)
虚拟机中的 Fresh Ubuntu 18.04(打算在真实计算机上尝试在 20.04 上复制一点点)

git clone http://github.com/linuxcnc/linuxcnc
sudo apt install pkg-config libudev-dev libmodbus-dev libusb-1.0-0-dev libglib2.0-dev
pip3 intltool bwidget libtk-img tclx libxinerama-dev libreadline-gplv2 -dev python3-opengl
libglu1-mesa-dev libxmu-headers libxmu-dev

sudo pip3 安装 yapps

下载以下链接
https://packages.ubuntu.com/focal/libboost1.71-dev
https://packages.ubuntu.com/focal/libboost-python1.71-dev

以及来自 focal
sudo apt install ./* 的所有依赖项(* 以上)

cd linuxcnc/src
./configure –with-python=python3 –disable-gtk
make clean
make -j6
../scripts/runtests

Running test: /home/chad/git/linuxcnc/tests/interp/python-self
--- /home/chad/git/linuxcnc/tests/interp/python-self/expected	2020-08-21 15:55:32.162767303 -0600
+++ /home/chad/git/linuxcnc/tests/interp/python-self/result	2020-08-24 11:44:40.067104363 -0600
@@ -5,8 +5,6 @@
     4 N..... SET_XY_ROTATION(0.0000)
     5 N..... SET_FEED_REFERENCE(CANON_XYZ)
     6 N..... ON_RESET()
-param1 was retained, value =  25.0
-this is self: True
     7 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
     8 N..... SET_XY_ROTATION(0.0000)
     9 N..... SET_FEED_MODE(0, 0)
*** /home/chad/git/linuxcnc/tests/interp/python-self: XFAIL: result differed from expected
Running test: /home/chad/git/linuxcnc/tests/remap/introspect
--- /home/chad/git/linuxcnc/tests/remap/introspect/expected	2020-08-21 15:55:32.166767287 -0600
+++ /home/chad/git/linuxcnc/tests/remap/introspect/result	2020-08-24 11:50:45.054206100 -0600
@@ -13,25 +13,6 @@
    12 N..... SET_FEED_RATE(200.0000)
    13 N..... SET_SPINDLE_SPEED(0, 3000.0000)
    14 N..... START_SPINDLE_CLOCKWISE(0)
-debug:  1073741824 logging: 0
-call_level= 1
-argc= 4
-args=( 1.00000 2.00000 3.00000 3.14159 )
-param # 0 = 1.0
-param # 1 = 2.0
-param # 2 = 3.0
-param # 3 = 3.14159
-current oword subname= introspect
-m_modes[0]= -1
-g_modes[0]= -1
-current tool= 3.0 3.0
-feed= 200.0
-speed= 3000.0
-global parameter set in test.ngc: 47.11
-parameter set via test.ini: 3.14159
-locals:  ['a_new_local']
-globals:  ['_a', '_a_global_set_in_test_dot_ngc', '_a_new_global', '_absolute', '_adaptive_feed', '_b', '_c', '_call_level', '_ccomp', '_coord_system', '_current_pocket', '_current_tool', '_feed', '_feed_hold', '_feed_override', '_flood', '_ijk_absolute_mode', '_imperial', '_incremental', '_ini[example]variable', '_inverse_time', '_lathe_diameter_mode', '_lathe_radius_mode', '_line', '_metric', '_mist', '_motion_mode', '_plane', '_remap_level', '_retract_old_z', '_retract_r_plane', '_rpm', '_selected_pocket', '_selected_tool', '_speed_override', '_spindle_css_mode', '_spindle_cw', '_spindle_on', '_spindle_rpm_mode', '_task', '_tool_offset', '_u', '_units_per_minute', '_units_per_rev', '_v', '_value', '_value_returned', '_vmajor', '_vminor', '_w', '_x', '_y', '_z', 'foo']
-params():  ['a_new_local', '_a', '_a_global_set_in_test_dot_ngc', '_a_new_global', '_absolute', '_adaptive_feed', '_b', '_c', '_call_level', '_ccomp', '_coord_system', '_current_pocket', '_current_tool', '_feed', '_feed_hold', '_feed_override', '_flood', '_ijk_absolute_mode', '_imperial', '_incremental', '_ini[example]variable', '_inverse_time', '_lathe_diameter_mode', '_lathe_radius_mode', '_line', '_metric', '_mist', '_motion_mode', '_plane', '_remap_level', '_retract_old_z', '_retract_r_plane', '_rpm', '_selected_pocket', '_selected_tool', '_speed_override', '_spindle_css_mode', '_spindle_cw', '_spindle_on', '_spindle_rpm_mode', '_task', '_tool_offset', '_u', '_units_per_minute', '_units_per_rev', '_v', '_value', '_value_returned', '_vmajor', '_vminor', '_w', '_x', '_y', '_z', 'foo']
    15 N..... MESSAGE(" after introspect: return value=2.718280 call_level= 0.000000")
    16 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
    17 N..... SET_XY_ROTATION(0.0000)
*** /home/chad/git/linuxcnc/tests/remap/introspect: XFAIL: result differed from expected
Running test: /home/chad/git/linuxcnc/tests/remap/m30-interaction
Running test: /home/chad/git/linuxcnc/tests/remap/nested-remaps-oword
Running test: /home/chad/git/linuxcnc/tests/remap/oword-pycall
--- /home/chad/git/linuxcnc/tests/remap/oword-pycall/expected	2020-08-21 15:55:32.166767287 -0600
+++ /home/chad/git/linuxcnc/tests/remap/oword-pycall/result	2020-08-24 11:50:45.134206739 -0600
@@ -5,8 +5,6 @@
     4 N..... SET_XY_ROTATION(0.0000)
     5 N..... SET_FEED_REFERENCE(CANON_XYZ)
     6 N..... ON_RESET()
-multiply: number of arguments= 2
-multiply: number of arguments= 3
     7 N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES)
     8 N..... SELECT_TOOL(1)
     9 N..... START_CHANGE()
*** /home/chad/git/linuxcnc/tests/remap/oword-pycall: XFAIL: result differed from expected

运行测试:234 次测试运行,230 次成功,4 次失败 + 0 次预期
失败:
/home/chad/git/linuxcnc/tests/build/header-sanity
/home/chad/git/linuxcnc/tests/interp/python-self
/home /chad/git/linuxcnc/tests/remap/introspect
/home/chad/git/linuxcnc/tests/remap/oword-pycall

python3 发行版支持和依赖项。 #820
贡献者

Linux 薄荷 20

运行测试:234 次测试运行,233 次成功,1 次失败 + 0 次预期
失败:
/home/xxxYYYzzz/linuxcnc-dev/tests/build/header-sanity

问题是我缺少软件包:libtirpc-dev
安装后 234/234 成功

python3 发行版支持和依赖项。 #820
合作者

我刚刚在新的 SSD 上安装了 MINT 20 并克隆了 master 分支。

我需要添加以下依赖项以使用 python3 进行配置

autoconf
g++
libudev-dev
libmodbus-dev
libusb-1.0-0-dev
libglib2.0-dev
libgtk2.0-dev
yapps2
intltool
tcl-dev
tk-dev
bwidget
libtk-img
tclx8.4
libreadline-gplv2-dev
python3-tk
libboostt- python1.71.0
libboost-python1.71-dev
libglu1-mesa-dev
libxmu-dev

这使我能够进行配置 –with-python=python3

轴运行,其他图形用户界面不运行。

gmoccapy 的工作将完成 ;-)

诺伯特

python3 发行版支持和依赖项。 #820
茨维布鲁姆 评论了 2021 年 5 月 12 日  

来自 git 的 master 使用 python 3.9.2-1 在 devuan/chimaera 上构建良好,它看起来像它的工作 (asis)。构建 html 文档失败。

python3 发行版支持和依赖项。 #820
合作者作者

你能打开一个关于这个的新问题吗?这样我们就可以跟踪哪些有效,哪些无效。

python3 发行版支持和依赖项。 #820
合作者作者

依赖项已全部添加到 master-gtk3 分支中。
最老的受支持发行版是 Debian 10 buster 或 ubuntu 20.04 / mint 20。