# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="7"
PYTHON_COMPAT=( python3_10 )
inherit autotools eutils flag-o-matic multilib python-single-r1
DESCRIPTION="LinuxCNC "
HOMEPAGE="http://linuxcnc.org/"
#SRC_URI="mirror://sourceforge/gentoocnc/distfiles/${P}.tar.gz"
#SRC_URI="https://github.com/LinuxCNC/linuxcnc/archive/2.7.zip"
SRC_URI="https://github.com/LinuxCNC/linuxcnc/archive/refs/tags/v2.8.2.tar.gz"
S="${WORKDIR}"/linuxcnc-2.8.2/src
LICENSE="LGPL-3"
SLOT="linuxcnc-2.8"
KEYWORDS="~amd64 ~x86"
IUSE="+python +uspace +X +gtk -rt gstreamer modbus simulator usb"
# TODO: add shmdrv use flag
# --disable-python uses python anyways and fails so python is a required use flag
REQUIRED_USE="
python
python? ( ${PYTHON_REQUIRED_USE} )
rt? ( !simulator )
"
DEPEND="dev-lang/tcl
dev-lang/tk
dev-tcltk/tkimg
dev-tcltk/tclx
dev-libs/boost[python]
modbus? ( <dev-libs/libmodbus-3.1 )
dev-tcltk/bwidget
gtk? ( x11-libs/gtk+ )
gstreamer? (
dev-python/gst-python:0.10
media-libs/gst-plugins-base:0.10
)
|| (
net-analyzer/netcat
net-analyzer/netcat6
)
x11-libs/libXinerama
usb? ( virtual/libusb )
dev-lang/python:3.10[tk]
$(python_gen_cond_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/configobj[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/pillow[tk,${PYTHON_USEDEP}]')
media-libs/mesa
x11-apps/mesa-progs
X? (
x11-libs/libXaw
$(python_gen_cond_dep 'dev-python/python-xlib[${PYTHON_USEDEP}]')
)
rt? ( sys-kernel/rt-sources )
virtual/opengl
virtual/glu
${PYTHON_DEPS}
sys-devel/gettext
sys-process/procps
sys-process/psmisc
net-firewall/iptables
media-gfx/graphviz
"
RDEPEND="${DEPEND}
python? ( dev-python/yapps )"
src_prepare() {
default
eautoreconf
}
src_configure() {
#myconf="--prefix=${EPREFIX}/usr --with-kernel-headers=/usr/src/linux/ $(use_with modbus libmodbus)"
myconf="--prefix=${EPREFIX}/usr --enable-non-distributable=yes --with-boost-python=boost_python310 $(use_with modbus libmodbus)"
use !gtk && myconf="${myconf} --disable-gtk"
use rt && myconf="${myconf} --with-realtime=uspace"
use simulator && myconf="${myconf} --with-realtime=uspace"
use !usb && myconf="${myconf} --without-libusb-1.0"
# use rtai && myconf="${myconf} --with-realtime=${EPREFIX}/usr/realtime --with-module-dir=${EPREFIX}/usr/lib/linuxcnc/rtai/"
use X && myconf="${myconf} --with-x"
# TODO: fix that - get python version
#use python && myconf="${myconf} --with-python=/usr/bin/python3.10"
use !python && myconf="${myconf} --disable-python"
econf ${myconf}
}
src_install() {
PORTAGE_COMPRESS=""
emake DESTDIR="${D}" install
local envd="${T}/51linuxcnc"
cat > "${envd}" <<-EOF
LDPATH="${EPREFIX}/usr/$(get_libdir)/linuxcnc"
EOF
doenvd "${envd}"
insinto "/usr/share/linuxcnc/"
doins Makefile.inc
insinto "/etc/linuxcnc/"
doins "../scripts/rtapi.conf"
doicon "../linuxcncicon.png"
make_desktop_entry linuxcnc LinuxCNC linuxcnc 'Science;Robotics'
}
pkg_postinst() {
elog "The compiled software may not be redistributed due to use of packages with incompatible licenses."
elog "Opening machine configuration files from older Versions can crash the application as it cannot load old named modules, e.g. probe_parport.so not found"
elog "This is not a Gentoo- or build related error. It looks like linuxcnc 2.8 will have some kind of converter for them."
elog "If you created them with stepconf. You can just open the stepconf file and create them new. Don't forget to backup any manual changes (e.g. backlash!) from the .hal and .ini files and make them again."
}
实际上。这是手动编译的自动化实现。因此,可以在一定程度上忽略不相关的部分
这是我期望发生的事情:
至少编译正常
这是发生了什么:
出现以下编译错误:
inlined from ‘int Interp::arc_data_ijk(int, int, double, double, double, double, int, double, double, int, double*, double*, int*, double, double, double)’ at emc/rs274ngc/interp_arc.cc:294:3:
/usr/include/bits/string_fortified.h:95:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated copying 80 bytes from a string of length 140 [-Wstringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘int Interp::arc_data_ijk(int, int, double, double, double, double, int, double, double, int, double*, double*, int*, double, double, double)’ at emc/rs274ngc/interp_arc.cc:309:5:
/usr/include/bits/string_fortified.h:95:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated copying 80 bytes from a string of length 140 [-Wstringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘int Interp::arc_data_r(int, int, double, double, double, double, double, int, double*, double*, int*, double)’ at emc/rs274ngc/interp_arc.cc:370:3:
/usr/include/bits/string_fortified.h:95:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated copying 80 bytes from a string of length 109 [-Wstringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘int Interp::arc_data_r(int, int, double, double, double, double, double, int, double*, double*, int*, double)’ at emc/rs274ngc/interp_arc.cc:376:3:
/usr/include/bits/string_fortified.h:95:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated copying 80 bytes from a string of length 109 [-Wstringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘int Interp::arc_data_comp_r(int, int, int, double, double, double, double, double, double, int, double*, double*, int*, double)’ at emc/rs274ngc/interp_arc.cc:219:3:
/usr/include/bits/string_fortified.h:95:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated copying 80 bytes from a string of length 127 [-Wstringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling emc/rs274ngc/interp_base.cc
cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for C++
Compiling emc/rs274ngc/interp_check.cc
cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for C++
Compiling emc/rs274ngc/interp_convert.cc
cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for C++
emc/task/taskclass.cc: In function ‘int return_int(const char*, PyObject*)’:
emc/task/taskclass.cc:404:10: error: ‘PyInt_Check’ was not declared in this scope; did you mean ‘PySet_Check’?
404 | (PyInt_Check(retval))) {
| ^~~~~~~~~~~
| PySet_Check
emc/task/taskclass.cc:405:16: error: ‘PyInt_AS_LONG’ was not declared in this scope; did you mean ‘PyLong_AS_LONG’?
405 | return PyInt_AS_LONG(retval);
| ^~~~~~~~~~~~~
| PyLong_AS_LONG
emc/task/taskclass.cc:409:26: error: ‘PyString_AsString’ was not declared in this scope
409 | PyString_AsString(retval),
| ^~~~~~~~~~~~~~~~~
emc/task/taskclass.cc: At global scope:
emc/task/taskclass.cc:444:31: error: invalid conversion from ‘void (*)()’ to ‘PyObject* (*)()’ {aka ‘_object* (*)()’} [-fpermissive]
444 | { (char *) "interpreter", initinterpreter },
| ^~~~~~~~~~~~~~~
| |
| void (*)()
emc/task/taskclass.cc:445:28: error: invalid conversion from ‘void (*)()’ to ‘PyObject* (*)()’ {aka ‘_object* (*)()’} [-fpermissive]
445 | { (char *) "emccanon", initemccanon },
| ^~~~~~~~~~~~
| |
| void (*)()
emc/task/taskclass.cc:446:27: error: invalid conversion from ‘void (*)()’ to ‘PyObject* (*)()’ {aka ‘_object* (*)()’} [-fpermissive]
446 | { (char *) "emctask", initemctask },
| ^~~~~~~~~~~
| |
| void (*)()
make: *** [Makefile:222: objects/emc/task/taskclass.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /usr/include/string.h:519,
from emc/rs274ngc/interp_convert.cc:20:
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘int Interp::convert_threading_cycle(block_pointer, setup_pointer, double, double, double)’ at emc/rs274ngc/interp_convert.cc:4717:5:
/usr/include/bits/string_fortified.h:95:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated copying 80 bytes from a string of length 89 [-Wstringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘int Interp::convert_threading_cycle(block_pointer, setup_pointer, double, double, double)’ at emc/rs274ngc/interp_convert.cc:4720:5:
/usr/include/bits/string_fortified.h:95:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated copying 80 bytes from a string of length 89 [-Wstringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
┌─(/var/db/repos/gentoo_overlay_local)─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(jack@jack-B250-HD3:pts/4)─┐
└─(19:24:02 on main)──> linuxcnc ──(日,5月29)─┘
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/jack/linuxcnc/configs/sim.axis'
Machine configuration file is 'axis.ini'
can't find package Linuxcnc
while executing
"package require Linuxcnc "
(file "/usr/share/linuxcnc/hallib/check_config.tcl" line 187)
check_config validation failed
LinuxCNC terminated with an error. You can find more information in the log:
/home/jack/linuxcnc_debug.txt
and
/home/jack/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
┌─(/var/db/repos/gentoo_overlay_local)──────────────────────────────────────
以下是我重现该问题所遵循的步骤:
使用 Gentoo ebuild 编译如下:
实际上。这是手动编译的自动化实现。因此,可以在一定程度上忽略不相关的部分
这是我期望发生的事情:
至少编译正常
这是发生了什么:
出现以下编译错误:
在此之前它工作正常:
(如果在对硬件或软件进行特定更改后行为发生了变化
,请描述您认为负责的更改。例如,“
从 LinuxCNC 2.7.3 升级到 2.7.4 后”)
有关我的硬件和软件的信息:
lsb_release -a):gentoo linuxuname -a):Linux jack-B250-HD3 5.17.1-zen1 Seb/master/hm2 watchdog #5 ZEN SMP PREEMPT Mon May 16 23:19:10 CST 2022 x86_64 Intel(R) Core( TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linuxscripts/get-version-from-git):2.8.2 标签