Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
IIFE commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2903615855 I think I may have figured it out. Go doesn't generate a LIB it seems. However, I think we can generate a DEF and LIB from the DLL itself. Putting something together to test. If it works I'll send a PR for consideration. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
lidavidm commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2902795887 What happens if you just go into `go/adbc/pkg` and `make`? That will directly invoke Go to build a DLL, and hopefully a LIB. If it doesn't generate a LIB, we may be out of luck (I believe Go has to do that) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
IIFE commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2902385049 **P.S:** I'm mainly familiar with Windows dev using Visual Studio, so cmake is a bit foreign to me :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
IIFE commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2902382549 @WillAyd I've managed to get a little bit further with Visual Studio 2022 by using this preset: ``` { "name": "debug-msvc2022", "displayName": "debug using msvc 2022", "generator": "Visual Studio 17 2022", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", "ADBC_BUILD_TESTS": "ON", "ADBC_DRIVER_FLIGHTSQL": "OFF", "ADBC_DRIVER_MANAGER": "ON", "ADBC_DRIVER_POSTGRESQL": "OFF", "ADBC_DRIVER_SNOWFLAKE": "OFF", "ADBC_DRIVER_SQLITE": "ON", "ADBC_BUILD_SHARED": "ON", "ADBC_USE_ASAN": "OFF", "ADBC_USE_UBSAN": "OFF", "CMAKE_C_FLAGS": "/wd4267 /wd4244 /wd5262 /wd4266 /wd5026 /wd4310 /wd4456 /wd5204 /EHsc", "CMAKE_CXX_FLAGS": "/wd4267 /wd4244 /wd5262 /wd4266 /wd5026 /wd4310 /wd4456 /wd5204 /EHsc", "CMAKE_TOOLCHAIN_FILE": "C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake" } ``` I can build the sqlite driver and run its tests successfully. However, if I turn `ADBC_DRIVER_FLIGHTSQL` ON, I get this link error: ``` C:\dev\arrow-adbc\c\out\build\debug-msvc2022\LINK : fatal error LNK1104: cannot open file 'adbc_driver_flightsql_shared-NOTFOUND.obj' ``` Feels like we're closer now but a bit confused with this latest error. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
WillAyd commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2902181285 Well looks like things are borked there too...I am not an expert in Windows symbol visibility but we _might_ need to ensure our configurations (both CMake and Meson) are handling that properly for this to work. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
IIFE commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2902035404 > Ugh...OK. Sorry that configuration is not well tested on Windows... > > For one more minor tweak, you can try changing this line: > > [arrow-adbc/c/driver_manager/meson.build](https://github.com/apache/arrow-adbc/blob/e08f4840fc69ba1d61ebdb2e53da64b3deb556a5/c/driver_manager/meson.build#L18) > > Line 18 in [e08f484](/apache/arrow-adbc/commit/e08f4840fc69ba1d61ebdb2e53da64b3deb556a5) > > dl_dep = dependency('dl') > to: > > if host_machine.system() != 'windows' > dl_dep = dependency('dl') > else > dl_dep = declare_dependency() > endif That resolved the `setup` command, but now the compile command is failing with not much info, seems the ninja generator is suddenly stopping: ``` ninja: Entering directory `C:/dev/arrow-adbc/c/builddir' [1/34] Compiling C object driver/common/adbc_driver_common.dll.p/utils.c.obj FAILED: driver/common/adbc_driver_common.dll.p/utils.c.obj "cl" "-Idriver/common\adbc_driver_common.dll.p" "-Idriver/common" "-I..\driver\common" "-I..\include" "-Isubprojects\arrow-nanoarrow-33d2c8b973d8f8f424e02ac92ddeaace2a92f8dd\src" "-I..\subprojects\arrow-nanoarrow-33d2c8b973d8f8f424e02ac92ddeaace2a92f8dd\src" "/MD" "/nologo" "/showIncludes" "/utf-8" "/W3" "/O2" "/Gw" "-Wno-int-conversion" "-Wno-unused-parameter" "-DNANOARROW_BUILD_DLL" "/Fddriver/common\adbc_driver_common.dll.p\utils.c.pdb" /Fodriver/common/adbc_driver_common.dll.p/utils.c.obj "/c" ../driver/common/utils.c cl : Command line error D8021 : invalid numeric argument '/Wno-int-conversion' [2/34] Compiling C++ object validation/libadbc_validation_util.a.p/.._subprojects_googletest-1.14.0_googlemock_src_gmock-all.cc.obj FAILED: validation/libadbc_validation_util.a.p/.._subprojects_googletest-1.14.0_googlemock_src_gmock-all.cc.obj "cl" "-Ivalidation\libadbc_validation_util.a.p" "-Ivalidation" "-I..\validation" "-I..\include" "-Idriver" "-I..\driver" "-Isubprojects\arrow-nanoarrow-33d2c8b973d8f8f424e02ac92ddeaace2a92f8dd\src" "-I..\subprojects\arrow-nanoarrow-33d2c8b973d8f8f424e02ac92ddeaace2a92f8dd\src" "-I..\subprojects\googletest-1.14.0\googletest\include" "-Isubprojects\googletest-1.14.0\googletest" "-I..\subprojects\googletest-1.14.0\googletest" "-I..\subprojects\googletest-1.14.0\googlemock\include" "-Isubprojects\googletest-1.14.0\googlemock" "-I..\subprojects\googletest-1.14.0\googlemock" "/MD" "/nologo" "/showIncludes" "/utf-8" "/Zc:__cplusplus" "/W3" "/EHsc" "/std:c++17" "/permissive-" "/O2" "/Gw" "-Wno-unused-parameter" "-Wno-reorder" "-DNANOARROW_BUILD_DLL" "/Fdvalidation\libadbc_validation_util.a.p\.._subprojects_googletest-1.14.0_googlemock_src_gmock-all.cc.pdb" /Fovalidation/libadbc_validation_util.a.p/.._subprojects_googletest-1.14.0_googlemock_src_gmock-all.cc.obj "/c" ../subprojects/googlet est-1.14.0/googlemock/src/gmock-all.cc cl : Command line error D8021 : invalid numeric argument '/Wno-unused-parameter' [3/34] Compiling C++ object driver_manager/adbc_driver_manager.dll.p/adbc_driver_manager.cc.obj FAILED: driver_manager/adbc_driver_manager.dll.p/adbc_driver_manager.cc.obj "cl" "-Idriver_manager\adbc_driver_manager.dll.p" "-Idriver_manager" "-I..\driver_manager" "-I..\include" "/MD" "/nologo" "/showIncludes" "/utf-8" "/Zc:__cplusplus" "/W3" "/EHsc" "/std:c++17" "/permissive-" "/O2" "/Gw" "-Wno-unused-parameter" "-Wno-reorder" "/Fddriver_manager\adbc_driver_manager.dll.p\adbc_driver_manager.cc.pdb" /Fodriver_manager/adbc_driver_manager.dll.p/adbc_driver_manager.cc.obj "/c" ../driver_manager/adbc_driver_manager.cc cl : Command line error D8021 : invalid numeric argument '/Wno-unused-parameter' [4/34] Compiling C++ object driver/framework/adbc_driver_framework.dll.p/objects.cc.obj FAILED: driver/framework/adbc_driver_framework.dll.p/objects.cc.obj "cl" "-Idriver/framework\adbc_driver_framework.dll.p" "-Idriver/framework" "-I..\driver\framework" "-I..\include" "-I." "-I.." "-Isubprojects\arrow-nanoarrow-33d2c8b973d8f8f424e02ac92ddeaace2a92f8dd\src" "-I..\subprojects\arrow-nanoarrow-33d2c8b973d8f8f424e02ac92ddeaace2a92f8dd\src" "-I..\subprojects\fmt-10.2.0\include" "/MD" "/nologo" "/showIncludes" "/utf-8" "/Zc:__cplusplus" "/W3" "/EHsc" "/std:c++17" "/permissive-" "/O2" "/Gw" "-Wno-unused-parameter" "-Wno-reorder" "-DFMT_SHARED" "-DNANOARROW_BUILD_DLL" "/Fddriver/framework\adbc_driver_framework.dll.p\objects.cc.pdb" /Fodriver/framework/adbc_driver_framework.dll.p/objects.cc.obj "/c" ../driver/framework/objects.cc cl : Command line error D8021 : invalid numeric argument '/Wno-unused-parameter' [5/34] Compiling C++ object driver/flightsql/adbc-driver-flightsql-test.exe.p/dremio_flightsql_test.cc.obj FAILED: driver/flightsql/adbc-driver-flightsql-test.exe.p/dremio_flightsql_test.cc.obj "cl" "-Idriver/flightsql\adbc-driver-flights
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
IIFE commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2901968940 @WillAyd @lidavidm This preset allows the Ninja build to complete, however, it only produces a `.dll` but no `.lib` for the import lib, which means I can't link my dll/exe against the binaries. Furthermore, I needed to suppress warnings as errors, as the build flags `dllexport` with this error example. This probably means the symbols from the generated DLLs are not exported for windows clients? `C:/dev/arrow-adbc/c/include/arrow-adbc/adbc.h:318:1: error: 'dllimport' attribute ignored [-Werror=attributes]` ``` { "name": "debug", "displayName": "debug flight sql", "generator": "Ninja", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", "CMAKE_EXPORT_COMPILE_COMMANDS": "ON", "ADBC_BUILD_TESTS": "OFF", "ADBC_DRIVER_FLIGHTSQL": "ON", "ADBC_DRIVER_MANAGER": "ON", "ADBC_DRIVER_POSTGRESQL": "OFF", "ADBC_DRIVER_SNOWFLAKE": "OFF", "ADBC_DRIVER_SQLITE": "OFF", "ADBC_USE_ASAN": "OFF", "ADBC_USE_UBSAN": "OFF", "ADBC_BUILD_STATIC": "OFF", "ADBC_BUILD_SHARED": "ON", "CMAKE_C_FLAGS": "-Wno-error=attributes", "CMAKE_CXX_FLAGS": "-Wno-error=attributes" } } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
WillAyd commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2901980467 Ugh...OK. Sorry that configuration is not well tested on Windows... For one more minor tweak, you can try changing this line: https://github.com/apache/arrow-adbc/blob/e08f4840fc69ba1d61ebdb2e53da64b3deb556a5/c/driver_manager/meson.build#L18 to: ```python if host_machine.system() != 'windows' dl_dep = dependency('dl') else dl_dep = declare_dependency() endif ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
IIFE commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2901974194 > That looks like a configuration issue, but not a compile time one. I see you have this in your log: > > ``` > Build Options: -Dflightsql=enabled -Dtests=disabled > ``` > > Can you make sure you are setting up the project with `-Dtests=enabled`? It's an unrelated bug to require tests to build flightsql, but setting that option for now should help you move forward Thanks. When I try to tests enabled, this error occurs: ``` driver_manager\meson.build:18:9: ERROR: Dependency "dl" not found, tried builtin and system ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
WillAyd commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2901972313 That looks like a configuration issue, but not a compile time one. I see you have this in your log: ``` Build Options: -Dflightsql=enabled -Dtests=disabled ``` Can you make sure you are setting up the project with `-Dtests=enabled`? It's an unrelated bug to require tests for this, but setting for now should help you move forward with trying this out -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
IIFE commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2901884813 > I don't have a windows machine to test this out on, but maybe the Meson configuration works here? It looks like that is generating the expected extension: > > [arrow-adbc/c/driver/flightsql/meson.build](https://github.com/apache/arrow-adbc/blob/e08f4840fc69ba1d61ebdb2e53da64b3deb556a5/c/driver/flightsql/meson.build#L21) > > Line 21 in [e08f484](/apache/arrow-adbc/commit/e08f4840fc69ba1d61ebdb2e53da64b3deb556a5) > > if build_machine.system() == 'windows' > To try locallly you would have to run this from the c directory: > > ``` > meson setup builddir -Dflightsql=enabled -Dtests=enabled > meson compile -C builddir > ``` Thanks @WillAyd . Tried that but unfortunately still no further ahead. This is the meson log generated: ``` Build started at 2025-05-22T17:34:42.731789 Main binary: C:\Users\\AppData\Local\Programs\Python\Python313\python.exe Build Options: -Dflightsql=enabled -Dtests=disabled Python system: Windows The Meson build system Version: 1.8.0 Source dir: C:\dev\arrow-adbc\c Build dir: C:\dev\arrow-adbc\c\builddir Build type: native build Project name: arrow-adbc Project version: 1.7.0-SNAPSHOT --- Detecting compiler via: `icl ""` -> [WinError 2] The system cannot find the file specified --- Detecting compiler via: `cl /?` -> 0 stdout: C/C++ COMPILER OPTIONS -OPTIMIZATION- /O1 maximum optimizations (favor space) /O2 maximum optimizations (favor speed) /Ob inline expansion (default n=0) /Od disable optimizations (default) /Og enable global optimization /Oi[-] enable intrinsic functions /Os favor code space/Ot favor code speed /Ox optimizations (favor speed) /Oy[-] enable frame pointer omission /favor: select processor to optimize for, one of: blend - a combination of optimizations for several different x86 processors ATOM - Intel(R) Atom(TM) processors -CODE GENERATION- /Gu[-] ensure distinct functions have distinct addresses /Gw[-] separate global variables for linker /GF enable read-only string pooling /Gy[-] separate functions for linker /GS[-] enable security checks /GR[-] enable C++ RTTI /guard:cf[-] enable CFG (control flow guard) /guard:ehcont[-] enable EH continuation metadata (CET) /EHs enable C++ EH (no SEH exceptions) /EHa enable C++ EH (w/ SEH exceptions) /EHc extern "C" defaults to nothrow /EHr always generate noexcept runtime termination checks /fp: choose floating-point model: contract - consider floating-point contractions when generating code except[-] - consider floating-point exceptions when generating code fast - "fast" floating-point model; results are less predictable precise - "precise" floating-point model; results are predictable strict - "strict" floating-point model (implies /fp:except) /Qfast_transcendentals generate inline FP intrinsics even with /fp:except /Qspectre[-] enable mitigations for CVE 2017-5753 /Qpar[-] enable parallel code generation /Qpar-report:1 auto-parallelizer diagnostic; indicate parallelized loops /Qpar-report:2 auto-parallelizer diagnostic; indicate loops not parallelized /Qvec-report:1 auto-vectorizer diagnostic; indicate vectorized loops /Qvec-report:2 auto-vectorizer diagnostic; indicate loops not vectorized /GL[-] enable link-time code generation /volatile: choose volatile model: iso - Acquire/release semantics not guaranteed on volatile accesses ms - Acquire/release semantics guaranteed on volatile accesses /GA optimize for Windows Application/Ge force stack checking for all funcs /Gs[num] control stack checking calls /Gh enable _penter function call /GH enable _pexit function call /GT generate fiber-safe TLS accesses /RTC1 Enable fast checks (/RTCsu) /RTCc Convert to smaller type checks /RTCs Stack Frame runtime checking /RTCu Uninitialized local usage checks /clr[:option] compile for common language runtime, where option is: pure : produce IL-only output file (no native executable code) safe : produce IL-only verifiable output file netcore : produce assemblies targeting .NET Core runtime noAssembly : do not produce an assembly nostdlib : ignore the system .NET framework directory when searching for assemblies nostdimport : do not import any required assemblies implicitly initialAppDomain : enable initial AppDomain behavior of Visual C++ 2002 implicitKeepAlive- : turn off implicit emission of System::GC::KeepAlive(this) /fsanitize=address Enable address sanitizer codegen /Gd __cdecl calling convention /Gr
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
WillAyd commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2901174457 I don't have a windows machine to test this out on, but maybe the Meson configuration works here? It looks like that is generating the expected extension: https://github.com/apache/arrow-adbc/blob/e08f4840fc69ba1d61ebdb2e53da64b3deb556a5/c/driver/flightsql/meson.build#L21 To try locallly you would have to run this from the c directory: ``` meson setup builddir -Dflightsql=enabled -Dtests=enabled meson compile -C builddir ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
lidavidm commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2901152820 You're likely running into something like https://github.com/apache/arrow-adbc/issues/634#issuecomment-1589876749 I haven't managed to figure this out myself (it doesn't help that Microsoft no longer provides developer VMs) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Building ADBC and flightsql driver on Windows [arrow-adbc]
WillAyd commented on issue #2846: URL: https://github.com/apache/arrow-adbc/issues/2846#issuecomment-2901089026 Hmm that's strange - can you share the error message the linker is providing? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org