CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Linker errors when building ThirdParty-1.6 (https://www.cfd-online.com/Forums/openfoam-installation/67514-linker-errors-when-building-thirdparty-1-6-a.html)

nikwin August 17, 2009 15:37

Linker errors when building ThirdParty-1.6
 
./Allwmake gives this error when trying to build hoard in Thirdparty

+ wmake libso hoard
/scratch/nwinkler/ProgramFiles/OF-1.6/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../lib64/libstdc++.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [/scratch/nwinkler/ProgramFiles/OF-1.6/OpenFOAM-1.6/lib/linux64GccDPOpt/libhoard.so] Error 1

several other targets fail with the same error, i.e. libstdc++.so is not recognized.

it is a symlink to libstdc++.so.6.0.10 , which is 64 bit
>file gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../lib64/libstdc++.so.6.0.10
gcc-4.3.3/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../lib64/libstdc++.so.6.0.10: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

and so is the machine
>uname -a
Linux tour 2.6.18-6-amd64 #1 SMP Tue May 5 08:01:28 UTC 2009 x86_64 GNU/Linux

And I try to build the 64 bit version:
>echo $WM_ARCH_OPTION
64

Any suggestions how to make it build?

Regards
/NW

hellorishi August 18, 2009 08:28

Hello,

I had similar problem with libstdc++.
The problem was solved by first compiling gcc in thirdparty with path for gmp and mpfr, using my system compiler.

Then I could compile OF1.6 and did not have libstdc++ error.
It could be the same problem...

nikwin August 18, 2009 12:05

Thanks Rishi,

I did as in the following thread and it works for Thirdparty!

http://www.linuxquestions.org/questions/linux-from-scratch-13/i-have-an-error-building-gcc-requires-gmp-4.1-and-mpfr-2.3.0.-690426/

But, when trying to compile src/ with ./Allwmake I get the following errors,

Note: ignore spurious warnings about missing mpicxx.h headers
+ WM_OPTIONS=linux64GccDPOptOPENMPI
+ wmake libso mpi
/scratch/nwinkler/ProgramFiles/OF-1.6/ThirdParty-1.6/openmpi-1.3.3/platforms/linux64GccDPOpt/lib/libmpi.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [/scratch/nwinkler/ProgramFiles/OF-1.6/OpenFOAM-1.6/lib/linux64GccDPOpt/openmpi-1.3.3/libPstream.so] Error 1

+ wmake libso parMetisDecomp
/usr/bin/ld: cannot find -lmetis-parmetis
collect2: ld returned 1 exit status
make: *** [/scratch/nwinkler/ProgramFiles/OF-1.6/OpenFOAM-1.6/lib/linux64GccDPOpt/openmpi-1.3.3/libparMetisDecompositionMethod.so] Error 1

When looking for libPstream.so it is located under ./OpenFOAM-1.6/lib/linux64GccDPOpt/dummy/libPstream.so
and not where it is looking for it and the file libparMetisDecompositionMethod.so does not exist.

Any suggestions?

Regards
/NW

NickG February 18, 2010 11:18

/usr/bin/ld: cannot find -lmetis-parmetis

I had this problem. If you have libmetis-parmetis.so in /home/****/OpenFOAM/OpenFOAM-*****/lib/linux64GccDPOpt/openmpi-1.3.3 then I found that copying all the files in there and pasting them up a level in /home/****/OpenFOAM/OpenFOAM-*****/lib/linux64GccDPOpt seemed to fix it

Hope it helps

NickG February 18, 2010 11:19

...and then recompiling... !


All times are GMT -4. The time now is 08:46.