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
Slibtool build fixes #163
Slibtool build fixes #163
Conversation
Also see this downstream issue: https://bugs.gentoo.org/789636 And also reported independently on the slibtool tracker: |
Hi, Overall looking good. Do you have any reference for this:
Cheers |
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.
The general idea looks good to me, I just have questions on the use of LDFLAGS.
Now that I looked again it appears the automake documentation does allow
https://www.gnu.org/software/automake/manual/html_node/Program-and-Library-Variables.html However as demonstrated by lttng-tools that linking with |
Thank you linking that info.
From a quick look, I do agree with you here.
There is a lot more chance that you have a better hunch regarding this than me. Cheers |
To prevent any confusion, can you rename Thanks! |
Done. I added one more commit to fix a new problem I encountered when rebasing the PR.
The fix is described in lttng-ust. |
@orbea do you mind if I add your |
This allows correctly linking test_kernel_data with slibtool. Signed-off-by: orbea <orbea@riseup.net>
This allows correctly linking test_session and test_ust_data with slibtool. Signed-off-by: orbea <orbea@riseup.net>
This allow correctly linking live_test with slibtool. Signed-off-by: orbea <orbea@riseup.net>
This is not a libtool argument, but rather a linker argument. GNU libtool will silently ignore arguments it doesn't understand in many cases while slibtool does not. Signed-off-by: orbea <orbea@riseup.net>
Fixes: liblttng-ust-ctl.so: undefined reference to `lttng_ust_sigbus_state' Signed-off-by: orbea <orbea@riseup.net>
@jgalar I don't mind, but I updated the commits to include it. :) |
Merged manually, thanks! |
When building lttng-tools with slibtool (https://dev.midipix.org/cross/slibtool) it fails in many places.
tests/unit/
fail with undefined references because they depend on functions compiled into programs and then are linked directly with the.o
object files. Build projects that use$(LIBTOOL)
should not link the object files themselves and should use.la
libtool archives instead. So I created theliblttng-sessiond-comm.la
convenience library that will be linked with instead.--no-as-needed
which is a linker argument. To solve this it needs to be passed directly to the linker with-Wl,--no-as-needed
.NOTE:
For reference the next slibtool build failure I see is:
This happens because slibtool places compiled binaries in the
.libs
directory whileprog
is a shell wrapper script. Ideally some method of--mode=execute
could be used to solve this, but may require further work in slibtool itself to work. I will follow up on this PR in the future.