[MBDyn-users] installation problem

masarati at aero.polimi.it masarati at aero.polimi.it
Thu Aug 13 21:36:49 CEST 2009


You should really keep replies in CC to the list.

>>> 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).
>
> Is this means that I should set up libg2c for gcc 4.1.2 which the latest
> version of compiler in my computer.

Yes.  What happens is that since gcc 4.0 libg2c no longer exists, as g77
is replaced by gfortran, which in turn needs libgfortran.  This stuff is
very messy, but MBDyn should just ignore it as soon as you don't set any
configure option and make sure it uses the same release of gcc, g++ and
gfortran.  I just checked with a gcc 4.3.3 compiled by myself.  All I had
to do was:

export PATH=/usr/local/gcc-4.3.3/bin:$PATH

(the location where I installed gcc, g++, gfortran)

./configure F77=gfortran

and everything worked just fine, no matter what libg2c was present (grep
g2c and f2c in config.log gives no results).

> I tried to configure the source code with gcc rather than icc,
> but when I type the make it returns error message like below;
>
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/basic_ios.h:446:
> undefined reference to `std::ios_base::ios_base()'
> ./.libs/libmbutil.a(except.o): In function `basic_istream':
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/istream:574:
> undefined reference to `VTT for std::basic_stringstream<char,
> std::char_traits<char>, std::allocator<char> >'
> ./.libs/libmbutil.a(except.o): In function `basic_stringstream':
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/sstream:524:
> undefined reference to `vtable for std::basic_stringstream<char,
> std::char_traits<char>, std::allocator<char> >'
> ....
>
> Is this comes from lacking libg2c for gcc 4.1.2?

This sounds like an issue with c++ library headers... this is very
strange, because my system also has gcc 4.1.2 as the default compiler, and
I never noticed anything like that.  I really suspect you're doing
something strange, or your system has some severe installation issue.

Cheers, p.



More information about the MBDyn-users mailing list