What happened?
The C# driver manager derives an entrypoint of AdbcDriver{PascalCase}Init from the driver library filename, but performs only that single symbol lookup. If the driver does not export that exact name, loading fails with EntryPointNotFoundException even though the driver exports the standard AdbcDriverInit.
Compare this to the C/C++ driver manager which tries the derived name and then falls back to AdbcDriverInit (c/driver_manager/adbc_driver_manager.cc):
static const char kDefaultEntrypoint[] = "AdbcDriverInit";
...
status = library.Lookup(name.c_str(), &load_handle, error);
if (status != ADBC_STATUS_OK) {
status = library.Lookup(kDefaultEntrypoint, &load_handle, error);
}
C# has no equivalent fallback, so drivers that load fine from Go/Python/R fail from C#:
// Manifest declares no entrypoint; C# derives "AdbcDriverClickhouseInit"
using var driver = AdbcDriverManager.FindLoadDriver(
"clickhouse", loadOptions: AdbcLoadFlags.Default);
// System.EntryPointNotFoundException: Unable to find an entry point named
// 'AdbcDriverClickhouseInit' in shared library.
nm -gU libadbc_driver_clickhouse.dylib | grep -iE 'init$' shows the derived name is
absent but the standard one is present:
_AdbcClickhouseInit
_AdbcDriverInit
You can work around this by passing entrypoint: "AdbcDriverInit" in the client code.
This problem affects the ClickHouse, Exasol, MySQL, and SingleStore drivers. We opened PRs to solve this in the drivers, but we should solve it here too.
Stack Trace
No response
How can we reproduce the bug?
No response
Environment/Setup
No response
What happened?
The C# driver manager derives an entrypoint of
AdbcDriver{PascalCase}Initfrom the driver library filename, but performs only that single symbol lookup. If the driver does not export that exact name, loading fails withEntryPointNotFoundExceptioneven though the driver exports the standardAdbcDriverInit.Compare this to the C/C++ driver manager which tries the derived name and then falls back to
AdbcDriverInit(c/driver_manager/adbc_driver_manager.cc):C# has no equivalent fallback, so drivers that load fine from Go/Python/R fail from C#:
nm -gU libadbc_driver_clickhouse.dylib | grep -iE 'init$'shows the derived name isabsent but the standard one is present:
You can work around this by passing
entrypoint: "AdbcDriverInit"in the client code.This problem affects the ClickHouse, Exasol, MySQL, and SingleStore drivers. We opened PRs to solve this in the drivers, but we should solve it here too.
Stack Trace
No response
How can we reproduce the bug?
No response
Environment/Setup
No response