The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

compilation of f2clib in Visual Studio 2005 fails

Open discussion regarding features, bugs, issues, vendors, etc.

compilation of f2clib in Visual Studio 2005 fails

Postby VJ » Fri Apr 11, 2008 4:41 am

Hello,

I'm trying to compile clapack or Windows. For this purpose, I downloaded the file CLAPACK-3.1.1-VisualStudio.zip, opened the solution, and build everything. This works without problems.

Now, I have changed the setting in
libf2c Properties > Configuration parameters > C/C++ > Code Generation > Runtime Library
to "/MD" (and "/MDd" for the debug version). Of course, I did the same for all other project in the solution. The reason for this change is that we get a link conflict in our software between libcmt and msvcrt.

This change causes the build of f2clib to fail with the following error:
Code: Select all
c:\program files\microsoft visual studio 8\vc\include\io.h(324) : error C2375: 'isatty' : redefinition; different linkage
1>        c:\cygwin\home\jv\3rdparty\clapack-3.1.1-visualstudio\f2clibs\libf2c\fio.h(111) : see declaration of 'isatty'

I will try to see if it still is an issue if f2clib is linked against libcmt, while all the others are linked against msvcrt, but I'm fearing the worst...

Any suggestions?

Thanks,


Jörg
VJ
 
Posts: 12
Joined: Thu Apr 03, 2008 10:41 am

Postby VJ » Fri Apr 11, 2008 6:04 am

I seem to get the exact same error...

Perhaps I should rephrase my question: :)

How do I build clapack with atlas in Windows?


Jörg
VJ
 
Posts: 12
Joined: Thu Apr 03, 2008 10:41 am

Postby Julie » Wed Apr 16, 2008 10:30 am

Hi, yes I have also encountered that problem.
You have to set to ignore libcmt and after everything should be working fine.
Julie
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Postby VJ » Wed Apr 16, 2008 10:42 am

Oops, forgot about this thread...
Yes, ignoring libcmt and libcmtd in all cases AND ignoring either msvcrt or msvcrtd depending on compiling in debug or in release mode solved it.

To combine Atlas with Clapack in Windows, I do the following: first manually build the Atlas libraries with the following parameters for release mode
Code: Select all
<PathToAtlas>/configure -b 32 -C ic cl -Fa ic -MD -Si nocygwin 1

and these for debug mode
Code: Select all
<PathToAtlas>/configure -b 32 -C ic cl -Fa ic -MDd -Fa ic -Od -Fa ic -Zi -Fa dm -g -Fa dm -O0 -Fa sm -g -Fa sm -O0 -Fa dk -g -Fa dk -O0 -Fa sk -g -Fa sk -O0 -Si nocygwin 1


I then downloaded the binary clapack files, and merged them with the .a files I obtained from the compilation above (in cygwin, using the ar command as is also described in the atlas documentation). And this seems to do trick, for both modes, provided that I ignore the aforementioned libraries at link time... :)

Thanks!

Jörg
Last edited by VJ on Wed Apr 16, 2008 2:54 pm, edited 2 times in total.
VJ
 
Posts: 12
Joined: Thu Apr 03, 2008 10:41 am

Postby Julie » Wed Apr 16, 2008 10:52 am

Jorg,
Thank you for posting your compilation configuration of ATLAS under Windows and link to CLAPACK.
This should be helpful to a lot of users.
Julie
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Postby VJ » Wed Apr 16, 2008 2:52 pm

No problem!
:)

(there was a small typo in one of the parameters, but it is fixed now)

Just for completeness:
The compiler used to compile our software is the Microsoft Visual Studio 2005 (with servicepack 1, this is imperative due to a bug in the compiler preventing CBLAS to be compiled with -02); hence the "-C ic cl" to compile the interface API. The GCC compiler is used for internal Atlas stuff.

The flags are
-B 32 : 32 bit addressing (compilation fails otherwise on our system)
-Fa ic -MD : link with mscvrt
-Si nocygwin 1 : do not link with cygwin (it only adds posix threads, but has a GPL license)

For debug mode:
-Fa ic -MDd : link with mscvrtd (mixing of release and debug libs is not possible in Windows)
-Fa ic -Od : no optimization
-Fa ic -Zi : add debug information
-Fa XX -g : add debug information
-Fa XX -O0 : no optimization
(where XX = dm, sm, dk, sk)

To combine the downloaded clapack files (in particular the clapack.lib or clapackd.lib in debug) with the files obtained from the above atlas compilation, check out this documentation:
http://math-atlas.sourceforge.net/errat ... completelp
(extract the lapack.a from atlas, merge into the clapack.lib)

Jörg
VJ
 
Posts: 12
Joined: Thu Apr 03, 2008 10:41 am


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 6 guests