Skip to content

Fix make empty variable warnings#3260

Merged
andypugh merged 1 commit intoLinuxCNC:masterfrom
BsAtHome:fix_makefile-hal_components-warnings
Jan 10, 2025
Merged

Fix make empty variable warnings#3260
andypugh merged 1 commit intoLinuxCNC:masterfrom
BsAtHome:fix_makefile-hal_components-warnings

Conversation

@BsAtHome
Copy link
Contributor

@BsAtHome BsAtHome commented Jan 9, 2025

Fixed in this PR:

  • Some hal modules do not exist in uspace that should be in a conditional for the build. The object build rules are in a conditional, but the target build rules were not.
  • A change in 2021 (3775816) removed t_on/t_off/t_p when they got component'ized and renamed. This removes the lingering deps.
  • Reduce the terminal clutter, comment out adding --warn-undefined-variables to MAKEFLAGS. Older debian did not show the clutter, but debian:sid does (as wel as other distros).

…with proper conditional.

Remove t_on/t_off/t_p dependencies because they got component'ized and renamed in 3775816.
Comment out the terminal clutter option --warn-undefined-variables.
@andypugh
Copy link
Collaborator

andypugh commented Jan 9, 2025

I wonder why those (mainly) drivers do not exist in uspace? They seem to be a mix of ISA and PCI boards.
Other PCI boards (Mesa, for example) work fine in uspace.
I wonder if this is just because the uspace developer didn't have hardware to test on?

@andypugh
Copy link
Collaborator

andypugh commented Jan 9, 2025

It looks like Motenc-Lite is still a current product, though it looks like an expensive choice.
https://www.vitalsystem.com/motion/motenc/motenc_lite.php

@BsAtHome
Copy link
Contributor Author

BsAtHome commented Jan 9, 2025

I wonder why those (mainly) drivers do not exist in uspace? They seem to be a mix of ISA and PCI boards.

That is indeed a good question. But, it looks like this code is 15+ years (and some older). Has anybody seen or heard someone complaining that there was no uspace support for these boards?

Other PCI boards (Mesa, for example) work fine in uspace. I wonder if this is just because the uspace developer didn't have hardware to test on?

Lack of testing would be an obvious reason. But the time this code has been untouched also suggests that nobody has needed it and nobody cared. I imagine that using these drivers is for someone wanting to "fix" an existing install, but to use it as new with the cost you mention... And even then, when has it last been tested as a kernel module?

Therefore, I see no point in updating the code for uspace. That leaves us with fixing the make problem, which the warnings indicated.

@andypugh
Copy link
Collaborator

If the code is 15 years old then I think that it is not related to uspace (which is younger), but rather to the old "sim" build target which explicitly excluded hardware drivers.
At the moment there are RTAI packages that users can use, but its not clear to me how long that will continue. At the present i have to build those packages by hand for each release using a modified version of the LinuxCNC build system (the current mainline build system fails to build RTAI debs)

@BsAtHome
Copy link
Contributor Author

Well, for example the hal_motenc.c driver (for the one you mentioned) was added between 21 and 19 years ago. The last fix was fixing a PCI API deprecation 13 years ago. With uspace, the commit 1d6c0d0 just moved the 'sim' exclusions into 'uspace' exclusions. I guess nobody cared about these drivers being ported to uspace functionality.

That said, this PR does not change current behavior. I merely fixes the rules such that no warnings are generated. If someone wants these drivers to become active in uspace, they are welcome to do the port, but that is a different problem.

I don't have/run RTAI, so I can't comment on the specific problems on that build. But, maybe it should receive some caring attention, reading the required out-of-tree efforts to make it work. But this is also beyond the scope of this PR.

@andypugh
Copy link
Collaborator

That said, this PR does not change current behavior. I merely fixes the rules such that no warnings are generated. If someone wants these drivers to become active in uspace, they are welcome to do the port, but that is a different problem.

Indeed, I was just wondering if we need to look at this.

I will merge this, and then raise an issue.

@andypugh andypugh merged commit a6ec289 into LinuxCNC:master Jan 10, 2025
10 checks passed
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.

2 participants