Compile Linux Kernel ,RTAI and LinuxCNC from Source Code

More
5 years 5 months ago - 4 years 9 months ago #209457 by Arthur_L
I feel i'm about to give up
When I compile linuxcnc, I encountered a problem

1 ./configure

checking for g++... g++
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 g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
......
2 make // error:

......
LD [M] /home/xxx/Downloads/linuxcnc-2.8.1/src/mesa_uart.o
CC [M] /home/xxx/Downloads/linuxcnc-2.8.1/src/objects/hal/drivers/pcl720.o
scripts/Makefile.build:303: recipe for target '/home/xxx/Downloads/linuxcnc-2.8.1/src/objects/hal/drivers/pcl720.o' failed
Makefile:1550: recipe for target '_module_/home/xxx/Downloads/linuxcnc-2.8.1/src' failed
make[1]: Leaving directory '/usr/src/linux-headers-4.19.152-rtai-amd64'
/home/xxx/Downloads/linuxcnc-2.8.1/src/objects/hal/drivers/pcl720.c:172:25: error: expected ‘)’ before ‘->’ token
#define out (__comp_inst->out)
^
./include/linux/logic_pio.h:32:9: note: in expansion of macro ‘out’
void (*out)(void *hostdata, unsigned long addr, u32 val,
^
make[2]: *** [/home/xxx/Downloads/linuxcnc-2.8.1/src/objects/hal/drivers/pcl720.o] Error 1
make[1]: *** [_module_/home/xxx/Downloads/linuxcnc-2.8.1/src] Error 2
Makefile:465: recipe for target 'modules' failed
make: *** [modules] Error 2
Last edit: 4 years 9 months ago by Arthur_L.

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

  • BeagleBrainz
  • Visitor
  • Visitor
5 years 5 months ago #209460 by BeagleBrainz
I noticed you're using Ubuntu 16.04, you may not be able to use the prepackaged debs.
Are you intending to add a parallel port card to your machine ?
How are you intending to control your cnc machine ?

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

More
5 years 5 months ago #209470 by Arthur_L
maybe IGH EtherCAT Master

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

More
5 years 5 months ago - 5 years 5 months ago #209532 by Bari
RTAI, LinuxCNC and the test suite all have to be built against each other.

Please use the LinuxCNC install ISO to build your controller.
Last edit: 5 years 5 months ago by Bari.

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

More
5 years 5 months ago #209573 by andypugh

Arthur_L wrote: bodor@bodor:~/Downloads/linuxcnc-2.8.1/src$ ./configure --with-realtime=/usr/realtime --with-kernel-headers=/usr/src/linux-headers-4.19.152-rtai-amd64


What is the actual path to the rtai modules? It is typically not /usr/realtime. Mine is (today) /usr/realtime-4.14.174-rtai-amd64

But, the fact is, that I spent weeks of my time doing this so you didn't have to. If you are doing it for fun, then that's great, and the more folk building RTAI from scratch the better (especially as a new RTAI version was released _today_)

Following the NTULINUX instructions normally goes smoothly (following the RTAI ones, less so)

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

More
5 years 5 months ago #209589 by Arthur_L
I am simply interested, because I found that there are very few documentation about compiling from source code (including compiling linux kernel, compiling RTAI (compatible with linuxcnc), and finally compiling linuxcnc)

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

Time to create page: 0.787 seconds
Powered by Kunena Forum