-
Notifications
You must be signed in to change notification settings - Fork 89
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
Failure to build eigen-with-viennacl using MinGW #72
Comments
I see: Does the build work without the optimization option '-O3'? |
Also, the build of libviennacl without OpenMP enabled.. 15:39:08 Build Finished (took 1m:36s.83ms) Which means it works fine... 15:42:35 Build Finished (took 1m:39s.935ms) Even though I have OpenMP library in my folder. Anything that I am doing wrong here? |
The OpenMP flag was only set for exectuables, leading to failures when building libviennacl.so on MinGW. Reported-by: skn123 on GitHub in #72
I just pushed a tentative fix for the problem. Please pull again and let us know whether this solves the problem. @PhilippeTillet Please fix the uninitialized variable warnings in scalar_reduction.hpp:107 |
karl, the problem is related with the "gomp" library that comes with MinGW. I explicitly linked that library and Voila!, the problem is solved. I did it at this if (ENABLE_OPENMP) and in libviennacl folder and the problem is solved. |
Thanks for letting us know. Does the fix I pushed above work as well? |
Nope it doesnt. I think the older version was fine. The problem is with FindOpenMP.cmake where it is not able to extract the OpenMP library "gomp". Here is the output with ur suggested fix: |
Thanks! I'll take this as a basis for a fix. I'm just a bit hesitant because I want to make sure that this does not break builds on other systems and compilers... |
Karl I have faced this problem isn so many libraries that I am frankly tired of this. If its Win32 it is by assumption MSVC which is not the case! |
As you stated above, in this case it's actually a CMake problem which we have to circumvent. I understand your frustration - all we (I'm referring to programmers in general) can do to improve this is to report any such troubles upstream in order to ensure these things get fixed ASAP. To the extent possible here, ViennaCL listens, so thanks for reporting :-) |
12:17:25 **** Build of project ViennaCL-Release@ViennaCL ****
"C:\TDM-GCC-64\bin\mingw32-make.exe" -C E:/Binaries_MinGW/ViennaCL eigen-with-viennacl
mingw32-make: Entering directory 'E:/Binaries_MinGW/ViennaCL'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HE:\Sources\viennacl-dev -BE:\Binaries_MinGW\ViennaCL --check-build-system CMakeFiles\Makefile.cmake 0
C:/TDM-GCC-64/bin/mingw32-make -f CMakeFiles\Makefile2 eigen-with-viennacl
mingw32-make[1]: Entering directory 'E:/Binaries_MinGW/ViennaCL'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HE:\Sources\viennacl-dev -BE:\Binaries_MinGW\ViennaCL --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_start E:\Binaries_MinGW\ViennaCL\CMakeFiles 1
C:/TDM-GCC-64/bin/mingw32-make -f CMakeFiles\Makefile2 examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/all
mingw32-make[2]: Entering directory 'E:/Binaries_MinGW/ViennaCL'
C:/TDM-GCC-64/bin/mingw32-make -f examples\tutorial\CMakeFiles\eigen-with-viennacl.dir\build.make examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/depend
mingw32-make[3]: Entering directory 'E:/Binaries_MinGW/ViennaCL'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" E:\Sources\viennacl-dev E:\Sources\viennacl-dev\examples\tutorial E:\Binaries_MinGW\ViennaCL E:\Binaries_MinGW\ViennaCL\examples\tutorial E:\Binaries_MinGW\ViennaCL\examples\tutorial\CMakeFiles\eigen-with-viennacl.dir\DependInfo.cmake --color=
Scanning dependencies of target eigen-with-viennacl
mingw32-make[3]: Leaving directory 'E:/Binaries_MinGW/ViennaCL'
C:/TDM-GCC-64/bin/mingw32-make -f examples\tutorial\CMakeFiles\eigen-with-viennacl.dir\build.make examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/build
mingw32-make[3]: Entering directory 'E:/Binaries_MinGW/ViennaCL'
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E cmake_progress_report E:\Binaries_MinGW\ViennaCL\CMakeFiles 17
[100%] Building CXX object examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/eigen-with-viennacl.cpp.obj
cd /d E:\Binaries_MinGW\ViennaCL\examples\tutorial && C:\TDM-GCC-64\bin\g++.exe -fopenmp -DVIENNACL_WITH_OPENMP -Wall -pedantic -O3 -DNDEBUG @CMakeFiles/eigen-with-viennacl.dir/includes_CXX.rsp -DVIENNACL_WITH_OPENCL -o CMakeFiles\eigen-with-viennacl.dir\eigen-with-viennacl.cpp.obj -c E:\Sources\viennacl-dev\examples\tutorial\eigen-with-viennacl.cpp
cc1plus.exe: out of memory allocating 363249 bytes
examples\tutorial\CMakeFiles\eigen-with-viennacl.dir\build.make:60: recipe for target 'examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/eigen-with-viennacl.cpp.obj' failed
mingw32-make[3]: *** [examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/eigen-with-viennacl.cpp.obj] Error 1
mingw32-make[3]: Leaving directory 'E:/Binaries_MinGW/ViennaCL'
CMakeFiles\Makefile2:1297: recipe for target 'examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/all' failed
mingw32-make[2]: *** [examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/all] Error 2
mingw32-make[1]: *** [examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/rule] Error 2
mingw32-make: *** [eigen-with-viennacl] Error 2
mingw32-make[2]: Leaving directory 'E:/Binaries_MinGW/ViennaCL'
CMakeFiles\Makefile2:1309: recipe for target 'examples/tutorial/CMakeFiles/eigen-with-viennacl.dir/rule' failed
mingw32-make[1]: Leaving directory 'E:/Binaries_MinGW/ViennaCL'
Makefile:630: recipe for target 'eigen-with-viennacl' failed
mingw32-make: Leaving directory 'E:/Binaries_MinGW/ViennaCL'
12:17:30 Build Finished (took 4s.690ms)
The text was updated successfully, but these errors were encountered: