-
Notifications
You must be signed in to change notification settings - Fork 1.6k
make error #1459
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
Comments
Did you install mingw and msys from msys2.org as mentioned in the wiki article at https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio ? |
Hey please help. |
If you want to do it with cmake, create a "build" directory within OpenBLAS and do the |
Hey thanks for quick reply. As you said creating a build directory within openblas... |
Did you follow the instructions on the wiki page I linked to above ? It has two sections for building with cmake - the first, using clang/flang compiler, wants you to download ninja and a couple of other packages first. The second one uses cmake with the Visual Studio compiler, without ninja (but gives a somewhat slower library, as the microsoft compiler does not use the inline assembly in optimized functions). |
yes i did went through those steps. C:\Python27\OpenBLAS>conda install -y cmake flang clangdev All requested packages already installed.packages in environment at C:\Program Files\Anaconda2:clangdev 5.0.0 flang_3 [vc14 flang] conda-forge C:\Python27\OpenBLAS>conda install -y -c isuruf kitware-ninja All requested packages already installed.packages in environment at C:\Program Files\Anaconda2:kitware-ninja 1.7.2.gaad58.kitware.dyndep.1 0 isuruf C:\Python27\OpenBLAS>set "LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB%" C:\Python27\OpenBLAS>set "CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH% C:\Python27\OpenBLAS>mkdir build C:\Python27\OpenBLAS>cd build C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON After all this it is still giving me the same error. |
It seems Ninja program is not found. Did you activate the conda env by running |
No i didn't do that. |
Before running cmake. After that clean the repo( |
facing cmake error now
is not able to compile a simple test program. It fails with the following output:
CMake will not be able to correctly generate this project. -- Configuring incomplete, errors occurred! |
Looks like it is finding the wrong version of link.exe now, where did /usr/bin/link.exe come from ? |
After restarting and running those steps again i found following error after the cmake cmd `(root) C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON
is not able to compile a simple test program. It fails with the following output:
CMake will not be able to correctly generate this project. -- Configuring incomplete, errors occurred! |
Looks like it found the correct link.exe now, but the dlls from visual studio and the windows sdk it sees are all 32bit. (But I am not a windows guy) |
So what can be done to solve this? |
Do you have a full installation of Visual Studio, both 32 and 64 bit ? (x86 and amd64 I believe they call it) |
I do have 32bit as well. |
From https://cmake.org/pipermail/cmake/2016-March/062983.html it may be necessary to
(that would be 14.0 in your case obviously) |
Now facing this issue (root) C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -- GEMM multithread threshold set to 4. Quoted variables like "MSVC" will no longer be dereferenced when the policy -- Running getarch CMake Error at cmake/prebuild.cmake:214 (ParseGetArchVars): CMake Error at cmake/prebuild.cmake:229 (MESSAGE): Run Build Command:"C:/PROGRA [1/2] Building C object CMakeFiles\cmTC_e7e06.dir\getarch_2nd.c.obj FAILED: CMakeFiles/cmTC_e7e06.dir/getarch_2nd.c.obj C:\PROGRA C:\Python27\OpenBLAS\getarch_2nd.c(12,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(13,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(14,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(15,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(19,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(20,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(21,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(22,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(29,37): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(35,37): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(41,37): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(47,37): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(69,50): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(69,68): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(70,50): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(70,68): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(71,50): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(71,68): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(72,50): error: use of undeclared
fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. ninja: build stopped: subcommand failed. Call Stack (most recent call first): -- Configuring incomplete, errors occurred! (root) C:\Python27\OpenBLAS\build> |
Now at least that is an error from the actual OpenBLAS build files. It could be that the "getarch" helper program failed to identify your cpu, what processor does this computer have ? |
Processor: Intel i3 |
What generation i3 (or full model number like i3-6100) ? If it is anything recent, you could try adding -DTARGET=HASWELL to the cmake command line. |
Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz 3.30 GHz |
Make it -DTARGET=SANDYBRIDGE then. (That type is old enough that it should be autodetected, but maybe that particular model id never came up) |
Came up with this (root) C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DTARGET=SANDYBRIDGE -- Targeting the SANDYBRIDGE architecture. Quoted variables like "MSVC" will no longer be dereferenced when the policy -- Running getarch CMake Error at cmake/prebuild.cmake:214 (ParseGetArchVars): CMake Error at cmake/prebuild.cmake:229 (MESSAGE): Run Build Command:"C:/PROGRA [1/2] Building C object CMakeFiles\cmTC_1234c.dir\getarch_2nd.c.obj FAILED: CMakeFiles/cmTC_1234c.dir/getarch_2nd.c.obj C:\PROGRA C:\Python27\OpenBLAS\getarch_2nd.c(12,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(13,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(14,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(15,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(19,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(20,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(21,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(22,35): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(29,37): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(35,37): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(41,37): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(47,37): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(69,50): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(69,68): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(70,50): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(70,68): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(71,50): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(71,68): error: use of undeclared
C:\Python27\OpenBLAS\getarch_2nd.c(72,50): error: use of undeclared
fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. ninja: build stopped: subcommand failed. Call Stack (most recent call first): -- Configuring incomplete, errors occurred! |
This is weird. Can you do a "make clean", or start from a new build directory please ? |
Ok will do that |
Facing same issue |
I want to ask one thing here, |
Not sure. It looks complete to me now, but somehow the "getarch" program used to determine cpu type is not run, or does not produce any output even if we tell it the correct type. As this is what sets up SGEMM_DEFAULT_UNROLL_M etc. for everything that gets compiled later, things stop there. Is there any additional information in the CMakeOutputLog that tells what happens with getarch (maybe it is not finding a dll at startup) ? |
I think i am facing issue because of fortran compiler The system is: Windows - 10.0.15063 - AMD64 The output was: Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.exe" The C compiler identification is Clang, found in "C:/Python27/OpenBLAS/build/CMakeFiles/3.10.0/CompilerIdC/CMakeCCompilerId.exe" Determining if the C compiler works passed with the following output: Run Build Command:"C:/PROGRA [2/2] Linking C executable cmTC_0a6bd.exe Detecting C compiler ABI info compiled with the following output: Run Build Command:"C:/PROGRA [2/2] Linking C executable cmTC_5b0df.exe Detecting C [] compiler features compiled with the following output: Run Build Command:"C:/PROGRA [2/2] Linking C executable cmTC_9ca91.exe
Detecting C [] compiler features compiled with the following output: Run Build Command:"C:/PROGRA [2/2] Linking C executable cmTC_0d376.exe
Detecting C [] compiler features compiled with the following output: Run Build Command:"C:/PROGRA [2/2] Linking C executable cmTC_d9c32.exe
Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded. The output was: Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" produced "a.exe" The Fortran compiler identification is Flang, found in "C:/Python27/OpenBLAS/build/CMakeFiles/3.10.0/CompilerIdFortran/a.exe" Determining if the Fortran compiler works passed with the following output: Run Build Command:"C:/PROGRA [2/4] Generating Fortran dyndep file CMakeFiles\cmTC_3f2ef.dir\Fortran.dd [3/4] Building Fortran object CMakeFiles\cmTC_3f2ef.dir\testFortranCompiler.f.obj [4/4] Linking Fortran executable cmTC_3f2ef.exe Detecting Fortran compiler ABI info compiled with the following output: Run Build Command:"C:/PROGRA [2/4] Generating Fortran dyndep file CMakeFiles\cmTC_52e88.dir\Fortran.dd [3/4] Building Fortran object CMakeFiles\cmTC_52e88.dir\CMakeFortranCompilerABI.F.obj [4/4] Linking Fortran executable cmTC_52e88.exe Determining if the Fortran compiler supports Fortran 90 passed with the following output: Run Build Command:"C:/PROGRA [2/4] Generating Fortran dyndep file CMakeFiles\cmTC_7e92d.dir\Fortran.dd [3/4] Building Fortran object CMakeFiles\cmTC_7e92d.dir\testFortranCompilerF90.f90.obj [4/4] Linking Fortran executable cmTC_7e92d.exe |
That looks good to me, just generating lots of output as it reports all the default options used. Fortran is not used for getarch anyway, it is "only" needed for building the LAPACK part of OpenBLAS. Is that all there is in the log file ? |
yes |
Do you see a getarch.exe in the build directory ? If so, what happens when you try to run it as "getarch.exe 0", which is what the cmake script tries to do ? |
From a quick google search, this seems to be a problem with your installation of visual studio. The suggested action is to go to its setup/modify panel and (re)install the "Common tools for Visual C++" component. |
Did you manage to fix this ? |
Not yet
Same issue, even after reinstalling.
…On Feb 24, 2018 3:04 AM, "Martin Kroeker" ***@***.***> wrote:
Did you manage to fix this ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1459 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aeky-TkwmTCPv-dRnoUJsMWVrPrsjvuMks5tXy7fgaJpZM4SDRxx>
.
|
@akshay-1993 Can you try with adding |
I have kinda similar issue here. I'm trying to build current develop branch (2c7392f) following instructions from here: https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio#1-native-msvc-abi
This build was with I'm using win7 64 if it does matter. One thing that confuses me is that cmake contains:
But I need x64 build and instructions (link above) talking about |
Can you add |
@isuruf I'm not sure that I understood you right. I cleaned build dir and added
|
Do you have a file "config.h" in your build folder ? (This should be generated from the getarch output and should have a "#define SANDYBRIDGE" in your case, based on which the appropriate set of SGEMM_DEFAULT_... values should be selected from param.h) |
Notice |
Looks like problem lies in I'm not sure how to fix it properly, but for now I just renamed |
There should be no |
Sorry, for some reason I was sure that it is tracked by git. May be it was just my mistake. I'll investigate how config.h appeared in root dir in a few days (Sunday probably). I thought the same about include dir order, but removing this file solved problem. I greatly appreciate your help with this issue. |
I'm sorry for troubling you. Looks like it was my mistake indeed. |
So you got it working ? Can you tell if the '-DCMAKE_TRY_COMPILE_CONFIGURATION=Release' is actually necessary (and should be added to the wiki) ? |
@martin-frbg Yes, it's working now. |
Great. Thanks for updating the wiki (guess it must be the gensymbol script that still requires perl even with cmake ?) |
Thanks for mentioning Perl, I was having the exact same issue. |
C:\Python27\OpenBLAS>make install
process_begin: CreateProcess(NULL, uname -s, ...) failed.
process_begin: CreateProcess(NULL, gcc -DGEMM_MULTITHREAD_THRESHOLD=4 -DNO_PARALLEL_MAKE=0 -o getarch getarch.c cpuid.S, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [getarch] Error 2
Makefile.system:171: Makefile.conf: No such file or directory
Makefile.:2: Makefile.system: Too many open files
Makefile.:90: warning: overriding commands for target
shared' Makefile.:90: warning: ignoring old commands for target
shared'Makefile.:116: warning: overriding commands for target
tests' Makefile.:116: warning: ignoring old commands for target
tests'Makefile.:138: warning: overriding commands for target
libs' Makefile.:138: warning: ignoring old commands for target
libs'Makefile.:169: warning: overriding commands for target
prof_blas' Makefile.:169: warning: ignoring old commands for target
prof_blas'Makefile.:180: warning: overriding commands for target
blas' Makefile.:180: warning: ignoring old commands for target
blas'Makefile.:188: warning: overriding commands for target
hpl' Makefile.:188: warning: ignoring old commands for target
hpl'Makefile.:202: warning: overriding commands for target
hpl_p' Makefile.:202: warning: ignoring old commands for target
hpl_p'Makefile.:215: warning: overriding commands for target
netlib' Makefile.:215: warning: ignoring old commands for target
netlib'Makefile.:228: warning: overriding commands for target
re_lapack' Makefile.:228: warning: ignoring old commands for target
re_lapack'Makefile.:232: warning: overriding commands for target
prof_lapack' Makefile.:232: warning: ignoring old commands for target
prof_lapack'Makefile.:236: warning: overriding commands for target
lapack_prebuild' Makefile.:236: warning: ignoring old commands for target
lapack_prebuild'Makefile.:279: warning: overriding commands for target
large.tgz' Makefile.:279: warning: ignoring old commands for target
large.tgz'Makefile.:286: warning: overriding commands for target
timing.tgz' Makefile.:286: warning: ignoring old commands for target
timing.tgz'Makefile.:293: warning: overriding commands for target
lapack-timing' Makefile.:293: warning: ignoring old commands for target
lapack-timing'Makefile.:300: warning: overriding commands for target `lapack-test'
Whenever i use make ..., i am getting an error above in infinite loop.
Environment:
Windows:10
The text was updated successfully, but these errors were encountered: