[MBDyn-users] installation problem

Jinmo Lee jinmol at andrew.cmu.edu
Mon Aug 17 23:41:49 CEST 2009


I finished the installation.
What I did wrong was the following; "setenv C++ gcc"
This is why the terminal show me an error message saying "undefined
reference to..."
So, I fixed the environment from "setenv CXX gcc" to "setenv CXX g++".

After adjusting above things and converting fortran compiler environment
from ifort to gfortan, every installation process went well.

Thank you for your advise,

Best Wishes,
Jinmo Lee


On Thu, August 13, 2009 3:36 pm, masarati at aero.polimi.it wrote:
> 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/bi
>> ts/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/ist
>> ream: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/sst
>> ream: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