CMAKE problem, please help a newbie!

Post here if you have problem using the CMAKE build process

CMAKE problem, please help a newbie!

Postby shadow1011 » Tue Jan 13, 2015 11:23 pm

I'm trying to build lapack for an installation of DL4J and am just having the most frustrating time of it. I have downloaded and uncompressed the source files to the directory c:\Users\myusername\lapack-3.5.0. Inside that folder I have created a subfolder called "build". I have also installed MinGW and used it to download the Fortran and C compilers (gfortran.exe and gcc.exe, respectively). I have installed CMAKE and, in the GUI for CMAKE, selected the source and build directories. After clicking the 'Configure' button I selected 'MinGW Makefiles' from the list of generators and chose to specify native compilers. After selecting the compilers and clicking next, I initially got an error from CMAKE about a missing CMakeLists.txt file. Not having any experience with CMAKE, I Googled Lapack+CMakeLists.txt and found a Github with a fully completed CMakeLists.txt file. I copied that file into my source directory, deleted the cache in CMAKE, and repeated the steps. Now I get another error:

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Fortran_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file: C:/Users/myusername/lapack-3.5.0/build/CMakeFiles/3.1.0/CMakeFortranCompiler.cmake
Configuring incomplete, errors occurred!

I have been Googling and reading pages for several hours now and my eyes are starting to bleed. I honestly have no idea what I'm missing or doing wrong. Are there any experienced users around that could offer me some advice?
shadow1011
 
Posts: 4
Joined: Tue Jan 13, 2015 11:04 pm

Re: CMAKE problem, please help a newbie!

Postby admin » Wed Jan 14, 2015 9:35 am

Hey Shadow1022,
I don't think you can have your build folder as a subfolder
Best would be to create a build folder at the same level than your lapack-3.5.0 , something like c:\Users\myusername\lapack-3.5.0-build

Let me know if it works...
Looks like the steps you described are good to me.
Hope it helps
admin
Site Admin
 
Posts: 609
Joined: Wed Dec 08, 2004 7:07 pm

Re: CMAKE problem, please help a newbie!

Postby shadow1011 » Wed Jan 14, 2015 11:40 am

Thanks for the comment! Unfortunately, separating the build folder out to a folder on the same level as the source file folder did not fix the issue; I'm still getting the same error about a missing variable:

Missing variable is:
CMAKE_Fortran_COMPILER_ENV_VAR

Is it possible I downloaded the Fortran compiler incorrectly or am pointing to the wrong location? In MinGW, under the 'Basic Setup' section, I have selected and downloaded "mingw32-gcc-fortran" and "mingw32-gcc-g++" and in CMAKE I am selecting for the native compilers (MinGW is installed at C:\MinGW):

C:/MinGW/bin/gfortran.exe
C:/MinGW/bin/gcc.exe

Also, just to add some additional information, on a posting I found someone else was using a simplified CMakeLists.txt consisting of only the following four lines:

cmake_minimum_required(VERSION 2.6)
enable_language(Fortran)
project(fortranTest)
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)

I tried swapping that in as my CMakeLists.txt as well with no change. Anything else I can try?
shadow1011
 
Posts: 4
Joined: Tue Jan 13, 2015 11:04 pm

Re: CMAKE problem, please help a newbie!

Postby shadow1011 » Wed Jan 14, 2015 1:59 pm

Sorry, one additional question. On the Lapack for Windows site (http://icl.cs.utk.edu/lapack-for-window ... ries_mingw), there is a section that references prebuilt dynamic libraries (dll and lib files). I have not touched these. Could that be my issue? If so, how should I use them? Do they need to be placed somewhere to contribute to the LAPACK compilation process?
shadow1011
 
Posts: 4
Joined: Tue Jan 13, 2015 11:04 pm

Re: CMAKE problem, please help a newbie!

Postby admin » Wed Jan 14, 2015 5:05 pm

Did you try not selecting compilers?
Just select the mingw build and not telling it which compilers to use, and if your PATH variable is set correctly, CMAKE should find the compilers by itself.
Julie
admin
Site Admin
 
Posts: 609
Joined: Wed Dec 08, 2004 7:07 pm

Re: CMAKE problem, please help a newbie!

Postby shadow1011 » Wed Jan 14, 2015 6:02 pm

I didn't, however I tried when I read your post and got the same error. However, I suppose I should ask if I have my path statement configured correctly. Basically, I have "C:\MinGW\bin" in my path and no other MinGW or Fortran related environment variables. Did you see my question about the prebuilt dynamic libraries? Could that possibly have something to do with my issue? Thanks!
shadow1011
 
Posts: 4
Joined: Tue Jan 13, 2015 11:04 pm


Return to CMAKE

Who is online

Users browsing this forum: No registered users and 1 guest