|
[Sponsors] |
March 3, 2016, 09:36 |
Librairy lgfortran not found
|
#1 |
Member
|
Hello FOAMers,
I am trying to use a stand-alone fortran code to calculate thermo properties of a fluid with given Pressure and Temperature values as input arguments. For this I need to compile the gfortran lib, but when I add the line "-lgfortran" to the Make/options file of my solver, I get (when running ./Allwmake to compile the solver) the following error message: /home/faab/OpenFOAM/ThirdParty-2.3.0/platforms/linux64/gcc-4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lgfortran collect2: error: ld returned 1 exit status make: *** [/home/faab/OpenFOAM/faab-2.3.0/platforms/linux64Gcc48DPOpt/bin/hellChtMultiRegionFoamPorousAboveTLambda] Error 1 I have tried to look around for some info regarding this error but could not find anything relevant. Could you please help me solve this issue ? Thanks a lot ! Faab |
|
March 3, 2016, 17:15 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
Have you tried to add the path to the gfortran library (i.e. to the directory containing the file libgfortran.so (probably with the version number in front of the .so)) with -Lpath/of/directory to the Make/options file?
|
|
March 4, 2016, 04:09 |
|
#3 |
Member
|
Hi Joachim,
Thank you for your reply. That's what I actually tried to do first, but it did not work. I realized that it needed the libgfortran.a file to compile, so I did what you suggested but instead I linked the compiler to the folder in my /usr path containing the ".a" file. Now it works but the libgfortran.a file I linked is from the gcc-4.4.7 version, while I'm using the 4.8.1 with Openfoam, so I'm not sure I'm doing this correctly. |
|
September 15, 2016, 08:12 |
|
#4 |
Member
|
I renew this thread because still the issue has not been resolved, I was able to find a workaround only. The solver compiles correctly with no warning or error message when I add a link to the gfortran library (addind -L/... in the option Makefile), but when I run the solver on a testcase, at the end of the first iteration I get the following error message:
#0 Foam::error:rintStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 at sigaction.c:? #3 Foam::dictionary::~dictionary() at ??:? #4 Foam::solution::~solution() at ~/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/solution.H:49 (discriminator 1) #5 Foam::fvSolution::~fvSolution() at ~/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/fvSolution.H:48 #6 at ~/OpenFOAM/OpenFOAM-2.3.0/applications/solvers/heatTransfer/hellChtMultiRegionFoamPorousAboveTLambda3/hellChtMultiRegionFoamPorousAboveTLambda.C:81 (discriminator 1) #7 __libc_start_main at ??:? #8 at ??:? Segmentation fault (core dumped) Thank you for your help ! Faab |
|
Tags |
lgfortran interface |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Installing OpenFoam on windows 7-64 | Dadou | OpenFOAM Installation | 10 | February 11, 2014 16:20 |
injection problem | Mark New | FLUENT | 0 | August 4, 2013 01:30 |
fireFoam.1.7.x_0.4 compilation error | !link | OpenFOAM Installation | 9 | December 24, 2012 04:15 |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 07:21 |
Problems Installing OF 1.6 32 bit | bucksfan | OpenFOAM Installation | 19 | August 4, 2009 01:36 |