Skip to content

Duplicate symbols when statically linking avro and spatial #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NiclasHaderer
Copy link

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 the gdal 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 in gdal by renaming it to gdal__json_object_get.

@Maxxen
Copy link
Member

Maxxen commented May 1, 2025

Thanks for the PR! Dont worry about failing CI, I need to apply patches from DuckDB main, but I can take it from here!

@NiclasHaderer
Copy link
Author

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants