-
Notifications
You must be signed in to change notification settings - Fork 2.1k
pkg/oonf_api: Use MRI script to combine archives. #12155
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
Conversation
The OONF package is combining multiple ".a" file into a single archive. The way it was being done involved creating and changing directories, unpacking the original archives and repacking them into a combined one. Theis has a couple of issues: - It is untidy and wasteful. - It breaks when thin archives are enabled, as a thin archive cannot be unpacked. This commit uses a MRI script to do the combining step. It works both with and without thin archives and is cleaner overall. An issue that remains to be soved is that make is calling itself to create the archive, as the PARTIAL_ARCHIVES are not known before hand. This is hacky. It can be solved but it is a subject for another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests/pkg_oonf_api
still compiles and produces the same output.
But the test is basically a noop, it only does
puts("oonf_api package compiled!");
and doesn't actually call any oonf_api function :/
The tests inside |
Mmm, how bit-rotted was it? Shall we bring the sledgehammer and demolish oonf_api? |
@jcarrano Looks like you are on a killing spree 😄 The oonf_api library contains it's own suite of tests. When I ported it to RIOT many years ago, I also added Makefiles to build the tests on RIOT (and tweaked some buffers to fit onto the trusty msb-a2). Turns out those Makefiles were never used, so when RIOT changed around them, they remained static, unaware of path changes and new CFLAGS. I'm actually surprised it took so little to get them working again. Now for users, I don't know. The |
oh, ok, that changes everything, especially if you got them working away. Anyways, it was scary to find out that the tests were not working. |
I got them working, but not in a CI-able way, that is another task. |
It is true though that this pkg still points to oonf_api 0.3.0 from 2013. So interest in this package might indeed not be very high anymore. |
Contribution description
The OONF package is combining multiple ".a" file into a single archive. The way it was being done involved creating and changing directories, unpacking the original archives and repacking them into a combined one.
Theis has a couple of issues:
This commit uses a MRI script to do the combining step. It works both with and without thin archives and is cleaner overall.
An issue that remains to be soved is that make is calling itself to create the archive, as the PARTIAL_ARCHIVES are not known before hand. This is hacky. It can be solved but it is a subject for another PR.
Testing procedure
The OONF example should still compile.
Issues/PRs references
needed for #10195 .