Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTAI: Fix undefined symbols in hal_lib #2650

Merged
merged 1 commit into from
Sep 21, 2023
Merged

RTAI: Fix undefined symbols in hal_lib #2650

merged 1 commit into from
Sep 21, 2023

Conversation

NTULINUX
Copy link
Contributor

I am not sure if the code is correct, just some simple copy and paste.

Signed-off-by: Alec Ari <neotheuser@ymail.com>
@andypugh
Copy link
Collaborator

This is pretty much what I was planning to do, but was hoping for Petter to chip in.

@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Sep 21, 2023 via email

petterreinholdtsen referenced this pull request Sep 21, 2023
The abs_s64 component is fetched from MachineKit, and the
64 bit type change is inspired by the u64 and s64 type
available in MachineKit.
@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Sep 21, 2023 via email

@andypugh
Copy link
Collaborator

Btw, perhaps you can include a script in tests/ triggering the problem and validating that the patch do as intended?

I don't think that there is any need for that, as almost every existing test fails at the point that it tries to create a HAL pin (not specifically a 64-bit one).
But only in kernel-mode RTAI.

@andypugh andypugh merged commit cdfd70c into LinuxCNC:master Sep 21, 2023
@NTULINUX NTULINUX deleted the hal_lib-rtai-fix branch September 22, 2023 03:01
@NTULINUX
Copy link
Contributor Author

NTULINUX commented Sep 22, 2023

Btw, perhaps you can include a script in tests/ triggering the problem and validating that the patch do as intended?

I don't think that there is any need for that, as almost every existing test fails at the point that it tries to create a HAL pin (not specifically a 64-bit one). But only in kernel-mode RTAI.

Wonderful.. Is there a way to add some debug info into creating HAL pins, maybe a way to track down how/why it's failing?

@andypugh
Copy link
Collaborator

Wonderful.. Is there a way to add some debug info into creating HAL pins, maybe a way to track down how/why it's failing?

What seems to be the situation here is that the patch as-installed exports symbols for the 64-bit parameter creation function, but does not contain the code, so there is no compiled code for the function to link to.

This appears to be OK for a .so and at compile time doesn't raise an error for a .ko either. (This is probably reasonable, in many cases the function body is compiled and linked at a different point in the process).
However, when you load a .so it looks like there is no check that the exported function has code to call. But with a ,ko there is.

This won't have shown up as, at the moment, no HAL components attempt to create a 64-bit HAL parameter. I think that if one were to write a test ,comp that tries to create a 64-bit param, then there would be a compilation failure. I probably need to reboot to uspace to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants