<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hello,<div><br></div><div>This is how I (almost) installed mlpack 1.0.10 on Windows7-64 bits.</div><div><br></div><span style="color: rgb(0, 0, 0); font-size: medium; font-variant: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">- The compiler toolchain is MinGW+MSYS. MSVC++ is not installed. </span><span style="color: rgb(0, 0, 0); font-size: medium; font-variant: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">Using TDM-GCC-64 compiler, installed in </span><span style="color: rgb(0, 0, 0); font-variant: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; ">C:\TDM-GCC-64\</span> <div>- BLAS/LAPACK : using /usr/local/bin/libopenblas.dll (no separate LAPACK lib)<div>- Armadillo is installed in /usr/include. WRAPPER is off.</div><div><br></div><div><div>Between each 'cmake' or 'make' command, all files are removed in the build directory.</div><div><br></div><div>$ cmake -G "MSYS Makefiles" ..</div><div><br></div><div> cannot find Armadillo</div><div><br></div><div>$ cmake -G "MSYS Makefiles" -DARMADILLO_INCLUDE_DIR=/usr/include ..</div><div><br></div><div> -- Using OpenBLAS for BLAS: C:/Users/gbg/Desktop/msys/1.0/local/bin/libopenblas.dll</div><div> FATALCannot find LAPACK library, but ARMA_USE_LAPACK is set …</div><div><br></div><div>$ cmake -G "MSYS Makefiles" -DARMADILLO_INCLUDE_DIR=/usr/include -DLAPACK_LIBRARY=/usr/local/bin/libopenblas.dll ..</div><div><br></div><div> -- Using standard LAPACK: C:/Users/gbg/Desktop/msys/1.0/local/bin/libopenblas.dll</div><div> FATALCannot find BLAS library, but ARMA_USE_BLAS is set. Try specifying BLAS libraries manually by setting the BLAS_LIBRARY variable.</div><div><br></div><div>$ cmake -G "MSYS Makefiles" -DARMADILLO_INCLUDE_DIR=/usr/include -DBLAS_LIBRARY=/usr/local/bin/libopenblas.dll -DLAPACK_LIBRARY=/usr/local/bin/libopenblas.dll ..</div><div><br></div><div> Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)</div><div> (Required is at least version "2.6.0")</div><div><br></div><div>$ cmake -G "MSYS Makefiles" -DARMADILLO_INCLUDE_DIR=/usr/include -DBLAS_LIBRARY=/usr/local/bin/libopenblas.dll -DLAPACK_LIBRARY=/usr/local/bin/libopenblas.dll -DLIBXML2_INCLUDE_DIR=/usr/local/include/libxml2 ..</div><div><br></div><div> Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES) (found suitable version "2.9.1", minimum required is "2.6.0")</div><div><br></div><div>$ cmake -G "MSYS Makefiles" -DARMADILLO_INCLUDE_DIR=/usr/include -DBLAS_LIBRARY=/usr/local/bin/libopenblas.dll -DLAPACK_LIBRARY=/usr/local/bin/libopenblas.dll -DLIBXML2_INCLUDE_DIR=/usr/local/include/libxml2 -DLIBXML2_LIBRARIES=/usr/local/bin/libxml2-2.dll ..</div><div><br></div><div> CMake Warning at CMakeLists.txt:140 (message): zlib1.dll not found! libxml2.dll may depend on this, and if it is not present MLPACK may not work.</div><div> CMake Warning at CMakeLists.txt:146 (message): iconv.dll not found! libxml2.dll may depend on this, and if it is not present MLPACK may not work.</div><div> CMake Error at CMakeLists.txt:154 (message): iconv.h not found! It can be placed in a standard include directory or the LibXml2 include directory.</div><div><br></div><div>On my system, iconv.h is in C:\TMD-GCC-64\include , which is also /mingw/include under MSYS environment.</div><div>As suggested, I copy iconv.h to /usr/include -> KO, still not found</div><div>Copy it to /usr/local/include/libxml2 -> OK, found.</div><div><br></div><div>$ cmake …the same…</div><div><br></div><div> Unable to find the requested Boost libraries.</div><div> Unable to find the Boost header files.</div><div><br></div><div>$ cmake -G "MSYS Makefiles" -Wno-dev -DARMADILLO_INCLUDE_DIR=/usr/include -DBLAS_LIBRARY=/usr/local/bin/libopenblas.dll -DLAPACK_LIBRARY=/usr/local/bin/libopenblas.dll -DLIBXML2_INCLUDE_DIR=/usr/local/include/libxml2 -DLIBXML2_LIBRARIES=/usr/local/bin/libxml2-2.dll -DBOOST_INCLUDEDIR=/usr/local/include/boost-1_55 -DBOOST_LIBRARYDIR=/usr/local/lib ..</div><div><br></div><div>OK</div><div><br></div><div>$ make</div><div><br></div><div> tons of warnings in boost code [-Wunused-local-typedefs], ruining the nice colored progress presentation :-)</div><div> mlpack.a linked</div><div> CMakeFiles/cf.dir/objects.a(cf_main.cpp.obj):cf_main.cpp: undefined reference to `boost::program_options::validate(boost::any&, ...</div><div> SOLUTION: in CMakeLists.txt, comment set(Boost_LIBRARIES "") at line 189</div><div><br></div><div>$ rm -fr * ; cmake same_options_as_previous</div><div>$ make</div><div><br></div><div>mlpack.a and all exe are generared, except the last one (mlpack_test.exe) that fails with 4 errors, the same I reported in mlpack Digest, Vol 18, Issue 5 and led to <a href="http://www.mlpack.org/trac/ticket/360">http://www.mlpack.org/trac/ticket/360</a></div><div><br></div><div>As 'make' fails, 'make install' fails. Had to install by hand.</div><div><br></div></div><div><br></div><div><br></div><div>So, I have suggestions to improve the mlpack installer:</div><div><br></div><div>- detect MinGW/MSYS environment. Maybe by testing the $MSYSTEM env. var., which is set to MINGW32 ?</div><div>- add /mingw/include in the include search path</div><div>- in CMakeLists.txt at line 189, do not clear Boost_LIBRARIES if Windows + MingW</div><div>- let 'make install' install the lib and the headers, even if not all exes are build ? </div><div><br></div><div>Hope this can help.</div><div><br></div><div apple-content-edited="true">
--<br>Gilles Barges.<br><br><br>
</div>
<br></div></body></html>