LinuxCNC/linuxcnc

Build: if LinuxCNC is relocated (via --prefix) TCLLIBPATH must be set

Eckeneckepen opened this issue · 0 comments

  1. git clone https://github.com/LinuxCNC/linuxcnc
  2. cd linuxcnc/src
  3. ./autogen.sh
  4. ./configure --with-realtime=uspace --prefix=/opt --enable-non-distributable=yes
  5. make -j 2
  6. make install
  7. /opt/bin/linuxcnc # LD_LIBRARY_PATH must include to /opt/lib64
  8. Select sim.qtdragon_hd.qtdragon_hd_xyz

This is what I expected to happen:

LinuxCNC starts normally.

This is what happened instead:

Machine configuration file is 'qtdragon_hd_xyz.ini'
can't find package Linuxcnc
while executing
"package require Linuxcnc "
(file "/opt/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:

It worked properly before this:

n/a

Information about my hardware and software:

KVM-virtual-machine, Debian 12, current master

Possible fix:
add file linuscnc/scripts/linuxcnc.in

if [ -z "$TCLLIBPATH" ]; then
TCLLIBPATH=$LINUXCNC_HOME/lib/tcltk
else
TCLLIBPATH=$LINUXCNC_HOME/lib/tcltk:"$TCLLIBPATH"
fi
export TCLLIBPATH

Maybe it might be useful to remove the run-in-place if clause from the file:

if test "xyes" = "x@RUN_IN_PLACE@"; then
if [ -z "$LD_LIBRARY_PATH" ]; then
LD_LIBRARY_PATH=$LINUXCNC_HOME/lib
else
LD_LIBRARY_PATH=$LINUXCNC_HOME/lib:"$LD_LIBRARY_PATH"
fi
export LD_LIBRARY_PATH
fi