|
[Sponsors] |
[waves2Foam] Compilation error: cannot find -lwaves2Foam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 21, 2022, 13:46 |
Compilation error: cannot find -lwaves2Foam
|
#1 |
New Member
Pere
Join Date: Mar 2022
Location: Mallorca
Posts: 16
Rep Power: 4 |
Dear all,
I am having problems installing waves2Foam on my system (Ubuntu 20.04, running on Windows 10 via WSL). I have OpenFoam v2012. Following the waves2Foam manual, I first installed the required third-party dependencies (that is gfortran, git, SVN and GSL). However, I get this error when running the ./Allwmake command in /applications/utilities/waves2Foam, during the solver compilation step: /usr/bin/ld: cannot find -lwaves2Foam /usr/bin/ld: cannot find -lwaves2FoamGABC /usr/bin/ld: cannot find -lwaves2FoamSampling collect2: error: ld returned 1 exit status I attach a partial log of the compilation since I think the errors are just for the PRE-PROCESSING and SOLVER compilation. A similar case was presented by bknorris (waves2Foam on an Ubuntu 18.04 with OpenFOAM 1712), but I tried what lppferreira suggests with no success. Has anyone experienced something similar or knows a workaround? Thanks! **Edit** I've found the same issue here -Can't find libraries for waves2Foam installation-, but unfortunately the proposed solution did not work for me. Last edited by katiuskas; March 23, 2022 at 12:49. |
|
March 22, 2022, 07:05 |
Problem update
|
#2 |
New Member
Pere
Join Date: Mar 2022
Location: Mallorca
Posts: 16
Rep Power: 4 |
I have the feeling that the error may be originated already in the LIBRARY compilation, which occurs before PRE-PROCESSING and SOLVER. During the LIBRARY compilation, I get four different errors (see attached file for an example, full log was too long):
/usr/bin/ld: cannot find -lgfortran /usr/bin/ld: cannot find -lwaves2Foam |
|
March 29, 2022, 08:35 |
Found a solution
|
#3 |
New Member
Pere
Join Date: Mar 2022
Location: Mallorca
Posts: 16
Rep Power: 4 |
Dear all,
After some days of investigation, I think I found a solution. The error comes from waves2Foam not finding the gfortran library (libgfortran.so). Turns out waves2Foam is not looking for it in the right directory, so going into waves2Foam/src/waves2Foam/Make/options.220 one should add the following at the end of the file (also do the same for the options.220 file located inside the waves2FoamGABC/Make folder): Code:
LIB_INC = \ -I$(GFORTRAN_PATH) \ Code:
export GFORTRAN_PATH = /usr/lib/gcc/x86_64-linux-gnu/9/ Code:
ln -s /usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.so /opt/OpenFOAM/OpenFOAM-v2012/platforms/linux64Gcc63DPInt32Opt/lib Hope this can help someone |
|
May 12, 2023, 05:15 |
|
#4 |
New Member
Join Date: Nov 2020
Posts: 1
Rep Power: 0 |
Thank you! It works and helps me a lot!
|
|
Tags |
2012, compilation, error, waves2foam, windows |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] Can't find libraries for waves2Foam installation | Bulb44 | OpenFOAM Installation | 3 | September 14, 2021 11:17 |
[OpenFOAM.org] RHEL 7.8 Issues installing ParaView - Third Party install not creating OpenMPI | browny | OpenFOAM Installation | 2 | April 24, 2021 06:18 |
Cannot find functionObject file residuals | vava10 | OpenFOAM Pre-Processing | 2 | November 14, 2020 13:21 |
[swak4Foam] swak4Foam compilation can't find -lOpenFOAM | BobR | OpenFOAM Community Contributions | 4 | August 10, 2015 15:49 |
[foam-extend.org] Installing foam-extend 3.1 on Ubuntu 14.04 | stephie | OpenFOAM Installation | 16 | April 23, 2015 17:18 |