Build LinuxCNC v2.9.2 with Ubuntu-20.04 sucessfully but cannot find the command

More
24 Apr 2024 00:02 #298950 by l4es
Dear Forum,

It seems that I was able to build the linuxcnc v2.9.2 on Ubuntu-20.04 as below :
$ uname -r
5.15.119-rt65

$ ./autogen.sh
$ ./configure --with-realtime=uspace

checking for c++... c++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether c++ supports C++17 features with -std=gnu++17... yes
checking build toplevel... /data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x
checking installation prefix... run in place
checking for grep... /usr/bin/grep
checking for egrep... /usr/bin/egrep
checking for pkg-config... /usr/bin/pkg-config
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking rpc/rpc.h usability... yes
checking rpc/rpc.h presence... yes
checking for rpc/rpc.h... yes
checking for rtai-config... none
checking for xeno-config... none
checking for realtime API(s) to use... uspace
checking whether to enable userspace PCI access... yes
checking for libudev... yes - version 245
checking for cc version... not specified
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for usability of linux/hidraw.h... yes
checking for usability of rpc/rpc.h... yes
checking for libmodbus3... yes - version 3.1.6
checking for libusb-1.0... yes
checking for libgpiod... checking for main in -lgpiod... yes
checking for module installation directory... configuring for run-in-place
/data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x/rtlib
checking for glib... yes - 2.64.6
checking for GTK 3.22.4 or above... yes - 3.24.20
checking for GTK 2.4.0 or above... yes - 2.24.32
checking for libgnomeprintui-2.2... no -- printing from classicladder will not be possible
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for install... /usr/bin/install -c
checking for sed... /usr/bin/sed
checking for ps... /usr/bin/ps
checking for kill... /usr/bin/kill
checking for whoami... /usr/bin/whoami
checking for awk... /usr/bin/awk
checking for pidof... /usr/bin/pidof
checking for ipcs... /usr/bin/ipcs
checking for fuser... /usr/bin/fuser
checking for yapps... no
checking for yapps2... /usr/bin/yapps2
checking for mandb... /usr/bin/mandb
checking for intltool-extract... /usr/bin/intltool-extract
checking for yapps... (cached) /usr/bin/yapps2
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for boostlib >=  (102000)... yes
checking for python build information...
checking for python3.11... no
checking for python3.10... no
checking for python3.9... no
checking for python3.8... python3.8
checking for main in -lpython3.8... yes
  results of the Python check:
    Binary:      python3.8
    Library:     python3.8
    Include Dir: /usr/include/python3.8
checking for python3.8... /usr/bin/python3.8
checking for python... (cached) /usr/bin/python3.8
checking for a version of Python >= '2.1.0'... yes
checking for the sysconfig Python package... yes
checking for Python include path... -I/usr/include/python3.8
checking for Python library path... -L/usr/lib -lpython3.8
checking for Python site-packages path... /usr/lib/python3.8/site-packages
checking for Python platform specific site-packages path...
checking python extra libraries... -lcrypt -lpthread -ldl  -lutil -lm -lm
checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
checking consistency of all components of python development environment... yes
checking whether the Boost::Python library is available... yes
checking whether boost_python is the correct library... no
checking whether boost_python38 is the correct library... yes
checking whether to build documentation... no
checking sys/io.h usability... yes
checking sys/io.h presence... yes
checking for sys/io.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for semtimedop... yes
checking for optreset... no
checking for library containing dlopen... -ldl
checking for library containing clock_nanosleep... none required
checking for tcl... /usr/lib/tcl8.6/tclConfig.sh found
checking for tk... /usr/lib/tk8.6/tkConfig.sh found
checking whether to check for runtime dependencies... yes
checking for BWidget using /usr/bin/tclsh8.6... found
checking for BLT using /usr/bin/tclsh8.6... found
checking for tclX using /usr/bin/tclsh8.6... found
checking for python pango module... found
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking X11/extensions/Xinerama.h usability... yes
checking X11/extensions/Xinerama.h presence... yes
checking for X11/extensions/Xinerama.h... yes
checking for XineramaQueryExtension in -lXinerama... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
Trying readline without -ltermcap
checking for readline in -lreadline... yes
Trying readline with -ltermcap
checking for readline in -lreadline... yes
Readline does not require -ltermcap
checking whether readline license is compatible with GPL-2... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for setlocale... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for gettext in -lintl... no
checking for xgettext... /usr/bin/xgettext
checking for msgfmt... /usr/bin/msgfmt
checking python version... OK
checking match between tk and Tkinter versions... 8.6
checking for site-package location... /usr/lib/python3/dist-packages
checking for working GLU quadrics... yes
checking for Xmu headers... checking X11/Xmu/Xmu.h usability... yes
checking X11/Xmu/Xmu.h presence... yes
checking for X11/Xmu/Xmu.h... yes
configure: creating ./config.status
config.status: creating ../scripts/rtapi.conf
config.status: creating ../scripts/linuxcnc
config.status: creating ../scripts/linuxcnc_info
config.status: creating ../scripts/halrun
config.status: creating ../scripts/rip-environment
config.status: creating ../scripts/haltcl
config.status: creating ../scripts/halcmd_twopass
config.status: creating ../scripts/realtime
config.status: creating ../scripts/runtests
config.status: creating ../scripts/linuxcnc_var
config.status: creating ../scripts/linuxcnc-checklink
config.status: creating Makefile.inc
config.status: creating Makefile.modinc
config.status: creating ../tcl/linuxcnc.tcl
config.status: creating ../lib/python/nf.py
config.status: creating ../scripts/linuxcncmkdesktop
config.status: creating ../share/applications/linuxcnc-latency.desktop
config.status: creating ../share/applications/linuxcnc-latency-histogram.desktop
config.status: creating ../share/applications/linuxcnc-pncconf.desktop
config.status: creating ../share/applications/linuxcnc-stepconf.desktop
config.status: creating ../share/applications/linuxcnc.desktop
config.status: creating ../share/desktop-directories/linuxcnc-cnc.directory
config.status: creating ../share/desktop-directories/linuxcnc-ref.directory
config.status: creating ../share/desktop-directories/linuxcnc-doc.directory
config.status: creating ../share/menus/CNC.menu
config.status: creating config.h



######################################################################
#                LinuxCNC - Enhanced Machine Controller              #
######################################################################
#                                                                    #
#   LinuxCNC is a software system for computer control of machine    #
#   tools such as milling machines. LinuxCNC is released under the   #
#   GPL.  Check out www.linuxcnc.org/ for more details.       #
#                                                                    #
#                                                                    #
#   It seems that ./configure completed successfully.                #
#   This means that RT is properly installed                         #
#   If things don't work check config.log for errors & warnings      #
#                                                                    #
#   Next compile by typing                                           #
#         make                                                       #
#         sudo make setuid                                           #
#          (if realtime behavior and hardware access are required)   #
#                                                                    #
#   Before running the software, set the environment:                #
#         . (top dir)/scripts/rip-environment                        #
#                                                                    #
#   To run the software type                                         #
#         linuxcnc                                                   #
#                                                                    #
######################################################################



$ make
Reading 205/205 dependency files
Done reading dependencies
Reading 238/238 realtime dependency files
Done reading realtime dependencies
cp ../scripts/rtapi.conf ../tests/uspace/spawnv-root/rtapi.conf
Compiling libnml/inifile/inifile.cc
In file included from /usr/include/string.h:495,
                 from libnml/inifile/inifile.cc:18:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘const char* IniFile::Find(const char*, const char*, int, int*)’ at libnml/inifile/inifile.cc:319:23:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output may be truncated copying between 0 and 255 bytes from a string of length 256 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Creating shared library liblinuxcncini.so.0
ln -sf liblinuxcncini.so.0 ../lib/liblinuxcncini.so
Compiling libnml/inifile/inivar.cc
Linking inivar
Compiling libnml/os_intf/_sem.c
Compiling libnml/os_intf/_shm.c
Compiling rtapi/uspace_ulapi.c
Creating shared library liblinuxcnchal.so.0
ln -sf liblinuxcnchal.so.0 ../lib/liblinuxcnchal.so
Creating shared library libnml.so.0
ln -sf libnml.so.0 ../lib/libnml.so
Compiling rtapi/uspace_rtapi_app.cc
Compiling rtapi/rtapi_pci.cc
Linking rtapi_app
./config.status --file=../docs/man/man1/linuxcnc.1:../docs/src/man/man1/linuxcnc.1.in
config.status: creating ../docs/man/man1/linuxcnc.1
Linking halstreamer
Linking halsampler
Linking panelui
Compiling hal/user_comps/mb2hal/mb2hal.c
Compiling hal/user_comps/mb2hal/mb2hal_init.c
Compiling hal/user_comps/mb2hal/mb2hal_modbus.c
Compiling hal/user_comps/mb2hal/mb2hal_hal.c
Linking mb2hal
Linking gs2_vfd
Linking hy_gt_vfd
Linking svd-ps_vfd
Linking shuttle
Compiling hal/user_comps/xhc-hb04.cc
Linking xhc-hb04
Linking sendkeys
Linking thermistor
Linking vfs11_vfd
Compiling hal/classicladder/arithm_eval.c
Compiling hal/classicladder/arrays.c
Compiling hal/classicladder/calc.c
Compiling hal/classicladder/calc_sequential.c
Compiling hal/classicladder/classicladder.c
Compiling hal/classicladder/classicladder_gtk.c
Compiling hal/classicladder/config.c
Compiling hal/classicladder/config_gtk.c
Compiling hal/classicladder/drawing.c
Compiling hal/classicladder/drawing_sequential.c
Compiling hal/classicladder/edit.c
Compiling hal/classicladder/edit_gtk.c
Compiling hal/classicladder/edit_sequential.c
Compiling hal/classicladder/editproperties_gtk.c
Compiling hal/classicladder/emc_mods.c
Compiling hal/classicladder/files.c
Compiling hal/classicladder/files_project.c
Compiling hal/classicladder/files_sequential.c
Compiling hal/classicladder/manager.c
Compiling hal/classicladder/manager_gtk.c
Compiling hal/classicladder/protocol_modbus_master.c
Compiling hal/classicladder/protocol_modbus_slave.c
Compiling hal/classicladder/serial_linux.c
Compiling hal/classicladder/socket_modbus_master.c
Compiling hal/classicladder/socket_server.c
Compiling hal/classicladder/spy_vars_gtk.c
Compiling hal/classicladder/symbols.c
Compiling hal/classicladder/symbols_gtk.c
Compiling hal/classicladder/vars_names.c
Compiling hal/classicladder/vars_access.c
Linking classicladder
Compiling hal/utils/halcmd.c
Compiling hal/utils/halcmd_commands.cc
Linking hal.so
Compiling hal/utils/halcmd_main.c
Compiling hal/utils/halcmd_completion.c
Linking halcmd
Compiling hal/utils/halrmt.c
Linking halrmt
Compiling hal/utils/meter.c
Compiling hal/utils/miscgtk.c
Linking halmeter
Compiling hal/utils/scope.c
Compiling hal/utils/scope_horiz.c
Compiling hal/utils/scope_vert.c
Compiling hal/utils/scope_trig.c
Compiling hal/utils/scope_disp.c
Compiling hal/utils/scope_files.c
Linking halscope
Linking vfdb_vfd
Linking wj200_vfd
Linking pi500_vfd
Linking hy_vfd
Compiling hal/user_comps/xhc-whb04b-6/main.cc
Linking xhc-whb04b-6
Compiling emc/nml_intf/emcglb.c
Linking liblinuxcnc.a
Linking linuxcnc.so
Linking linuxcncrsh
Linking schedrmt
Compiling emc/usr_intf/emclcd.cc
emc/usr_intf/emclcd.cc: In function ‘int main(int, char**)’:
emc/usr_intf/emclcd.cc:494:52: warning: ‘%s’ directive output may be truncated writing up to 3679 bytes into a region of size 1013 [-Wformat-truncation=]
  494 |     snprintf(sockStr, sizeof(sockStr), "widget_add %s %s %s\n", widgets.screenName,
      |                                                    ^~
In file included from /usr/include/stdio.h:867,
                 from emc/usr_intf/emclcd.cc:30:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output 15 or more bytes (assuming 3694) into a destination of size 1024
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling emc/usr_intf/sockets.c
Linking linuxcnclcd
Linking halui
Linking linuxcncsvr
Compiling emc/task/emccanon.cc
Compiling emc/task/emctaskmain.cc
Compiling emc/rs274ngc/interp_base.cc
Compiling emc/rs274ngc/interp_namedparams.cc
Linking libpyplugin.so.0
c++ -std=gnu++17 -g -L/data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x/lib -Wl,-rpath,/data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x/lib  -lgpiod -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-soname,libpyplugin.so.0 -shared -o ../lib/libpyplugin.so.0 objects/emc/pythonplugin/python_plugin.o ../lib/liblinuxcncini.so -lstdc++ -lboost_python38 -L/usr/lib -lpython3.8 -lcrypt -lpthread -ldl  -lutil -lm -lm
ln -sf libpyplugin.so.0 ../lib/libpyplugin.so
Linking librs274.so.0
c++ -std=gnu++17 -g -L/data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x/lib -Wl,-rpath,/data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x/lib  -lgpiod -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-soname,librs274.so.0 -shared -o ../lib/librs274.so.0 objects/emc/rs274ngc/interp_arc.o objects/emc/rs274ngc/interp_array.o objects/emc/rs274ngc/interp_base.o objects/emc/rs274ngc/interp_check.o objects/emc/rs274ngc/interp_convert.o objects/emc/rs274ngc/interp_queue.o objects/emc/rs274ngc/interp_cycles.o objects/emc/rs274ngc/interp_execute.o objects/emc/rs274ngc/interp_find.o objects/emc/rs274ngc/interp_internal.o objects/emc/rs274ngc/interp_inverse.o objects/emc/rs274ngc/interp_read.o objects/emc/rs274ngc/interp_write.o objects/emc/rs274ngc/interp_o_word.o objects/emc/rs274ngc/interp_g7x.o objects/emc/rs274ngc/modal_state.o objects/emc/rs274ngc/nurbs_additional_functions.o objects/emc/rs274ngc/interp_namedparams.o objects/emc/rs274ngc/interp_python.o objects/emc/rs274ngc/interp_remap.o objects/emc/rs274ngc/interp_setup.o objects/emc/rs274ngc/canonmodule.o objects/emc/rs274ngc/pyparamclass.o objects/emc/rs274ngc/pyemctypes.o objects/emc/rs274ngc/pyinterp1.o objects/emc/rs274ngc/pyblock.o objects/emc/rs274ngc/pyarrays.o objects/emc/rs274ngc/interpmodule.o objects/emc/rs274ngc/rs274ngc_pre.o objects/emc/rs274ngc/interp_inspection.o ../lib/liblinuxcncini.so ../lib/libpyplugin.so ../lib/liblinuxcnchal.so.0 ../lib/libtooldata.so.0 -lstdc++ -lboost_python38 -L/usr/lib -lpython3.8 -lcrypt -lpthread -ldl  -lutil -lm -lm
Linking milltask
c++ -std=gnu++17 -o ../bin/milltask objects/emc/motion/emcmotglb.o objects/emc/task/emctask.o objects/emc/task/emccanon.o objects/emc/task/emctaskmain.o objects/emc/motion/usrmotintf.o objects/emc/motion/emcmotutil.o objects/emc/task/taskintf.o objects/emc/motion/dbuf.o objects/emc/motion/stashf.o objects/emc/task/taskmodule.o objects/emc/task/taskclass.o objects/emc/task/backtrace.o ../lib/librs274.so.0 ../lib/liblinuxcnc.a ../lib/libnml.so.0 ../lib/liblinuxcncini.so.0 ../lib/libposemath.so.0 ../lib/liblinuxcnchal.so.0 ../lib/libpyplugin.so.0 ../lib/libtooldata.so.0 -L/data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x/lib -Wl,-rpath,/data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x/lib  -lgpiod -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lboost_python38 -L/usr/lib -lpython3.8 -lcrypt -lpthread -ldl  -lutil -lm -lm
Linking io
Linking iov2
emc/Submakefile:Linking genserkins
Compiling emc/canterp/canterp.cc
Linking canterp.so
Compiling emc/sai/driver.cc
Linking rs274
Linking motion-logger
Compiling module_helper/module_helper.c
Linking linuxcnc_module_helper
Compiling hal/halmodule.cc
Linking python module _hal.so
Compiling emc/usr_intf/axis/extensions/emcmodule.cc
Linking python module linuxcnc.so
Compiling emc/usr_intf/axis/extensions/_toglmodule.c
Linking python module _togl.so
Compiling emc/rs274ngc/gcodemodule.cc
Linking python module gcode.so
c++ -std=gnu++17 -L/data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x/lib -Wl,-rpath,/data/R3T-UBUNTU-20/LinuxCNC/linuxcnc-v2.9.x/lib  -lgpiod -shared -o ../lib/python/gcode.so objects/emc/rs274ngc/gcodemodule.o ../lib/librs274.so.0 -lstdc++
Compiling realtime hal/drivers/hal_speaker.c
Linking ../rtlib/hal_speaker.so
Compiling realtime hal/drivers/hal_gpio.c
Linking ../rtlib/hal_gpio.so
Compiling realtime emc/motion/control.c
Linking ../rtlib/motmod.so
config.status: creating ../scripts/setup_designer
You now need to run 'sudo make setuid' in order to run in place with access to hardware.


$ sudo make setuid
chown root ../bin/rtapi_app
chmod 4750 ../bin/rtapi_app
chown root ../bin/linuxcnc_module_helper
chmod 4750 ../bin/linuxcnc_module_helper


But the linuxcnc command is found nowhere. Can anybody help me, please ?

Thanks and best regards,
Khang.

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

More
24 Apr 2024 00:08 #298951 by PCW
Default build is for a RIP (Run In Place) environment

#   Before running the software, set the environment:                #
#         . (top dir)/scripts/rip-environment                        #
 
The following user(s) said Thank You: l4es

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

More
24 Apr 2024 12:22 - 24 Apr 2024 12:24 #298992 by l4es
Thanks for your instruction. I could get it work using that script (with a rebooting after the compilation as well as runtests). By the way, do you think that it would be possible to build debian .deb package(s) for future installation on fresh machines with same Ubuntu version?
Last edit: 24 Apr 2024 12:24 by l4es.

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

More
24 Apr 2024 12:36 #298994 by tommylight
Yes it is, it is explained on the same page in the documents and will save the debs in the home folder.

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

Time to create page: 0.131 seconds
Powered by Kunena Forum