building linuxcnc-dev on ubuntu 16.04 preempt-rt kernel

More
24 Dec 2022 13:44 #260237 by tommylight
Are you aware that there are ready made debs for Ubuntu 16?
Also, why are you using Ubuntu 16??? :)

If you are trying to build LinuxCNC 2.9 or Master 2.10, there are to many changes in Python, so probably will not work.
If you are not making changes to source code, using new Ubuntu or Mint or Debian is easy to install LinuxCNC as it is in the testing repos of Debian, so give this a try, it is for Mint but should also work on new Ubuntu:
forum.linuxcnc.org/9-installing-linuxcnc...ter-on-linux-mint-21
The following user(s) said Thank You: akg1904

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

More
25 Dec 2022 11:50 #260276 by akg1904
Hi,
I am using Debian 11 and is trying to build Linuxcnc 2.10 and was following the guide but during "make" it some how keep giving some error..

Regards
Abhishek

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

More
More
25 Dec 2022 20:21 #260289 by andypugh

You seem to be having that a lot. Which is odd. 

If feels like possibly you have a corrupted file. Try a complete reset:
git reset --hard origin/master
git clean
make clean
./autogen.sh
./configure --with-realtime=uspace
make
sudo make setuid
 

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

More
26 Dec 2022 06:18 - 26 Dec 2022 09:01 #260299 by akg1904
Hi,

I did a fresh linuxCNC installation by following the link given below for Debian 11:
gnipsel.com/linuxcnc/debian-11-emc.html

as suggested by Tommylight but I am still getting an error when " debuild -uc -us" was executed:

Creating anglejog.mak
Creating and2.mak
Creating abs_s32.mak
Creating abs.mak
Reading 0/205 dependency files
Done reading dependencies
/bin/bash: -c: line 1: syntax error near unexpected token `('
/bin/bash: -c: line 1: `if gcc -I. -Ilibnml/linklist -Iemc -Ilibnml/cms -Ilibnml/rcs -Ilibnml/inifile -Ilibnml/os_intf -Ilibnml/nml -Ilibnml/buffer -Ilibnml/posemath -Irtapi -Ihal -Iemc -Iemc/nml_intf -Iemc/kinematics -Iemc/tp -Iemc/motion -Iemc/ini -Iemc -Iemc/rs274ngc -Iemc/sai -Iemc/pythonplugin -Iemc/tooldata -Iemc -I/home/ethereal/atom_repo/lco (another copy)/build/src/include -I/usr/include/python3.9 -Os -fwrapv  -g -Wall -Wno-stringop-truncation -D_FORTIFY_SOURCE=2  -DULAPI -std=gnu11 -Werror=implicit-function-declaration -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -mieee-fp -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "-mieee-fp"; fi ;'
Reading 0/234 realtime dependency files
Done reading realtime dependencies
Copying test input hal/components/lincurve.comp
Copying test input hal/components/logic.comp
Copying test input hal/components/bitslice.comp
sed hal/drivers/mesa_uart.comp -e "1 s/mesa_uart/mesa_uart_test/" > ../tests/halcompile/serial-out-of-tree/mesa_uart_test.comp
sed ../docs/src/hal/rand.comp -e "1 s/rand/rand_test/" > ../tests/halcompile/userspace/rand_test.comp
cp ../scripts/rtapi.conf ../tests/uspace/spawnv-root/rtapi.conf
Compiling libnml/inifile/inifile.cc
/bin/bash: -c: line 1: syntax error near unexpected token `('
/bin/bash: -c: line 1: `g++ -std=gnu++17 -c -I. -Ilibnml/linklist -Iemc -Ilibnml/cms -Ilibnml/rcs -Ilibnml/inifile -Ilibnml/os_intf -Ilibnml/nml -Ilibnml/buffer -Ilibnml/posemath -Irtapi -Ihal -Iemc -Iemc/nml_intf -Iemc/kinematics -Iemc/tp -Iemc/motion -Iemc/ini -Iemc -Iemc/rs274ngc -Iemc/sai -Iemc/pythonplugin -Iemc/tooldata -Iemc -I/home/ethereal/atom_repo/lco (another copy)/build/src/include -I/usr/include/python3.9  -DULAPI  -g -Wall -Wno-stringop-truncation -D_FORTIFY_SOURCE=2 -Os -fwrapv -Werror=overloaded-virtual -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++17 -fPIC \'
make[2]: *** [Makefile:286: objects/libnml/inifile/inifile.o] Error 2
make[2]: Leaving directory '/home/ethereal/atom_repo/lco (another copy)/build/src'
make[1]: *** [debian/rules:50: override_dh_auto_build-arch] Error 2
make[1]: Leaving directory '/home/ethereal/atom_repo/lco (another copy)/build'
make: *** [debian/rules:38: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed

Could you all please guide me in right path..

Regards
Abhishek
Last edit: 26 Dec 2022 09:01 by akg1904.

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

More
26 Dec 2022 11:39 #260311 by rodw
Is this on Ubuntu or is it Debian?

In more recent builds, I have found there are some problems on debian if the default desktop environment is installed.

Can you try using the xfce desktop? That fixes some issues I've experienced.
sudo apt install tasksel
sudo tasksel
and select xfce.

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

More
26 Dec 2022 11:56 #260318 by tommylight
Looks like you are trying to install Ethercat, so this might be a better place:
forum.linuxcnc.org/ethercat/45336-etherc...step-by-step?start=0

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

More
28 Dec 2022 09:30 - 28 Dec 2022 09:39 #260456 by akg1904
Hi,
Thanks for the replies,
I am using this for the source:
github.com/LinuxCNC/linuxcnc.git

I am currently using debian 11 (bullseye) cause I figured it was more stable, should I try with Ubuntu?

Tried reinstalling Debian again and started afresh but I am still facing the same error. I figure it is probably something to do with the way makefile is written or dependancies, I could be wrong. I dont have alot of experience here...

Here is the error after trying "make -j4"

Reading 0/207 dependency files
Done reading dependencies
/bin/sh: 1: Syntax error: "(" unexpected (expecting "then")
Reading 0/250 realtime dependency files
Done reading realtime dependencies
Compiling libnml/inifile/inifile.cc
Compiling libnml/inifile/inivar.cc
Compiling libnml/posemath/_posemath.c
Compiling libnml/posemath/posemath.cc
/bin/sh: 1: Syntax error: "(" unexpected
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [Makefile:286: objects/libnml/inifile/inifile.o] Error 2
make: *** Waiting for unfinished jobs....
make: *** [Makefile:285: objects/libnml/inifile/inivar.o] Error 2
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [Makefile:278: objects/libnml/posemath/_posemath.o] Error 2
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [Makefile:286: objects/libnml/posemath/posemath.o] Error 2

I tried using xfce as Rod suggested but still no success.

Any ideas? or anyone you know who could point me to trying to figure this out?

Regards
Abhishek
Last edit: 28 Dec 2022 09:39 by akg1904.

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

More
28 Dec 2022 10:11 #260457 by rodw
The way to build linuxcnc is well documented and has not changed for a long time
linuxcnc.org/docs/2.9/html/code/building-linuxcnc.html
I suspect you sere missing a step.
Please read the section on satisfying build dependencies and follow that part carefully. INstall any missing modules
 

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

More
28 Dec 2022 10:49 #260461 by akg1904
Hi guys,

I managed to resolve the previous error, turns out I was an idiot or unaware...

To anyone who might be facing this type of error. the directory / folder structure shouldn't have any '(' or ')' in it.
Ie. my main folder name was "lco (copy)" I renamed it to "lco_copy"

then re-ran:

./autogen.sh
./configure --with-realtime=uspace
make -j4

and the above error is resolved :)

Thanks everyone for all your time.

Will be back if there are any new errors :D

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

Time to create page: 0.373 seconds
Powered by Kunena Forum