Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7012 Discussions

Problem in building Fortran 95 Interfaces to LAPACK and BLAS

paolo17
Beginner
1,192 Views

I followed the instructions on page 7-2 of the userguide to build Fortran 95 Interfaces for LAPACK and BLAS routines, but after the complier created the object files I had this error:

...

...

lib -out:"..\..\ia32\lib"\mkl_lapack95.lib obj\*.obj
Microsoft Library Manager Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

obj\cbdsqr.obj : fatal error LNK1136: invalid or corrupt file
NMAKE : fatal error U1077: 'lib' : return code '0x470'
Stop.
NMAKE : fatal error U1077: '"C:\Programmi\Microsoft Visual Studio\VC98\BIN\NMAKE
.exe"' : return code '0x2'
Stop.

Can someone give me some suggestion to solve this problem ?

Thanks a lot,

Paolo

0 Kudos
7 Replies
Gennady_F_Intel
Moderator
1,192 Views
Paolo,
1. May be some thing is wrong in your environment?
I was able to build F95 Interfaces for Lapack successfully.I have installed on my system VS2005 and therefore I used nmake and lib.exe from this VS.For example, on my machine, I installed Microsoft Visual Studio 2005. The lib.exe and nmake.exe are from it and both of them locate in C:Program FilesMicrosoft Visual Studio 8VCbin.
2. What command line do you use to build this interfaces? nmake lib32? And what is your platform?
--Gennady
0 Kudos
paolo17
Beginner
1,192 Views
Paolo,
1. May be some thing is wrong in your environment?
I was able to build F95 Interfaces for Lapack successfully.I have installed on my system VS2005 and therefore I used nmake and lib.exe from this VS.For example, on my machine, I installed Microsoft Visual Studio 2005. The lib.exe and nmake.exe are from it and both of them locate in C:Program FilesMicrosoft Visual Studio 8VCbin.
2. What command line do you use to build this interfaces? nmake lib32? And what is your platform?
--Gennady

Hi Gennady,

I have installed a VS2005 too, on a win32 platform (OS: Win xp service pack 3, Machine: HP Compaq Intel Core2 Duo).
The environment variables, relevant to Visual Studio, Intel Fortran Compiler and MKL, set on my system are:

Path=
C:ProgrammiMicrosoft Visual StudioCommonTools;
C:ProgrammiMicrosoft Visual StudioCommonMsdev98BIN;
C:ProgrammiMicrosoft Visual StudioDF98BIN;
C:ProgrammiMicrosoft Visual StudioVC98BIN;
C:ProgrammiIntelMKL10.0.3.021ia32bin;
C:ProgrammiIntelCompilerFortran10.1.021IA32Lib;
C:ProgrammiIntelCompilerFortran10.1.021EM64TLib;
C:ProgrammiIntelCompilerFortran10.1.021EM64Tbin;
C:ProgrammiIntelCompilerFortran10.1.021IA32bin

In fact the used lib.exe and nmake.exe are located in C:ProgrammiMicrosoft Visual StudioVC98BIN

The command line that I typed was: nmake PLAT=win32 lib

I have tried to use the lib.exe and nmake.exe located in C:Program FilesMicrosoft Visual Studio 8VCbin, by setting it before C:ProgrammiMicrosoft Visual StudioVC98BIN in the environment variables list, but it gave a similar error:

...
lib -out:"....ia32lib"mkl_blas95.lib obj*.obj
NMAKE : fatal error U1077: '"C:ProgrammiMicrosoft Visual Studio 8VCbinlib.EXE"' : return code '0xc0000135'
Stop.
NMAKE : fatal error U1077: '"C:ProgrammiMicrosoft Visual Studio 8VCbinnmake.EXE"' : return code '0x2'
Stop.


Paolo

0 Kudos
Vladimir_Koldakov__I
New Contributor III
1,192 Views
Quoting - paolo17
Path=
C:ProgrammiMicrosoft Visual StudioCommonTools;
C:ProgrammiMicrosoft Visual StudioCommonMsdev98BIN;
C:ProgrammiMicrosoft Visual StudioDF98BIN;
C:ProgrammiMicrosoft Visual StudioVC98BIN;
C:ProgrammiIntelMKL10.0.3.021ia32bin;
C:ProgrammiIntelCompilerFortran10.1.021IA32Lib;
C:ProgrammiIntelCompilerFortran10.1.021EM64TLib;
C:ProgrammiIntelCompilerFortran10.1.021EM64Tbin;
C:ProgrammiIntelCompilerFortran10.1.021IA32bin

Hi Paolo,

The initial problem can be because of incompatibility ifort obj file format and old (VC98) linker.

It would be better to remove EM64T paths from your Path environment variable. I believe em64t compiler is called because the relative path precedes IA32 path.

I think it is not needed including lib paths to Path environment variable.

Thanks,

Vladimir

0 Kudos
Svein-Atle
Beginner
1,192 Views

Hi Paolo,

The initial problem can be because of incompatibility ifort obj file format and old (VC98) linker.

It would be better to remove EM64T paths from your Path environment variable. I believe em64t compiler is called because the relative path precedes IA32 path.

I think it is not needed including lib paths to Path environment variable.

Thanks,

Vladimir

0 Kudos
Svein-Atle
Beginner
1,192 Views
Quoting - sae@hib.no1

Hi Paolo,

You need to be an administrator when building the libraries.

SAE

0 Kudos
Gennady_F_Intel
Moderator
1,192 Views

Actually, you should not be an Administrator. You just need to set up environment variables properly.

More likely that the reason of the problem you met was incompatibility problem Vladimir suggested above.

--Gennady

0 Kudos
paolo17
Beginner
1,192 Views

Hi Gennady, Vladimir and Sae

Finally I found out the problem ! The error gave from the lib.exe occurred because it couldn't find the dynamic library mspdb80.dll (I executed lib.exe separately and a window with this warning came out!).
Therefore I added the path of that dll ("C:ProgrammiMicrosoft Visual Studio 8Team ToolsPerformance Tools" on my pc) in the environment variables list and the compilation worked correctly.

Thanks a lot,

Paolo

0 Kudos
Reply