building linuxcnc-dev on ubuntu 16.04 preempt-rt kernel

More
3 years 10 months ago - 3 years 10 months ago #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: 3 years 10 months ago by akg1904.
More
3 years 10 months ago #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.
More
3 years 10 months ago #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
More
3 years 10 months ago - 3 years 10 months ago #260456 by akg1904
Hi,
Thanks for the replies,
I am using this for the source:
[url] github.com/LinuxCNC/linuxcnc.git [/url]

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: 3 years 10 months ago by akg1904.
More
3 years 10 months ago #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
 
More
3 years 10 months ago #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
Time to create page: 0.591 seconds
Powered by Kunena Forum