Drop the need for exporting TCLLIBPATH, use system path [v2]#4140
Drop the need for exporting TCLLIBPATH, use system path [v2]#4140NTULINUX wants to merge 2 commits into
Conversation
|
So I have a lot of the work for this done but I'm stuck battling the CI/CD. @BsAtHome @grandixximo any ideas? I'm pausing here because I'm worried about an influx of spam. Minus the CI/CD stuff, this should be ready to go. |
dedba2a to
b7475fa
Compare
709f3cc to
da75753
Compare
|
move |
d5f9811 to
2112d51
Compare
|
Thank you, that got me a lot further, working on the last little bit now! |
|
OK, I fixed the linuxcnc.install.in file but now edit: I think sid just broke up from upstream. |
|
Yeah, just need rerun once sid is stable |
| EMC2_TCL_DIR=${prefix}/lib/tcltk/linuxcnc | ||
| EMC2_TCL_LIB_DIR=${prefix}/lib/tcltk/linuxcnc | ||
| EMC2_LANG_DIR=${prefix}/lib/tcltk/linuxcnc/msgs | ||
| TCL_GET_DIR=$(echo 'puts [[tcl::pkgconfig get scriptdir,runtime]]' | tclsh) |
There was a problem hiding this comment.
This should be changed with a better multidistro approach
AC_ARG_WITH([tcl-dir],
[AS_HELP_STRING([--with-tcl-dir=DIR],
[directory for LinuxCNC Tcl scripts (default: auto-detected from tcl_pkgPath)])],
[EMC2_TCL_DIR="$withval"],
[TCL_GET_DIR=$(echo ['set d [lindex [lsearch -all -inline -glob $tcl_pkgPath /usr/share/*] 0]; if {$d eq ""} {set d [lindex [lsearch -all -inline -glob $tcl_pkgPath /usr/lib*] 0]}; puts $d'] | tclsh 2>/dev/null)
AS_IF([test -z "$TCL_GET_DIR"],
[AC_MSG_ERROR([could not determine Tcl package dir from tcl_pkgPath])])
EMC2_TCL_DIR="$TCL_GET_DIR/linuxcnc"])
this returns
Debian => /usr/share/tcltk
Fedora => /usr/share/tcl9.0
Gentoo => /usr/lib64
And guards failure, and --with-tcl-dir configure override knob
| KERNEL_HEADERS= | ||
| KERNEL_VERSION=uspace | ||
| MODUTILS_DEPENDS= | ||
| TCL_GET_DIR=$(echo 'puts [tcl::pkgconfig get scriptdir,runtime]' | tclsh) |
There was a problem hiding this comment.
hardcode the literal /usr/share/tcltk/linuxcnc. It's Debian's stable unversioned package dir, doesn't change across 8.6 to 9, and a Debian package only ever builds on Debian anyway. Once you do this you can remove the apt-get install tcl band-aid
There was a problem hiding this comment.
Do you mean /usr/lib/tcltk? /usr/lib/tcltk/linuxcnc was the path before. Just want to clarify.
There was a problem hiding this comment.
No, it has to match the result of the snippet we run for TCL_GET_DIR
| set -eu #Needed so CI fails when anything is wrong | ||
| set -x | ||
|
|
||
| apt-get --yes install tcl |
There was a problem hiding this comment.
We can get rid of these, see below
| usr/lib/linuxcnc | ||
| usr/lib/python3 | ||
| usr/lib/tcltk | ||
| @EMC2_TCL_DIR@ |
There was a problem hiding this comment.
Can you confirm a real .deb build actually ships linuxcnc.tcl (and the msgs/) at the new path here, and that lintian stays clean? @EMC2_TCL_DIR@ expands to an absolute /usr/share/..., so dh_install ends up globbing debian/tmp//usr/share/.... It should collapse fine, but since this is the riskiest untested part of the change it's worth a verified install before merge.
|
for then can cleanup
It works either way, but it might be easier to keep track of things for you? |
Signed-off-by: Alec Ari <neotheuser@ymail.com>
latency-test: Also, build bot error:
I might have done something wrong.. Due to how m4 handles syntax, the proper way to do the braces is the one I just pushed, it's a slight modification to what you had but it won't work as-is, it needs to be double bracketed. |
|
expose EMC2_TCL_DIR via the already-generated nf.py |
- nf.py.in: expose EMC2_TCL_DIR so rs274/options.py can read it (fixes 'module nf has no attribute EMC2_TCL_DIR' at runtime) - control.top.in: build-depend on tcl for /usr/bin/tclsh; src/configure queries tcl_pkgPath in override_dh_auto_configure, which runs after build-deps, so no bootstrap issue - configure.ac: stop the install branch from clobbering EMC2_TCL_DIR set by --with-tcl-dir
I don't know how to restore my last PR properly with the fixed tree so making a new one.
This avoids hard-coding LinuxCNC to use a path outside of the system's default Tcl search path, making it no longer required to specify TCLLIBPATH on Gentoo and Fedora. Logging in and out in order to update the environmental variables so the icons/menu entries work is also no longer needed.