ShabbyX / RTAI

(NO LONGER MAINTAINED) Clone of RTAI from https://www.rtai.org
28 stars 17 forks source link

Compilation for LinuxCNC is broken #1

Closed NTULINUX closed 11 years ago

NTULINUX commented 11 years ago

When compiling LinuxCNC with branch rtos-integration-preview3, the compiling errors occur:

make: Entering directory `/home/ntu/devel/linuxcnc/src'

Linking halstreamer

../lib/liblinuxcnchal.so.0: undefined reference to `rt_shm_free'

../lib/liblinuxcnchal.so.0: undefined reference to `_rt_shm_alloc'

../lib/liblinuxcnchal.so.0: undefined reference to `rt_get_cpu_time_ns'

Not too sure at this point how to fix it. Any help is appreciated!

Alec Ari neotheuser@ymail.com

ShabbyX commented 11 years ago

rt_shm_free is implemented in rtai_shm.h itself, so it should exist right where it is included in your code. Try to put a #warning right before its implementation to see if the directives are correct and it actually gets to that part. If so, try to see what RTAI_PROTO expands to in your configuration.

ShabbyX commented 11 years ago

I'm not using LinuxCNC, so I'm afraid you're on your own in this one.

SebKuzminsky commented 11 years ago

I've build LinuxCNC on a recent, slightly hacked version of RTAI. My RTAI branch is here: https://github.com/SebKuzminsky/rtai/tree/prerelease-4

I pointed Paolo at that branch, but I'm not sure what (if any) commits have been accepted up stream.

When I tried to use the resulting LinuxCNC + RTAI combo, i had strange problems with (i think) PCI reads. I haven't debugged it yet. Test carefully before running real hardware with it!

ShabbyX commented 11 years ago

If I know Paolo, he probably never even looked at it.

Anyway, why didn't you fork from my RTAI repository so we can easily share commits? If there are any important ones, let me know and I'll include them here.

NTULINUX commented 11 years ago

I really like ShabbyX's idea in regards to the important commit merging.

NTULINUX commented 11 years ago

In regards to the bug I reported here, mhaberler believes this is a linking issue:

mhaberler: this is a linking error, and you are missing a library, likely lxrt mhaberler: it is a linking error mhaberler: no idea where these syms are defined. 'man nm' and dig the candidates

This was in #linuxcnc-devel

NTULINUX commented 11 years ago

This issue still affects master, even after magma was merged in.

ShabbyX commented 11 years ago

Is it just those three functions?!

NTULINUX commented 11 years ago

Yep!

ShabbyX commented 11 years ago

Does the patch you sent to mailing list fix this? If so, did you commit it? If so, please close the issue.

NTULINUX commented 11 years ago

The patch I sent to the mailing list fixes THAT very particular issue, and a pthread problem. Now I'm getting a stupid SSE issue. See the issue that modernist talks about here:

http://psha.org.ru/irc/%23emc/2011-04-19.html

Also, for those who want the link to the email I sent to the RTAI mailing list:

http://mail.rtai.org/pipermail/rtai/2013-June/025602.html

NTULINUX commented 11 years ago

Issue fixed with "Eager Inlining" selected.