[MBDyn-users] installation problem

masarati at aero.polimi.it masarati at aero.polimi.it
Thu Aug 13 09:51:55 CEST 2009


> I typed 'locate libg2c', and this command shows the location of libg2c
> like below;
>
> [root at mach mbdyn-1.3.9]# locate libg2c
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/libg2c.a
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/libg2c.so
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/32/libg2c.a
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/32/libg2c.so
> /usr/lib64/libg2c.so.0
> /usr/lib64/libg2c.so.0.0.0
>
> So it seems that libg2c exist in my computer.

The fact it exists does not mean it will be linked :)  Please note that
libg2c.a is in a very specific, compiler-related directory.  So it will be
automatically found and linked only by that version of that compiler (in
that case, the build of gcc 3.4.6 provided by RedHat).

> Can you give me more instruction in this situation?
>
> In addition, my computer seems to use icc platform,

I assume you can control what compiler you intend to use; for example, by
setting CC, CXX, F77 appropriately when running configure.

> and I saw notes from the website says that
>
> "
> libraries -lF90 -lCEPCF90 must be explicitly linked as replacements of
> auto-detected -lf2c/-lg2c, e.g. define
>
> 	LIBS="-lF90 -lCEPCF90"
> "

This note is years old.  It refers to Intel's compilers version 9, which
is the latest that was tested with MBDyn.  They may still be valid, but
the whole thing has not been tested by myself.

The whole concept is that each compiler knows what libraries it needs when
linking objects whose sources are in its own language, while it needs some
help when linking objects written in another language.  This is the case
of MBDyn, where by design the C++ compiler is used to link code written in
C++, C and Fortran.

The test on the existence and usability of libg2c was added to get rid of
a series of build issues with incomplete compiler installation issues. 
However, it might be an overkill if one uses a different compiler.  I
advise you that using something different from gcc/g++ may require some
manual intervention because of those gcc-specific tests.

I suggest you first step back to gcc/g++ to see if you can build MBDyn. 
Later, if you wish, you can try to build it also with icc.  I never found
any noticeable performance improvement, that's why I decided to stick with
(ubiquitous) GNU compilers.

> I wonder how to make -lF90 -lCEPCF90 linked as the replacements.
> (the version of icc in my computer is 11.0 though)

Set LIBS and LDFLAGS appropriately before you run configure.

Cheers, p.



More information about the MBDyn-users mailing list