Skip to content
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

[nanodbc] build failure x64-windows #12248

Closed
DimRochette opened this issue Jul 3, 2020 · 6 comments · Fixed by #12274
Closed

[nanodbc] build failure x64-windows #12248

DimRochette opened this issue Jul 3, 2020 · 6 comments · Fixed by #12274
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@DimRochette
Copy link

DimRochette commented Jul 3, 2020

Host Environment

  • OS: windows
  • Compiler: 16.6.3

To Reproduce
Steps to reproduce the behavior:
./vcpkg install nanodbc --triplet x64-windows

Failure logs
Error: Building package unixodbc:x64-windows failed with: BUILD_FAILED

Additional context
failed on tag vcpkg tag 2020.06 and master 3d2a7ca

Workaround
removing the depends make compile pass on windows

Build-Depends: unixodbc

@ghost
Copy link

ghost commented Jul 3, 2020

Unfortunately it appears unixodbc is not set up to support windows in vcpkg.

@DimRochette
Copy link
Author

Nanodbc didn't depends on unixodbc on windows platform, because windows have native support for odbc.
Just removing the unixodbc dependency make nanodbc compile under windows.
In previous vcpkg tags like 2020.04 we used to compile nanodbc on ubuntu and windows without issues.

@ghost
Copy link

ghost commented Jul 4, 2020

@DimRochette
cc: @JackBoosY @PhoebeHui

Looks like unixodbc was made a requirement for linux #11613 based on issues with linux builds, but the change inadvertently broke the windows build.

I changed the CONTROL file;

  • Line Build-Depends: unixodbc
  • to Build-Depends: unixodbc (!windows)
  1. I tested the change to the CONTROL file on Windows (item 2) and Linux (item 3) and port installed sucessfully on both windows and linux, but I have no way to test for correct functionality.

If you would be so kind, please could you test with the changes mentioned above on both windows and linux and let us know if they work correctly someone can open a pull request (PR) to make this change to master?

  1. Microsoft Windows [Version 10.0.19041.331]
    Visual Studio 2019 Version: 16.6.3 VS Tools Version: 14.26.28801
    SYSTEM@ANDROMEDA 07/03/2020 19:44:11 D:\Git\vs2019.test
    ->vcpkg install nanodbc
    Computing installation plan...
    The following packages will be built and installed:
    nanodbc[core]:x64-windows
    Starting package 1/1: nanodbc:x64-windows
    Building package nanodbc[core]:x64-windows...
    -- Note: nanodbc only supports static library linkage. Building static library.
    -- Downloading https://github.com/nanodbc/nanodbc/archive/fe1d590991da30dc9cb71676c4d80cb2d9acb49e.tar.gz...
    -- Extracting source D:/Git/vcpkg.downloads/nanodbc-nanodbc-fe1d590991da30dc9cb71676c4d80cb2d9acb49e.tar.gz
    -- Using source at D:/Git/vs2019.test/buildtrees/nanodbc/src/b2d9acb49e-067f65bd7e
    -- Configuring x64-windows
    -- Building x64-windows-dbg
    -- Building x64-windows-rel
    -- Installing: D:/Git/vs2019.test/packages/nanodbc_x64-windows/share/nanodbc/copyright
    -- Performing post-build validation
    -- Performing post-build validation done
    Building package nanodbc[core]:x64-windows... done
    Installing package nanodbc[core]:x64-windows...
    Installing package nanodbc[core]:x64-windows... done
    Elapsed time for package nanodbc:x64-windows: 6.008 s

Total elapsed time: 6.174 s

The package nanodbc:x64-windows provides CMake targets:

find_package(nanodbc CONFIG REQUIRED)
target_link_libraries(main PRIVATE nanodbc)

  1. OpenSUSE-Leap-15.2
    gcc (SUSE Linux) 9.2.1 20190820 [gcc-9-branch revision 274748]
    ac-130h@Andromeda:[~/git/vcpkg]
    >$ vcpkg install nanodbc
    Computing installation plan...
    The following packages will be built and installed:
    nanodbc[core]:x64-linux
    * unixodbc[core]:x64-linux
    Additional packages (*) will be modified to complete this operation.
    Starting package 1/2: unixodbc:x64-linux
    Building package unixodbc[core]:x64-linux...
    -- Downloading https://github.com/lurcher/unixODBC/archive/2.3.7.tar.gz...
    -- Extracting source /home/ac-130h/git/vcpkg/downloads/lurcher-unixODBC-2.3.7.tar.gz
    -- Using source at /home/ac-130h/git/vcpkg/buildtrees/unixodbc/src/2.3.7-22c81701ac
    -- Generating configure for x64-linux
    -- Finished generating configure for x64-linux
    -- Configuring x64-linux-dbg
    -- Configuring x64-linux-rel
    -- Building x64-linux-dbg
    -- Building x64-linux-rel
    -- Installing x64-linux-dbg
    -- Installing x64-linux-rel
    -- Installing: /home/ac-130h/git/vcpkg/packages/unixodbc_x64-linux/share/unixodbc/copyright
    -- Installing: /home/ac-130h/git/vcpkg/packages/unixodbc_x64-linux/share/unixodbc/unixodbcConfig.cmake
    -- Performing post-build validation
    -- Performing post-build validation done
    Building package unixodbc[core]:x64-linux... done
    Installing package unixodbc[core]:x64-linux...
    Installing package unixodbc[core]:x64-linux... done
    Elapsed time for package unixodbc:x64-linux: 1.073 min
    Starting package 2/2: nanodbc:x64-linux
    Building package nanodbc[core]:x64-linux...
    -- Downloading https://github.com/nanodbc/nanodbc/archive/fe1d590991da30dc9cb71676c4d80cb2d9acb49e.tar.gz...
    -- Extracting source /home/ac-130h/git/vcpkg/downloads/nanodbc-nanodbc-fe1d590991da30dc9cb71676c4d80cb2d9acb49e.tar.gz
    -- Using source at /home/ac-130h/git/vcpkg/buildtrees/nanodbc/src/b2d9acb49e-067f65bd7e
    -- Configuring x64-linux-dbg
    -- Configuring x64-linux-rel
    -- Building x64-linux-dbg
    -- Building x64-linux-rel
    -- Installing: /home/ac-130h/git/vcpkg/packages/nanodbc_x64-linux/share/nanodbc/copyright
    -- Performing post-build validation
    -- Performing post-build validation done
    Building package nanodbc[core]:x64-linux... done
    Installing package nanodbc[core]:x64-linux...
    Installing package nanodbc[core]:x64-linux... done
    Elapsed time for package nanodbc:x64-linux: 7.45 s

Total elapsed time: 1.198 min

The package nanodbc:x64-linux provides CMake targets:

find_package(nanodbc CONFIG REQUIRED)
target_link_libraries(main PRIVATE nanodbc)

@JackBoosY JackBoosY self-assigned this Jul 6, 2020
@JackBoosY
Copy link
Contributor

@timautry Thanks for pointing this out!

@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label Jul 6, 2020
@DimRochette
Copy link
Author

Seems OK for us.
Nice to discover with that issue the control file syntax to exclude platform.
We will skipped 2020.06 and are still "locked" on 2020.04 tag for now. We move it only after validating compile of packages on platforms.
Hopefully future vcpkg versionning will solve that.

@ghost
Copy link

ghost commented Jul 6, 2020

@timautry Thanks for pointing this out!

You are most welcome! Glad to help where I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants