microsoft / vcpkg

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

[mlpack] Build error #21973

Closed BrendaMMaloff closed 2 years ago

BrendaMMaloff commented 2 years ago

Host Environment

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

Failure logs From confid-x64-windows-out.log

-- Found Doxygen: C:/Program Files/doxygen/bin/doxygen.exe (found version "1.9.2 (caa4e3de211fbbef2c3adf58a6bd4c86d0eb7cb8)") found components: doxygen missing components: dot
-- Found PkgConfig: C:/Program Files/pkg-config.exe (found version "0.26") 
-- Configuring incomplete, errors occurred!
See also "D:/vcpkg/buildtrees/mlpack/x64-windows-dbg/CMakeFiles/CMakeOutput.log".
See also "D:/vcpkg/buildtrees/mlpack/x64-windows-dbg/CMakeFiles/CMakeError.log".
ninja: build stopped: subcommand failed.

From CMakeError.log
Performing C++ SOURCE FILE Test COMPILER_HAS_DEPRECATED_ATTR failed with the following output:
Change Dir: D:/vcpkg/buildtrees/mlpack/x64-windows-dbg/CMakeFiles/CMakeTmp

Run Build Command(s):D:/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe cmTC_51167 && [1/2] Building CXX object CMakeFiles\cmTC_51167.dir\src.cxx.obj

FAILED: CMakeFiles/cmTC_51167.dir/src.cxx.obj 

C:\PROGRA~2\MICROS~3\2019\PROFES~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\cl.exe  /nologo /TP -DCOMPILER_HAS_DEPRECATED_ATTR  /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /bigobj /O3 /wd4068  /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_51167.dir\src.cxx.obj /FdCMakeFiles\cmTC_51167.dir\ /FS -c D:\vcpkg\buildtrees\mlpack\x64-windows-dbg\CMakeFiles\CMakeTmp\src.cxx

cl : Command line warning D9002 : ignoring unknown option '/O3'
D:\vcpkg\buildtrees\mlpack\x64-windows-dbg\CMakeFiles\CMakeTmp\src.cxx(1): error C2065: '__deprecated__': undeclared identifier
D:\vcpkg\buildtrees\mlpack\x64-windows-dbg\CMakeFiles\CMakeTmp\src.cxx(1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\vcpkg\buildtrees\mlpack\x64-windows-dbg\CMakeFiles\CMakeTmp\src.cxx(1): error C2448: '__attribute__': function-style initializer appears to be a function definition
ninja: build stopped: subcommand failed.

Source file was:

__attribute__((__deprecated__)) int somefunc() { return 0; }
    int main() { return somefunc();}

From CMakeOutput.log

Performing C++ SOURCE FILE Test COMPILER_HAS_DEPRECATED_ATTR failed with the following output:
Change Dir: D:/vcpkg/buildtrees/mlpack/x64-windows-dbg/CMakeFiles/CMakeTmp

Run Build Command(s):D:/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe cmTC_51167 && [1/2] Building CXX object CMakeFiles\cmTC_51167.dir\src.cxx.obj

FAILED: CMakeFiles/cmTC_51167.dir/src.cxx.obj 

C:\PROGRA~2\MICROS~3\2019\PROFES~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\cl.exe  /nologo /TP -DCOMPILER_HAS_DEPRECATED_ATTR  /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /bigobj /O3 /wd4068  /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_51167.dir\src.cxx.obj /FdCMakeFiles\cmTC_51167.dir\ /FS -c D:\vcpkg\buildtrees\mlpack\x64-windows-dbg\CMakeFiles\CMakeTmp\src.cxx

cl : Command line warning D9002 : ignoring unknown option '/O3'
D:\vcpkg\buildtrees\mlpack\x64-windows-dbg\CMakeFiles\CMakeTmp\src.cxx(1): error C2065: '__deprecated__': undeclared identifier
D:\vcpkg\buildtrees\mlpack\x64-windows-dbg\CMakeFiles\CMakeTmp\src.cxx(1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\vcpkg\buildtrees\mlpack\x64-windows-dbg\CMakeFiles\CMakeTmp\src.cxx(1): error C2448: '__attribute__': function-style initializer appears to be a function definition
ninja: build stopped: subcommand failed.

Source file was:

__attribute__((__deprecated__)) int somefunc() { return 0; }
    int main() { return somefunc();}
JackBoosY commented 2 years ago

Please provide the following full log: config-x64-windows-out.log config-x64-windows-err.log CMakeOutput.log

SKNo commented 2 years ago

Hi @BrendaMMaloff , @JackBoosY I guess this is very similar to what I reported here : #20154

update: I confirm the issue is resolved (at least for me)

BrendaMMaloff commented 2 years ago

config-x64-windows-out.log CMakeOutput.log CMakeError.log

Those are the files that I get when just using what I pulled from git and editing the vcpkg.json and changing "supports": "uwp" to "supports": "!uwp".

It was suggested that I change the version of mlpack from 3.4.1 to the latest version that I can get from git, but I've never used vcpkg before, so I don't know what I'm really doing. I did just grab that latest code from github, but then I'm not sure how to make vcpkg use it. I can zip it up and replace the file in the downloads, but I'm not sure if that is what I should be doing. It did get me a little further, but then I was getting linker errors against the armadillo library, so I'm sure that I probably not using the right version of it. But really I'm just taking pot shots in the dark. Any help would be appreciated.

JackBoosY commented 2 years ago

@BrendaMMaloff Please remove vcpkg-cmake-config:x64-windows then try again.

This issue was fixed.

BrendaMMaloff commented 2 years ago

Thank you so much for all of your help. I got it building now.