[mlpack] compiling mlpack with MinGW/MSYS
Ryan Curtin
gth671b at mail.gatech.edu
Wed Aug 13 12:50:00 EDT 2014
On Sun, Aug 10, 2014 at 08:09:40AM +0200, Gilles Barges wrote:
> Finally, I achieved mlpack build … till 99 %
>
> The last target, mlpack_test, fails with 4 errors ( /C/Users/gbg/Desktop/msys/1.0/ is the same as /usr ) :
>
> cd /C/Users/gbg/Desktop/Librairies/mlpack-1.0.9/build-w64/src/mlpack/tests && /c/TDM-GCC-64/bin/g++.exe -O3 -Wl,--whole-archive CMakeFiles/mlpack_test.dir/objects.a -Wl,--no-whole-archive -o ../../../mlpack_test.exe -Wl,--out-implib,../../../libmlpack_test.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -L/C/Users/gbg/Desktop/msys/1.0/local/lib ../../../libmlpack.a /C/Users/gbg/Desktop/msys/1.0/bin/libarmadillo.dll /C/Users/gbg/Desktop/msys/1.0/local/bin/libopenblas.dll /C/Users/gbg/Desktop/msys/1.0/local/lib/libboost_program_options-mgw48-mt-1_55.a /C/Users/gbg/Desktop/msys/1.0/local/lib/libboost_unit_test_framework-mgw48-mt-1_55.a /C/Users/gbg/Desktop/msys/1.0/local/lib/libboost_random-mgw48-mt-1_55.a /C/Users/gbg/Desktop/msys/1.0/local/bin/libxml2-2.dll -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
>
> ../../../libmlpack.a(lrsdp_function.cpp.obj):lrsdp_function.cpp:(.text+0x6e0): multiple definition of `mlpack::optimization::AugLagrangianFunction<mlpack::optimization::LRSDPFunction>::Evaluate(arma::Mat<double> const&) const'
>
> ../../../libmlpack.a(lrsdp.cpp.obj):lrsdp.cpp:(.text$_ZNK6mlpack12optimization21AugLagrangianFunctionINS0_13LRSDPFunctionEE8EvaluateERKN4arma3MatIdEE[_ZNK6mlpack12optimization21AugLagrangianFunctionINS0_13LRSDPFunctionEE8EvaluateERKN4arma3MatIdEE]+0x0): first defined here
>
> ../../../libmlpack.a(lrsdp_function.cpp.obj):lrsdp_function.cpp:(.text+0xf00): multiple definition of `mlpack::optimization::AugLagrangianFunction<mlpack::optimization::LRSDPFunction>::Gradient(arma::Mat<double> const&, arma::Mat<double>&) const'
>
> ../../../libmlpack.a(lrsdp.cpp.obj):lrsdp.cpp:(.text$_ZNK6mlpack12optimization21AugLagrangianFunctionINS0_13LRSDPFunctionEE8GradientERKN4arma3MatIdEERS6_[_ZNK6mlpack12optimization21AugLagrangianFunctionINS0_13LRSDPFunctionEE8GradientERKN4arma3MatIdEERS6_]+0x0): first defined here
>
> CMakeFiles/mlpack_test.dir/objects.a(mlpack_test.cpp.obj):mlpack_test.cpp:(.text+0x3): undefined reference to `__imp__ZTVN5boost9unit_test13test_observerE'
> CMakeFiles/mlpack_test.dir/objects.a(mlpack_test.cpp.obj):mlpack_test.cpp:(.text+0xc1): undefined reference to `__imp__ZN5boost9unit_test9framework17master_test_suiteEv'
> c:/tdm-gcc-64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/mlpack_test.dir/objects.a(mlpack_test.cpp.obj): bad reloc address 0x0 in section `.pdata$_ZN5boost9unit_test13test_observer10test_startEm'
>
>
> Other generated exes seem to work.
> Although I don't need mlpack_test.exe, I could not install with 'make install'.
> So I installed manually.
> And I could compile, link and execute my app.
> Thanks for your help.
Hi Gilles,
Good to hear you got it working. I have opened a bug in Trac, #360:
http://www.mlpack.org/trac/ticket/360
If you are interested in helping resolve the issue with mlpack_test, you
can try some of the things I've suggested there, but either way, you
have something working, so if you don't have time to look into it, I'll
look into it eventually...
Thanks,
Ryan
--
Ryan Curtin | "Bye-bye, goofy woman. I enjoyed repeatedly
ryan at ratml.org | throwing you to the ground." - Ben Jabituya
More information about the mlpack
mailing list