Skip to content

Commit 3c460f7

Browse files
authored
GH-47283: [C++] Fix flight visibility issue in Meson configuration (#47298)
### Rationale for this change The meson configuration is missing some symbols for flight that appear to come from the testing library. ### What changes are included in this PR? Updates to the Meson configuration ### Are these changes tested? Yes ### Are there any user-facing changes? No * GitHub Issue: #47283 Authored-by: Will Ayd <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent db1a8a9 commit 3c460f7

File tree

6 files changed

+71
-22
lines changed

6 files changed

+71
-22
lines changed

cpp/src/arrow/flight/meson.build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ if needs_testing
135135
'test_util.cc',
136136
],
137137
dependencies: [arrow_test_dep, arrow_flight_dep, thread_dep],
138+
gnu_symbol_visibility: 'hidden',
138139
)
139140

140141
arrow_flight_test_dep = declare_dependency(
@@ -194,12 +195,12 @@ if needs_benchmarks
194195
executable(
195196
'arrow-flight-perf-server',
196197
sources: ['perf_server.cc'] + flight_proto_files,
197-
dependencies: flight_test_dep_no_main,
198+
dependencies: [flight_test_dep_no_main, arrow_testing_dep],
198199
)
199200

200201
executable(
201202
'arrow-flight-benchmark',
202203
sources: ['flight_benchmark.cc'] + flight_proto_files,
203-
dependencies: flight_test_dep_no_main,
204+
dependencies: [flight_test_dep_no_main, arrow_testing_dep],
204205
)
205206
endif

cpp/src/arrow/integration/meson.build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ install_headers(['json_integration.h'])
2020
exc = executable(
2121
'arrow-json-integration-test',
2222
sources: ['json_integration_test.cc'],
23-
dependencies: [arrow_dep, rapidjson_dep, gflags_dep, gtest_dep],
24-
link_with: [arrow_test_lib],
23+
dependencies: [arrow_test_dep_no_main, rapidjson_dep, gflags_dep],
2524
)
2625

2726
if needs_tests

cpp/src/arrow/meson.build

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -569,20 +569,36 @@ else
569569
gmock_dep = disabler()
570570
endif
571571

572-
arrow_test_lib = static_library(
573-
'arrow_testing',
574-
sources: arrow_testing_srcs,
575-
dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_main_dep],
576-
)
572+
if needs_testing
573+
arrow_testing_lib = static_library(
574+
'arrow_testing',
575+
sources: arrow_testing_srcs,
576+
dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_dep],
577+
)
578+
579+
arrow_testing_dep = declare_dependency(link_with: [arrow_testing_lib])
580+
else
581+
arrow_testing_dep = disabler()
582+
endif
577583

578584
if needs_tests
579585
arrow_test_dep = declare_dependency(
580-
link_with: [arrow_test_lib],
581-
dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_main_dep],
586+
dependencies: [
587+
arrow_dep,
588+
arrow_testing_dep,
589+
filesystem_dep,
590+
gmock_dep,
591+
gtest_main_dep,
592+
],
582593
)
583594
arrow_test_dep_no_main = declare_dependency(
584-
link_with: [arrow_test_lib],
585-
dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_dep],
595+
dependencies: [
596+
arrow_dep,
597+
arrow_testing_dep,
598+
filesystem_dep,
599+
gmock_dep,
600+
gtest_dep,
601+
],
586602
)
587603
else
588604
arrow_test_dep = disabler()
@@ -655,8 +671,12 @@ if needs_benchmarks
655671
)
656672

657673
arrow_benchmark_dep = declare_dependency(
658-
link_with: [arrow_test_lib],
659-
dependencies: [arrow_dep, benchmark_main_dep, gtest_dep],
674+
dependencies: [
675+
arrow_dep,
676+
arrow_testing_dep,
677+
benchmark_main_dep,
678+
gtest_dep,
679+
],
660680
)
661681
else
662682
arrow_benchmark_dep = disabler()

cpp/src/arrow/util/meson.build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ endif
236236
exc = executable(
237237
'arrow-utility-test',
238238
sources: utility_test_srcs,
239-
dependencies: [arrow_dep, filesystem_dep, gtest_dep, gmock_dep],
240-
link_with: [arrow_test_lib],
239+
dependencies: arrow_test_dep_no_main,
241240
implicit_include_directories: false,
242241
)
243242
test('arrow-utility-test', exc)

cpp/subprojects/google-benchmark.wrap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ directory = benchmark-1.8.4
2020
source_url = https://github.com/google/benchmark/archive/refs/tags/v1.8.4.tar.gz
2121
source_filename = benchmark-1.8.4.tar.gz
2222
source_hash = 3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45
23-
patch_filename = google-benchmark_1.8.4-1_patch.zip
24-
patch_url = https://wrapdb.mesonbuild.com/v2/google-benchmark_1.8.4-1/get_patch
25-
patch_hash = 77cdae534fe12b6783c1267de3673d3462b229054519034710d581b419e73cca
26-
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/google-benchmark_1.8.4-1/benchmark-1.8.4.tar.gz
27-
wrapdb_version = 1.8.4-1
23+
patch_filename = google-benchmark_1.8.4-3_patch.zip
24+
patch_url = https://wrapdb.mesonbuild.com/v2/google-benchmark_1.8.4-3/get_patch
25+
patch_hash = 657aee778629725cf9104bbfc32dba0c9c6825d5202e600ad81c7251ae684468
26+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/google-benchmark_1.8.4-3/benchmark-1.8.4.tar.gz
27+
wrapdb_version = 1.8.4-3
2828

2929
[provide]
3030
benchmark = google_benchmark_dep

cpp/subprojects/re2.wrap

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
[wrap-file]
19+
directory = re2-2023-03-01
20+
source_url = https://github.com/google/re2/archive/2023-03-01.tar.gz
21+
source_filename = re2-2023-03-01.tar.gz
22+
source_hash = 7a9a4824958586980926a300b4717202485c4b4115ac031822e29aa4ef207e48
23+
patch_filename = re2_20230301-3_patch.zip
24+
patch_url = https://wrapdb.mesonbuild.com/v2/re2_20230301-3/get_patch
25+
patch_hash = 9d5036080272a886fee0dec9ea415129ae57ee6bad4b56991b29ed355c0d97e3
26+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/re2_20230301-3/re2-2023-03-01.tar.gz
27+
wrapdb_version = 20230301-3
28+
29+
[provide]
30+
re2 = re2_dep

0 commit comments

Comments
 (0)