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

Meson build doesn't install static library #135

Open
russel opened this issue May 16, 2018 · 5 comments
Open

Meson build doesn't install static library #135

russel opened this issue May 16, 2018 · 5 comments

Comments

@russel
Copy link
Contributor

russel commented May 16, 2018

The Meson build for D-YAML installs the static library for tinyendian and the dynamic library for dyaml. Should the static library for tinyendian and static library for dyaml also be installed?

@ximion
Copy link
Member

ximion commented May 16, 2018

@russel This is only due to the tinyendian Meson file explicitly stating that it wants a static library, hence a static library gets built and installed.
Usually, you can toggle whether Meson builds shared libraries, static libraries or both by passing --default-library to it (with shared libs being the default).
So, what actually should be done here is make tinyendian not enforce a static library build (it's a pretty trivial patch, I might submit that later today).

@russel
Copy link
Contributor Author

russel commented May 17, 2018

@ximion I had sort of assumed that an installation (at least on Linux) should always install both static and dynamic libraries. This is what I have done for DInotify and Unit-Threaded.

@ximion
Copy link
Member

ximion commented May 17, 2018

@russel No, the default is always to only install the shared libraries, at least on Linux distributions. In some rare cases, if it's considered useful to have, static libraries are installed as well, but that usually is the exception (unless of course the language does not support shared libraries ^^).

@russel
Copy link
Contributor Author

russel commented May 17, 2018

Sounds like I should update the DInotify and Unit-Threaded builds then, so as to only produce the shared libraries.

@ximion
Copy link
Member

ximion commented May 17, 2018

@russel That would only be necessary to conserve build time, I guess. Although on Linux, distributors would in any case make sure that their own packages only use the shared library version.
I think what Meson does is the absolute best option to handle shared libraries: Making shared libs by default, but giving the user an option to easily toggle to using static libraries or both.

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

2 participants