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

Static build with meson produces empty libxkbcommon-x11.a #86

Closed
DavidEGrayson opened this issue Feb 9, 2019 · 4 comments
Closed

Static build with meson produces empty libxkbcommon-x11.a #86

DavidEGrayson opened this issue Feb 9, 2019 · 4 comments

Comments

@DavidEGrayson
Copy link

DavidEGrayson commented Feb 9, 2019

I noticed that the recent pull request #85 fixed a bug that was causing Meson to produce an empty libxkbcommon.a file. However, the other library built by this project, libxkbcommon-x11.a, remains empty because it was built in the same way but it was not addressed by the pull request.

My workaround for now is to run mv libxkbcommon-x11-internal.a libxkbcommon-x11.a before ninja install.

In case anyone cares, I am using Nix, the functional package manager, to cross-compile libxkbcommon and a number of other libraries to produce static, standalone executables. Here is my build recipe for libxkbcommon: https://github.com/DavidEGrayson/nixcrpkgs/tree/6826a88be34cd76448d0c1d06d09da799a983a54/pkgs/libxkbcommon

@bluetech
Copy link
Member

Eek, thanks. I'll get to this today or tomorrow.

whot added a commit to whot/libxkbcommon that referenced this issue Feb 10, 2019
Similar to 75ce741, just for the -x11
sublibrary.

This works around meson bug 3937, 'link_whole' arguments don't get added into
the final static library and we end up with a virtually empty 8-byte
libxkbcommon-x11.a file, see mesonbuild/meson#3937

The internal lib is still built for the one test case that requires it.

Fixes xkbcommon#86

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
@whot
Copy link
Contributor

whot commented Feb 10, 2019

mea culpa, I didn't click that anything with x11 in the name would ever need to be statically linked ;)

I have the patch ready here, will file a MR once we clarify our position on the libxbkcommon-x11-internal lib (feel free to c-p if you're in a hurry).

@bluetech
Copy link
Member

Thanks @whot.

You asked in the commit whether to keep libxkbcommon_x11_internal. Only reason is that if someday we do want to test an internal function in libxkbcommon-x11 it will be possible. So just for consistency I'd keep it. I'll cp your first commit and do another release soon.

@whot
Copy link
Contributor

whot commented Feb 11, 2019

righty-o, works for me :) thanks for the cherry-pick

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

No branches or pull requests

3 participants