cannot build magma on windows

39 views
Skip to first unread message

cdel

unread,
Feb 27, 2021, 10:20:45 AMFeb 27
to MAGMA User
Hi,
I am trying to generate magma.lib ,magma_sparse.lib and tester.lib by building magma with Visual Studio 2019 on Windows 10 but I am getting hundreds of link errors. 

I have downloaded magma 2.5.4 and I have followed the instructions in README-Windows, where it says that after building the project in Visual Studio one should find the MAGMA library and testers in  build\lib\Debug\ and build\testing\Debug\ assuming a build folder was created to contain the generated project.

I have generated the project using CMake (v3.19.4), platform x64 using visual studio 16 2019 as a generator. I get the warnings saying that -std=c++11 flag and -std=c++99 flag is not supported by cl.exe, but, the project is still generated.

After the project has been generated, I have tried to build MAGMA.sln on Visual Studio, but I got this kind of link error :

Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file 'lib\Debug\magma_sparse.lib' testing_cio C:\Users\cdelf\Documents\magma-2.5.4\build\LINK 1

So I don't quite understand how am I suppose to generate lib files which the projects depend upon in order to be built. What am I doing wrong here?

Thanks for your answer
cdel

junny

unread,
Mar 7, 2021, 1:01:10 AMMar 7
to MAGMA User, cdel
Hi cdel,

Any update on this problem? I have the same setup and errors that you are getting. Building the magma.sln gives me more than 700 errors.

Would it be useless if we make the lib files in ubuntu and use them in visual studio? I am currently thinking of doing just that.

junny

Christian

unread,
May 25, 2021, 1:34:13 PMMay 25
to MAGMA User, junny, cdel
Hi cdel,
From the description of your problem, it seems that you are compiling the tests, (see `testing_cio` in the error) when it gives you the dependency error. I am going by memory, so please excuse any mistake, but I believe that CMake configures the solution to compile everything: library and tests. In Visual Studio a "Solution" is a collection of projects which may or may not depend on each other. If it all works correctly, it should compile the library first and then the tests. Perhaps the CMake file for Windows is missing a dependency between the tests and the library project, so Visual Studio goes merrily ahead and decides to compile the tests first, hence the missing dependency. Try compiling the library project only (right-click on the magma library project, then build, I believe).

Cheers

Reply all
Reply to author
Forward
0 new messages