Skip to content

Commit

Permalink
meson: fix libcommon being publicly exposed as a static link dependency
Browse files Browse the repository at this point in the history
libcommon isn't even installed, so that means libalpm.a (if installed)
is fatally broken as it misses objects. The problem is that meson
doesn't handle this case correctly:

mesonbuild/meson#3934
mesonbuild/meson#3937
mesonbuild/meson#3939

Work around this by manually extracting libcommon's .o files into the
list of objects used to create libalpm.
  • Loading branch information
eli-schwartz committed Sep 19, 2019
1 parent 9b90c55 commit 7e70ff1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meson.build
Expand Up @@ -317,9 +317,10 @@ libcommon = static_library(
libalpm_a = static_library(
'alpm',
libalpm_sources,
# https://github.com/mesonbuild/meson/issues/3937
objects : libcommon.extract_all_objects(),
include_directories : includes,
dependencies : [crypto_provider, libarchive, libcurl, gpgme],
link_with : [libcommon],
install : true)

if get_option('default_library') != 'static'
Expand All @@ -336,7 +337,6 @@ install_headers(
'lib/libalpm/alpm.h',
'lib/libalpm/alpm_list.h')

# TODO: libs.private seem quite wrong here
pkgconfig = import('pkgconfig')
pkgconfig.generate(
libalpm,
Expand Down

0 comments on commit 7e70ff1

Please sign in to comment.