|
[Sponsors] |
Compiling Solver: Clang error linker commander failed |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 8, 2014, 15:32 |
Compiling Solver: Clang error linker commander failed
|
#1 |
New Member
Join Date: Apr 2014
Posts: 8
Rep Power: 12 |
Hallo,
im quite new to the CFD stuff so pleas be a little patient =) I installed OpenFoam 2.2.2 on a Mac OS 10.9 (mavericks) according to this blog entry: LINK the tutorials are working fine but i need to compile a solver (which i did not write on my own but im quite sure that it should work on of222) which does not work perfectly. the option file in the make dir of the solver looks like this: Code:
EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ EXE_LIBS = \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume \ -lmeshTools \ -lfvOptions \ -lsampling Code:
#include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "turbulenceModel.H" #include "dynamicFvMesh.H" #include "pimpleControl.H" #include "fvIOoptionList.H" #include <iomanip> // ::std::resetiosflags, ::std::setprecision // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * BEGIN myHeaders * * * * * * * * * * * * * * * * * * * * // #include "volPointInterpolation.H" //needed for const_cast (change) of pointMotionU #include "myFunctions.H" #include "PrimitivePatchInterpolation.H" // * * * * * * * * * * * * * *END myHeaders * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createDynamicFvMesh.H" #include "initContinuityErrs.H" #include "createFields.H" #include "createFvOptions.H" #include "readTimeControls.H" Code:
Undefined symbols for architecture x86_64: "Foam::dynamicFvMesh::New(Foam::IOobject const&)", referenced from: _main in pimpleSnowDriftFoam.o "typeinfo for Foam::dynamicFvMesh", referenced from: _main in pimpleSnowDriftFoam.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Pleas can somebody give me a hint? salute schwam |
|
May 9, 2014, 04:00 |
|
#2 |
Senior Member
|
Hi,
try adding these lines to EXE_LIBS in the options file: Code:
-ldynamicMesh \ -ldynamicFvMesh \ |
|
May 9, 2014, 06:22 |
|
#3 |
New Member
Join Date: Apr 2014
Posts: 8
Rep Power: 12 |
THANK YOU VERY MUCH!!
This adding the libs solved the problen and the solver is running perfectly now. Thanks!!!! Greedings schwam |
|
May 9, 2014, 07:48 |
|
#4 |
Senior Member
|
In fact error has nothing to do with OS X, you'll need these linker switches on Linux as well.
|
|
May 9, 2014, 11:35 |
|
#5 |
New Member
Join Date: Apr 2014
Posts: 8
Rep Power: 12 |
since i'm quite new to this stuff i though maybe it will help when i tell you guys exactly what im talking about and which system im running.
but again thanks since im allready writing: i'va a stange error when using paraFoam: Code:
$ paraFoam OpenFOAM/OpenFOAM-2.2.2/bin/paraFoam: line 267: paraview: command not found Code:
$ paraFoam -touch .... $ paraview --data="**somecasename**.foam" any ideas? Greedings schwam |
|
May 9, 2014, 15:17 |
|
#6 |
Senior Member
|
It's rather strange cause line 267 of paraFoam is:
Code:
paraview --data="$caseFile" "$@" 2>&1 | fgrep -v 'Inconsistency detected by ld.so' |
|
May 10, 2014, 08:29 |
|
#7 |
New Member
Join Date: Apr 2014
Posts: 8
Rep Power: 12 |
that is exactly the same i have in that line:
Code:
267: paraview --data="$caseFile" "$@" 2>&1 | fgrep -v 'Inconsistency detected by ld.so' Code:
paraFoam -touch paraview --data="...foam" |
|
May 10, 2014, 12:37 |
|
#8 |
Senior Member
|
Well, I've reproduced the error (initially I had symlink to /Applications/paraview.app/Contents/MacOS/paraview in $HOME/bin, so there was no problem).
If you don't mind editing certain files: 1. cd $WM_PROJECT_DIR/etc/config 2. open paraview.sh in editor 3. Change the lines between 137 and 152 to Code:
if [ $WM_ARCH_BASE=="darwin" ] then : ${PARAVIEW_APP_DIR:="/Applications/paraview.app"}; export PARAVIEW_APP_DIR if [ -d $PARAVIEW_APP_DIR -a ! -r $ParaView_DIR ] then paraview () { $PARAVIEW_APP_DIR/Contents/MacOS/paraview "$@" } export -f paraview echo "Using paraview in directory $PARAVIEW_APP_DIR" unset ParaView_VERSION ParaView_MAJOR ParaView_DIR # needs to be an alias because if it is in the path the Python Shell does not work # alias paraview=$PARAVIEW_APP_DIR/Contents/MacOS/paraview export PATH=$PARAVIEW_APP_DIR/Contents/bin:$PATH fi fi It seems to be working now. |
|
May 10, 2014, 15:42 |
|
#9 |
New Member
Join Date: Apr 2014
Posts: 8
Rep Power: 12 |
thanks again!
now everything works perfektliy. BIG THANKS Greedings schwam |
|
May 10, 2014, 19:11 |
|
#10 |
Senior Member
|
||
May 12, 2014, 02:38 |
|
#11 |
New Member
Join Date: Apr 2014
Posts: 8
Rep Power: 12 |
i preferred this LINK just because i find it fist on google =)
and it looks quite cleat what to do (although one have tho use brew and a patch - but still pretty straight foreword). First i installed of 2.3.0 but somehow they change something in ddtCorr (LINK_extendet_ddtCorr in of230. since i dont wanted to change the whole code of the solver i got from a colleague, i chose to lunch of222 which also worked perfekt according to the mentioned (mine and your second) link. greedings |
|
May 25, 2014, 05:31 |
|
#12 |
Member
Francisco T
Join Date: Nov 2011
Location: Melbourne, Australia
Posts: 64
Blog Entries: 1
Rep Power: 15 |
HI Alex
thanks for the link, I edited paraview.sh as suggested, and now I get this: >>paraFoam created temporary 'cavity.foam' /OpenFOAM/OpenFOAM-2.3.0/bin/paraFoam: 2946PARAVIEW_APP_DIR/Contents/MacOS/paraview: No such file or directory I can open paraview manually with doble click in applications. Any clue? thanks a lot F |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
user subroutine error | CFDUSER | CFX | 2 | December 9, 2006 07:31 |
user defined function | cfduser | CFX | 0 | April 29, 2006 11:58 |
about USER FORTRAN compiling issue | CXL | CFX | 1 | October 9, 2003 22:00 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 2, 2003 00:32 |
Setting a B.C using UserFortran in 4.3 | tokai | CFX | 10 | July 17, 2001 17:25 |