Skip to content

Commit 871f45c

Browse files
committed
task: updated build and removed submodules
Now that we depend on libmohair-substrait, we no longer need the protocol repos as submodules to generate protobuf sources from
1 parent 669cc47 commit 871f45c

File tree

4 files changed

+63
-88
lines changed

4 files changed

+63
-88
lines changed

.gitmodules

-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
[submodule "submodules/substrait-proto"]
2-
path = submodules/substrait-proto
3-
url = https://github.com/drin/substrait.git
4-
[submodule "submodules/mohair-proto"]
5-
path = submodules/mohair-proto
6-
url = https://github.com/drin/mohair-protocol.git
7-
branch = feat-skytether-engine

meson.build

+63-79
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ cpp_proto_substrait = cpp_srcdir / 'query' / 'substrait'
2323
cpp_proto_mohair = cpp_srcdir / 'query' / 'mohair'
2424

2525
# dir for adapters (execution engines)
26-
cpp_enginedir = cpp_srcdir / 'engines'
26+
cpp_enginedir = cpp_srcdir / 'engines'
2727

2828
# dir for flight services
2929
cpp_servicedir = cpp_srcdir / 'services'
3030

3131
# dir for binary sources (1-1 with binaries)
32-
cpp_tooldir = cpp_srcdir / 'toolbox'
32+
cpp_tooldir = cpp_srcdir / 'toolbox'
3333

3434

3535
# ------------------------------
@@ -38,7 +38,6 @@ cpp_tooldir = cpp_srcdir / 'toolbox'
3838
# use pkg-config to generate library build info
3939
module_pkgcfg = import('pkgconfig')
4040

41-
4241
# >> Determine the system we're building on
4342
buildsys_type = 'unknown'
4443

@@ -68,17 +67,15 @@ endif
6867
# ------------------------------
6968
# Library dependencies
7069

70+
default_includedir = get_option('prefix') / get_option('includedir')
71+
7172
# >> System-dependent dependencies
7273

7374
# Include directory for arrow headers
74-
arrow_incdir = ''
75+
arrow_incdir = default_includedir
7576

76-
# NOTE: with brew installed dependencies, macosx can resolve like archlinux
77-
# otherwise, macosx deps might need "manual" resolution (specific paths)
78-
if buildsys_type == 'macosx'
79-
arrow_incdir = '/opt/homebrew/include'
80-
elif buildsys_type == 'archlinux'
81-
endif
77+
# Include directory for substrait and mohair headers
78+
protocol_incdir = default_includedir / 'mohair-substrait'
8279

8380

8481
# >> Required dependencies
@@ -89,14 +86,23 @@ dep_acero = dependency('arrow-substrait') # this is Acero + substrait
8986
dep_flight = dependency('arrow-flight')
9087

9188
# |> Protobuf (for substrait)
89+
dep_mohairsubstrait = dependency('mohair-substrait', static: true)
90+
9291
dep_proto = dependency('protobuf')
92+
dep_absl = dependency('absl'
93+
,modules: [
94+
'absl::log_internal_check_op'
95+
,'absl::status'
96+
]
97+
)
9398

9499

95100
# >> Optional dependencies
96101
# |> Faodel
97102
dep_ompi = dependency('ompi-cxx', required: get_option('mpi'))
98103
dep_faodel = dependency('faodel' , required: get_option('faodel'))
99104
dep_tiledb = dependency('tiledb' , required: get_option('tiledb'))
105+
100106
dep_duckdb = dependency('duckdb'
101107
,method: 'cmake'
102108
,required: get_option('duckdb')
@@ -129,8 +135,9 @@ mohair_cfgfile = configure_file(
129135

130136

131137
# >> Grouped dependencies
132-
dep_service = [dep_arrow, dep_acero, dep_flight, dep_ompi, dep_faodel, dep_proto]
133-
dep_query = [dep_arrow, dep_acero, dep_proto]
138+
dep_query = [dep_arrow, dep_acero, dep_absl, dep_proto]
139+
# dep_query = [dep_arrow, dep_acero, dep_mohairsubstrait]
140+
dep_service = dep_query + [dep_flight]
134141

135142
# |> add optional dependencies
136143
if dep_faodel.found()
@@ -154,19 +161,19 @@ endif
154161
# Composable lists of headers
155162

156163
# >> For substrait definitions
157-
substrait_hdrlist = [
158-
cpp_proto_mohair / 'algebra.pb.h'
159-
,cpp_proto_mohair / 'topology.pb.h'
160-
,cpp_proto_substrait / 'type.pb.h'
161-
,cpp_proto_substrait / 'function.pb.h'
162-
,cpp_proto_substrait / 'plan.pb.h'
163-
,cpp_proto_substrait / 'algebra.pb.h'
164-
,cpp_proto_substrait / 'capabilities.pb.h'
165-
,cpp_proto_substrait / 'parameterized_types.pb.h'
166-
,cpp_proto_substrait / 'type_expressions.pb.h'
167-
,cpp_proto_substrait / 'extended_expression.pb.h'
168-
,cpp_proto_substrait / 'extensions' / 'extensions.pb.h'
169-
]
164+
# substrait_hdrlist = [
165+
# cpp_proto_mohair / 'algebra.pb.h'
166+
# ,cpp_proto_mohair / 'topology.pb.h'
167+
# ,cpp_proto_substrait / 'type.pb.h'
168+
# ,cpp_proto_substrait / 'function.pb.h'
169+
# ,cpp_proto_substrait / 'plan.pb.h'
170+
# ,cpp_proto_substrait / 'algebra.pb.h'
171+
# ,cpp_proto_substrait / 'capabilities.pb.h'
172+
# ,cpp_proto_substrait / 'parameterized_types.pb.h'
173+
# ,cpp_proto_substrait / 'type_expressions.pb.h'
174+
# ,cpp_proto_substrait / 'extended_expression.pb.h'
175+
# ,cpp_proto_substrait / 'extensions' / 'extensions.pb.h'
176+
# ]
170177

171178
# >> For decomposable queries
172179
query_hdrlist = [
@@ -209,19 +216,19 @@ services_hdrlist = [
209216
# Composable lists of sources
210217

211218
# >> For substrait implementations
212-
substrait_srclist = [
213-
cpp_proto_mohair / 'algebra.pb.cc'
214-
,cpp_proto_mohair / 'topology.pb.cc'
215-
,cpp_proto_substrait / 'algebra.pb.cc'
216-
,cpp_proto_substrait / 'extensions' / 'extensions.pb.cc'
217-
,cpp_proto_substrait / 'type.pb.cc'
218-
,cpp_proto_substrait / 'function.pb.cc'
219-
,cpp_proto_substrait / 'type_expressions.pb.cc'
220-
,cpp_proto_substrait / 'parameterized_types.pb.cc'
221-
,cpp_proto_substrait / 'extended_expression.pb.cc'
222-
,cpp_proto_substrait / 'capabilities.pb.cc'
223-
,cpp_proto_substrait / 'plan.pb.cc'
224-
]
219+
# substrait_srclist = [
220+
# cpp_proto_mohair / 'algebra.pb.cc'
221+
# ,cpp_proto_mohair / 'topology.pb.cc'
222+
# ,cpp_proto_substrait / 'algebra.pb.cc'
223+
# ,cpp_proto_substrait / 'extensions' / 'extensions.pb.cc'
224+
# ,cpp_proto_substrait / 'type.pb.cc'
225+
# ,cpp_proto_substrait / 'function.pb.cc'
226+
# ,cpp_proto_substrait / 'type_expressions.pb.cc'
227+
# ,cpp_proto_substrait / 'parameterized_types.pb.cc'
228+
# ,cpp_proto_substrait / 'extended_expression.pb.cc'
229+
# ,cpp_proto_substrait / 'capabilities.pb.cc'
230+
# ,cpp_proto_substrait / 'plan.pb.cc'
231+
# ]
225232

226233
# >> For decomposable queries
227234
query_srclist = [
@@ -244,19 +251,22 @@ services_srclist = [
244251
# Composed header and source lists (organized by library/binary)
245252

246253
# >> Library for mohair query processing
247-
libmohair_srclist = (substrait_srclist + query_srclist)
254+
# libmohair_srclist = (substrait_srclist + query_srclist)
255+
libmohair_srclist = query_srclist
248256

249257
# >> Binary for mohair flight services
250-
mohair_srv_srclist = (substrait_srclist + query_srclist + services_srclist)
258+
# mohair_srv_srclist = (substrait_srclist + query_srclist + services_srclist)
259+
mohair_srv_srclist = (query_srclist + services_srclist)
251260

252261

253262
# ------------------------------
254263
# Library definitions
255264

256265
libmohair = library('mohair'
257266
,libmohair_srclist
258-
,dependencies : dep_query
259-
,include_directories: arrow_incdir
267+
,dependencies : [dep_service, dep_mohairsubstrait]
268+
,include_directories: [protocol_incdir]
269+
# ,link_with : dep_mohairsubstrait
260270
,install : true
261271
)
262272

@@ -267,8 +277,8 @@ module_pkgcfg.generate(libmohair)
267277

268278
install_headers(query_hdrlist, subdir: 'mohair')
269279
libmohair_dep = declare_dependency(
270-
include_directories: arrow_incdir
271-
,dependencies : [dep_arrow, dep_duckdb]
280+
include_directories: [protocol_incdir]
281+
,dependencies : dep_service
272282
,link_with : libmohair
273283
)
274284

@@ -285,16 +295,13 @@ bin_readarrow_srclist = [
285295
]
286296

287297
if dep_duckdb.found()
288-
message('Adding duckdb source to read-arrow source list')
289298
bin_readarrow_srclist += [cpp_enginedir / 'duckdb.cpp']
290-
291-
message(bin_readarrow_srclist)
292299
endif
293300

294301
bin_readarrow = executable('read-arrow'
295302
,bin_readarrow_srclist
296303
,dependencies : [dep_arrow, dep_duckdb]
297-
,include_directories: arrow_incdir
304+
,include_directories: [protocol_incdir]
298305
,install : false
299306
)
300307

@@ -307,7 +314,7 @@ bin_mohairquery_srclist = (
307314
bin_mohairquery = executable('mohair'
308315
,bin_mohairquery_srclist
309316
,dependencies : [dep_query, dep_duckdb]
310-
,include_directories: arrow_incdir
317+
,include_directories: [protocol_incdir]
311318
,install : true
312319
)
313320

@@ -321,8 +328,9 @@ bin_mohairclient_srclist = (
321328
)
322329
bin_mohairclient = executable('mohair-client'
323330
,bin_mohairclient_srclist
324-
,dependencies : dep_service
325-
,include_directories: arrow_incdir
331+
,include_directories: [protocol_incdir]
332+
,dependencies : [dep_service, dep_mohairsubstrait]
333+
# ,link_with : dep_mohairsubstrait
326334
,install : false
327335
)
328336

@@ -340,8 +348,9 @@ csd_srv_srclist = (
340348

341349
bin_srv_csd = executable('csd-service'
342350
,csd_srv_srclist
343-
,dependencies : dep_service
344-
,include_directories: arrow_incdir
351+
,include_directories: [protocol_incdir]
352+
,dependencies : [dep_service, dep_mohairsubstrait]
353+
# ,link_with : dep_mohairsubstrait
345354
,install : false
346355
)
347356

@@ -358,32 +367,7 @@ topo_srv_srclist = (
358367
bin_srv_topo = executable('topo-service'
359368
,topo_srv_srclist
360369
,dependencies : dep_service
361-
,include_directories: arrow_incdir
370+
,include_directories: [protocol_incdir]
362371
,install : false
363372
)
364373

365-
366-
# ------------------------------
367-
# Feature-based executables
368-
369-
# >> Faodel mohair service
370-
if dep_faodel.found()
371-
372-
# main source file and faodel-specific source files
373-
faodel_srv_srclist = (
374-
[
375-
cpp_tooldir / 'faodel-service.cpp'
376-
,cpp_enginedir / 'faodel.cpp'
377-
,cpp_servicedir / 'service_faodel.cpp'
378-
]
379-
+ mohair_srv_srclist
380-
)
381-
382-
bin_srv_faodel = executable('faodel-service'
383-
,faodel_srv_srclist
384-
,dependencies : dep_service
385-
,include_directories: arrow_incdir
386-
,install : false
387-
)
388-
389-
endif

submodules/mohair-proto

-1
This file was deleted.

submodules/substrait-proto

-1
This file was deleted.

0 commit comments

Comments
 (0)