Commit 06425999 authored by Carlos Garnacho's avatar Carlos Garnacho

build: Do not link libtracker-data.so to libtracker-sparql.so

Even though libtracker-data uses types from libtracker-sparql, this
is the wrong way around. However, doing the right thing here still
breaks because meson is playing smart here and passes --no-undefined
for every shared library by default, so build breaks with obviously
undefined symbols.

Correct the dependency tree to be exactly how it was with autotools,
and override b_lundef when building libtracker-data to leave the
borrowed symbols undefined. The gaps will be filled in because
everyone must link with libtracker-sparql.

Closes: #44
parent f05b8da5
......@@ -9,7 +9,8 @@ libtracker_data_vala = static_library('tracker-sparql-query',
'tracker-sparql-scanner.vala',
'tracker-turtle-reader.vala',
'../libtracker-common/libtracker-common.vapi',
'../libtracker-data/libtracker-data.vapi',
'libtracker-data.vapi',
tracker_sparql_vapi,
tracker_common_enum_header,
c_args: tracker_c_args,
vala_args: [
......@@ -21,7 +22,7 @@ libtracker_data_vala = static_library('tracker-sparql-query',
],
# This doesn't depend on tracker_common_dep because of
# https://github.com/mesonbuild/meson/issues/671
dependencies: [glib, gio, tracker_sparql_intermediate_dep],
dependencies: [glib, gio],
include_directories: [commoninc, configinc, srcinc],
)
......@@ -32,7 +33,7 @@ tracker_data_enums = gnome.mkenums('tracker-data-enum-types',
)
tracker_data_dependencies = [
tracker_sparql_intermediate_dep, gvdb_dep, sqlite, uuid,
tracker_common_dep, gvdb_dep, sqlite, uuid,
]
if get_option('fts')
......@@ -68,6 +69,10 @@ libtracker_data = library('tracker-data',
# This doesn't depend on tracker_common_dep because of
# https://github.com/mesonbuild/meson/issues/671
link_with: [libtracker_data_vala],
# We do *not* want --no-undefined here, this library uses
# symbols from libtracker-sparql, but does not mean it should
# be linked to it.
override_options: ['b_lundef=false'],
dependencies: tracker_data_dependencies + [unicode_library],
include_directories: [commoninc, configinc, srcinc],
)
......
......@@ -11,7 +11,7 @@ libtracker_fts = static_library('tracker-fts',
'tracker-fts-config.c',
'tracker-fts-tokenizer.c',
libtracker_fts_fts5,
dependencies: [tracker_common_dep, tracker_sparql_intermediate_dep],
dependencies: [tracker_common_dep],
c_args: tracker_c_args
)
......
......@@ -98,7 +98,7 @@ install_headers(
subdir: 'tracker-@0@/libtracker-sparql'.format(tracker_api_version))
# FIXME: we can't depend properly on the generated .vapi to do this.
custom_target('tracker-sparql-' + tracker_api_version + '.vapi',
tracker_sparql_vapi = custom_target('tracker-sparql-' + tracker_api_version + '.vapi',
#input: 'tracker-sparql-intermediate-vala.vapi',
output: 'tracker-sparql-' + tracker_api_version + '.vapi',
command: [
......
......@@ -26,8 +26,7 @@ tracker_store = executable('tracker-store',
],
vala_args: [ '--pkg', 'posix' ],
dependencies: [
tracker_common_dep, tracker_data_dep, tracker_sparql_direct_dep,
gio_unix
tracker_common_dep, tracker_sparql_dep, tracker_data_dep, tracker_sparql_direct_dep, gio_unix
],
install: true,
install_dir: join_paths(get_option('prefix'), get_option('libexecdir')),
......
......@@ -14,7 +14,7 @@ libtracker_data_slow_tests = [
libtracker_data_test_environment = environment()
libtracker_data_test_environment.set('TRACKER_LANGUAGE_STOP_WORDS_DIR', '@0@/src/libtracker-common/stop-words'.format(source_root))
libtracker_data_test_deps = [tracker_common_dep, tracker_data_dep]
libtracker_data_test_deps = [tracker_common_dep, tracker_data_dep, tracker_sparql_dep]
foreach base_name: libtracker_data_tests
source = 'tracker-@0@-test.c'.format(base_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment