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

shogun install error on nlopt:x64-windows #3207

Closed
friente opened this issue Apr 5, 2018 · 8 comments
Closed

shogun install error on nlopt:x64-windows #3207

friente opened this issue Apr 5, 2018 · 8 comments
Labels
requires:repro The issue is not currently repro-able

Comments

@friente
Copy link

friente commented Apr 5, 2018

I have tried to install shogun using vcpkg on windows 10. I have msvc 2015 installed.
I have set VCPKG_DEFAULT_TRIPLET=x64-windows before installing shogun through vcpkg.
Then I get the following error in the vpckg window:

CMake Error at scripts/cmake/vcpkg_build_cmake.cmake:136 (message):
    Command failed: C:/Users/myUser/Downloads/vcpkg/downloads/cmake-3.10.2-win32-x86/bin/cmake.exe;--build;.;--config;Debug;--target;install;--;-v;-j1
    Working Directory: C:/Users/myUser/Downloads/vcpkg/buildtrees/nlopt/x64-windows-dbg
    See logs for more information:
      C:\Users\myUser\Downloads\vcpkg\buildtrees\nlopt\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/nlopt/portfile.cmake:22 (vcpkg_install_cmake)
  scripts/ports.cmake:72 (include)


Error: Building package nlopt:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: nlopt:x64-windows
  Vcpkg version: 0.0.107-2018-04-04-3baf583934f3077070e9ed4e7684f743ecced577

In the following I report the last portion of log file install-x64-windows-dbg-out.log:

   Creating library nlopt.lib and object nlopt.exp
[45/47] cmd.exe /C "cmd.exe /C "C:\Users\myUser\Downloads\vcpkg\downloads\cmake-3.10.2-win32-x86\bin\cmake.exe -E __create_def C:\Users\myUser\Downloads\vcpkg\buildtrees\nlopt\x64-windows-dbg\octave\CMakeFiles\nlopt_optimize-mex.dir\exports.def C:\Users\myUser\Downloads\vcpkg\buildtrees\nlopt\x64-windows-dbg\octave\CMakeFiles\nlopt_optimize-mex.dir\exports.def.objs && cd C:\Users\myUser\Downloads\vcpkg\buildtrees\nlopt\x64-windows-dbg" && C:\Users\myUser\Downloads\vcpkg\downloads\cmake-3.10.2-win32-x86\bin\cmake.exe -E vs_link_dll --intdir=octave\CMakeFiles\nlopt_optimize-mex.dir --manifests  -- "E:\Software\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe"  octave\CMakeFiles\nlopt_optimize-mex.dir\nlopt_optimize-mex.c.obj  /out:octave\nlopt_optimize.mexw64 /implib:octave\nlopt_optimize.lib /pdb:octave\nlopt_optimize.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  /DEF:octave\CMakeFiles\nlopt_optimize-mex.dir\exports.def  E:\Software\MATLAB\R2017b\extern\lib\win64\microsoft\libmex.lib nlopt.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
FAILED: octave/nlopt_optimize.mexw64 octave/nlopt_optimize.lib 
cmd.exe /C "cmd.exe /C "C:\Users\myUser\Downloads\vcpkg\downloads\cmake-3.10.2-win32-x86\bin\cmake.exe -E __create_def C:\Users\myUser\Downloads\vcpkg\buildtrees\nlopt\x64-windows-dbg\octave\CMakeFiles\nlopt_optimize-mex.dir\exports.def C:\Users\myUser\Downloads\vcpkg\buildtrees\nlopt\x64-windows-dbg\octave\CMakeFiles\nlopt_optimize-mex.dir\exports.def.objs && cd C:\Users\myUser\Downloads\vcpkg\buildtrees\nlopt\x64-windows-dbg" && C:\Users\myUser\Downloads\vcpkg\downloads\cmake-3.10.2-win32-x86\bin\cmake.exe -E vs_link_dll --intdir=octave\CMakeFiles\nlopt_optimize-mex.dir --manifests  -- "E:\Software\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe"  octave\CMakeFiles\nlopt_optimize-mex.dir\nlopt_optimize-mex.c.obj  /out:octave\nlopt_optimize.mexw64 /implib:octave\nlopt_optimize.lib /pdb:octave\nlopt_optimize.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  /DEF:octave\CMakeFiles\nlopt_optimize-mex.dir\exports.def  E:\Software\MATLAB\R2017b\extern\lib\win64\microsoft\libmex.lib nlopt.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK Pass 1: command "E:\Software\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe octave\CMakeFiles\nlopt_optimize-mex.dir\nlopt_optimize-mex.c.obj /out:octave\nlopt_optimize.mexw64 /implib:octave\nlopt_optimize.lib /pdb:octave\nlopt_optimize.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL /DEF:octave\CMakeFiles\nlopt_optimize-mex.dir\exports.def E:\Software\MATLAB\R2017b\extern\lib\win64\microsoft\libmex.lib nlopt.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:octave\CMakeFiles\nlopt_optimize-mex.dir/intermediate.manifest octave\CMakeFiles\nlopt_optimize-mex.dir/manifest.res" failed (exit code 1120) with the following output:
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

nlopt_optimize-mex.c.obj : warning LNK4197: export 'mexFunction' specified multiple times; using first specification
   Creating library octave\nlopt_optimize.lib and object octave\nlopt_optimize.exp
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxCalloc referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxFree referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxGetM referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxGetCell_730 referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxIsNumeric referenced in function struct_val_default
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxIsCell referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxIsChar referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxIsStruct referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxIsFunctionHandle referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxIsComplex referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxIsDouble referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxGetPr referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxGetScalar referenced in function struct_val_default
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxGetN referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxGetField_730 referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxDestroyArray referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxCreateDoubleMatrix_730 referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxGetString_730 referenced in function mexFunction
nlopt_optimize-mex.c.obj : error LNK2019: unresolved external symbol mxIsNaN referenced in function user_function
octave\nlopt_optimize.mexw64 : fatal error LNK1120: 19 unresolved externals
[46/47] cmd.exe /C "cd . && C:\Users\myUser\Downloads\vcpkg\downloads\cmake-3.10.2-win32-x86\bin\cmake.exe -E vs_link_exe --intdir=test\CMakeFiles\testopt.dir --manifests  -- "E:\Software\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe"  test\CMakeFiles\testopt.dir\testfuncs.c.obj test\CMakeFiles\testopt.dir\testopt.c.obj test\CMakeFiles\testopt.dir\__\util\timer.c.obj test\CMakeFiles\testopt.dir\__\util\mt19937ar.c.obj test\CMakeFiles\testopt.dir\__\util\nlopt-getopt.c.obj  /out:test\testopt.exe /implib:test\testopt.lib /pdb:test\testopt.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL  /subsystem:console  nlopt.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

ninja: build stopped: subcommand failed.

Why I'm getting this error on nlopt?

@MVoz
Copy link
Contributor

MVoz commented Apr 5, 2018

xmmm...

https://stackoverflow.com/questions/13817088/create-a-dll-from-matlab
https://www.mathworks.com/matlabcentral/answers/94099-what-libraries-should-i-link-against-when-creating-a-managed-application-which-calls-a-matlab-compil

libmx.dll\libmx.lib - MATLAB

хотя он уже присутствует, судя по логу
E:\Software\MATLAB\R2017b\extern\lib\win64\microsoft\libmex.lib
или это другая либа)) в общем попробуйте подключить еще одну, я уже сам запутался

or is it another lib)) in general try to connect one more, I'm already confused myself

https://github.com/chemeris/wimax-scanner/blob/master/testbench/matlab/libmx.lib
либо более новую, если имеется

C:\Users\Nikolay\Downloads>dumpbin /EXPORTS libmx.lib | grep mxDestroyArray
                  _mxDestroyArray

C:\Users\Nikolay\Downloads>dumpbin /EXPORTS libmx.lib | grep mxGetCell_730
                  _mxGetCell_730

@friente
Copy link
Author

friente commented Apr 5, 2018

@voskrese I'm sorry but I don't understand your answer.
I have Matlab 2017 installed on my PC. How can I manage the installation of shogun?

@MVoz
Copy link
Contributor

MVoz commented Apr 6, 2018

@friente
Copy link
Author

friente commented Apr 6, 2018

@voskrese you are link the instruction using CMAKE. I tried it, but I'm having issue with the debug build. Anyway, I'm asking why I getting this error using vcpkg. It should installable using vpckg? Isn't it?

@MVoz
Copy link
Contributor

MVoz commented Apr 6, 2018

@fyoda as an option, it can turn out
libmx.lib -> CMakeLists.txt

set(SHOGUN_LINK_LIBRARIES
libmx.lib
)

@friente
Copy link
Author

friente commented Apr 9, 2018

@voskrese I added

set(SHOGUN_LINK_LIBRARIES
libmx.lib
)

In the CMakeLists.txt in vcpkg/buildtrees/nlopt/src but I still get the error when stying to install shogun

@MVoz
Copy link
Contributor

MVoz commented Jul 24, 2018

@fyoda #3201 (comment)

@JackBoosY JackBoosY added the requires:repro The issue is not currently repro-able label Feb 27, 2019
@JackBoosY
Copy link
Contributor

Hi @fyoda , thanks for reporting this issue!
Please open a new issue if this is still a problem for you.
Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

3 participants