microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.83k stars 6.3k forks source link

ceres[suitesparse]:x64-windows build failure #8336

Closed spindensity closed 4 years ago

spindensity commented 4 years ago

Host Environment

To Reproduce

vcpkg install suitesparse[metis]:x64-windows
vcpkg install ceres[suitesparse]:x64-windows

Failure logs install-x64-windows-dbg-out.log install-x64-windows-dbg-out-1.log

Additional context If suitesparse package built with metis installed first, ceres[suitesparse] can't be built successfully.

JackBoosY commented 4 years ago

@spindensity, thanks for reporting this issue! Sadly, I cannot repro it in my machine, but I found something interesting: LINK : fatal error LNK1104: cannot open file 'SuiteSparse::metis.lib'

So, for deep positioning of this problem, please provide the configure log file: configure-x64-windows-dbg-out.log/configure-x64-windows-dbg-err.log

Thanks.

spindensity commented 4 years ago

@JackBoosY

OK, hope it helps.

config-x64-windows-out.log

config-x64-windows-err.log is an empty file.

JackBoosY commented 4 years ago
CMake Warning (dev) at C:/Dev/BasicTools/vcpkg/scripts/buildsystems/vcpkg.cmake:195 (_add_library):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target "ceres" links to target "SuiteSparse::metis" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  internal/ceres/CMakeLists.txt:205 (add_library)

Interesting... Can you remove suitesparse, update vcpkg and rebuild suitesparse?

spindensity commented 4 years ago

@JackBoosY

Ok, I deleted buildtrees, installed, packages directories, updated vcpkg, rebuilt related packages and upload all screenshots and logs here. Hope this helps.

Update vcpkg

Snipaste_2019-09-26_20-07-28 Snipaste_2019-09-26_20-21-12

Build suitesparse[metis]

Snipaste_2019-09-26_20-22-20 Snipaste_2019-09-26_20-23-18 Snipaste_2019-09-26_20-23-39 Snipaste_2019-09-26_20-24-40 Snipaste_2019-09-26_20-25-04

Build ceres[suitesparse]

Snipaste_2019-09-26_20-28-13 Snipaste_2019-09-26_20-28-34 Snipaste_2019-09-26_20-29-04 Snipaste_2019-09-26_20-29-23 Snipaste_2019-09-26_20-30-19 Snipaste_2019-09-26_20-30-36

Logs

metis_logs.zip suitesparse_logs.zip ceres_logs.zip

JackBoosY commented 4 years ago

SuiteSparse::metis should exist in _VCPKG_PATH/packages/suitesparsex64-windows/share/suitesparse/suitesparse-config.cmake. Such as:

set(SuiteSparse_LIBRARIES
    SuiteSparse::suitesparseconfig
    SuiteSparse::amd
    SuiteSparse::btf
    SuiteSparse::camd
    SuiteSparse::ccolamd
    SuiteSparse::colamd
    SuiteSparse::cholmod
    SuiteSparse::cxsparse
    SuiteSparse::klu
    SuiteSparse::ldl
    SuiteSparse::umfpack
    SuiteSparse::spqr
    SuiteSparse::metis
)

Please provide your generated cmake files in _C:/Dev/BasicTools//vcpkg/packages/suitesparsex64-windows/share/suitesparse.

Thanks.

spindensity commented 4 years ago

@JackBoosY

cmakefiles.zip

janholt commented 4 years ago

Possible solution is

JackBoosY commented 4 years ago

Confirmed, no target SuiteSparse::metis are found in suitesparse-targets-debug/release.cmake.

JackBoosY commented 4 years ago

Hi @spindensity, thanks for reporting this issue. Since #8376 has been merged, this issue should be fixed. Please update vcpkg and rebuild ceres[suitesparse].

Thanks.