Duplicate symbols when statically linking avro and spatial #557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At MotherDuck, we build and statically link DuckDB extensions on our server. Since Iceberg has a dependency on Avro, we also have to like the Avro extension on the server. Unfortunately, this leads to a conflict for duplicate symbols, namely
json_object_get
when linking both duckdb-spatial and duckdb-avro.This issue stems from the inclusion of the
jansson
library in avro and thegdal
library in spatial.Both libraries define a
jsob_object_get
function (see https://github.com/akheron/jansson/blob/96d160df90016066d04d493d1d69639474ba4f20/src/jansson.h#L189 and https://github.com/OSGeo/gdal/blob/9c6652c257799b88ca83302c3368545aba869c65/ogr/ogrsf_frmts/geojson/libjson/json_object.h#L348).This PR patches the
json_object_get
function ingdal
by renaming it togdal__json_object_get
.