apache / arrow-adbc

Database connectivity API standard and libraries for Apache Arrow
https://arrow.apache.org/adbc/
Apache License 2.0
360 stars 86 forks source link

ci: can't build golang-based drivers on Windows #634

Open lidavidm opened 1 year ago

lidavidm commented 1 year ago
        Deleting file "adbc_driver_manager_shared.dir\Debug\adbc_dri.CFCD3DC9.tlog\unsuccessfulbuild".
         Touching "adbc_driver_manager_shared.dir\Debug\adbc_dri.CFCD3DC9.tlog\adbc_driver_manager_shared.lastbuildstate".
    11>Done Building Project "D:\a\arrow-adbc\arrow-adbc\build\driver_manager\adbc_driver_manager_shared.vcxproj" (default targets).
     6>LINK : fatal error LNK1104: cannot open file 'adbc_driver_flightsql_shared-NOTFOUND.obj' [D:\a\arrow-adbc\arrow-adbc\build\driver\flightsql\adbc-driver-flightsql-test.vcxproj]
     6>Done Building Project "D:\a\arrow-adbc\arrow-adbc\build\driver\flightsql\adbc-driver-flightsql-test.vcxproj" (default targets) -- FAILED.
lidavidm commented 1 year ago

Also because

  Building Go Static lib adbc_driver_flightsql
  # runtime/cgo
  Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32217.1 for x64
  Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line error D8021: invalid numeric argument '/Werror' [C:\Users\User\arrow-adbc\build\driver\flig
htsql\adbc_driver_flightsql_static_target.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets
(247,5): error MSB8066: Custom build for 'C:\Users\User\arrow-adbc\build\CMakeFiles\7756ba06561194be52670233c
766fa3d\adbc_driver_flightsql.lib.rule;C:\Users\User\arrow-adbc\build\CMakeFiles\45e89061b0894b49826f891e2ae3
8eeb\adbc_driver_flightsql_static_target.rule' exited with code 2. [C:\Users\User\arrow-adbc\build\driver\fli
ghtsql\adbc_driver_flightsql_static_target.vcxproj]
lidavidm commented 1 year ago

So first we need the conda package m2w64-gcc to get gcc/g++ available, and we have to force go to use it (over msvc which we want to use for everything else). But then tests don't link because we build a DLL, but the Visual Studio build system expects to link with a .obj file.

lidavidm commented 1 year ago

I don't see how to create an importlib, either; I wonder if what we're doing is even possible on Windows.

lidavidm commented 1 year ago

I think we'll have to punt on this until there's demand.

lidavidm commented 1 year ago

Hmm, if we set CC and CXX for the Go command only...and it appears a .lib does get built...