[MacOSX] 10.10.5 Yosemite, OpenFOAM-2.3.x: "Symbol not found: *FlexLexer*"
Hi all,
I have MacOsx 10.10.5 Yosemite I am trying to install OpenFOAM-2.3.x on my macbook. I have followed step-by-step guide given here:http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x Installation seems is over. I go to : OpenFOAM/OpenFOAM-2.3.x/tutorials/incompressible/icoFoam/cavity then run: blockMesh and I get this result: $ blockMesh dyld: Symbol not found: __ZN11yyFlexLexer6yywrapEv Referenced from: /Users/l-jodawson/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64ClangDPOpt/lib/libsurfMesh.dylib Expected in: flat namespace in /Users/l-jodawson/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64ClangDPOpt/lib/libsurfMesh.dylib Trace/BPT trap: 5 What could has gone wrong here? I have no clue.. any one can help in this? Thank you so much. |
Any help will be much appreciated? ...
Quote:
|
Quote:
This appears to be a problem with the system version of flex (even though you have installed flex using Macports). This post suggests to move/rename the system flex: Code:
sudo mv /usr/bin/flex /usr/bin/flex_xcode Details of disabling SIP are given here, but in short are:
After moving the system flex you may have to recompile, but try running blockMesh first anyway to see if it works. Let me know if it works for you, Philip |
Thank you very much for the comments.
A quick questions: Is SIP also a feature of Yosemite. I have MacOsx 10.10.5 Yosemite. Do I still need to do disable SIP? |
Quote:
So open a terminal and run: Code:
sudo mv /usr/bin/flex /usr/bin/flex_xcode Code:
dhcp-892b95d9:~ philipc$ sudo mv /usr/bin/flex /usr/bin/flex_xcode Philip |
Ok, so I could rename the flex.
But running the blockMesh lands me in the same error again. Guess I have to recompile "./Allwmake" again..is it? Thanks. Jonathan |
Quote:
Philip |
Unfortunately I still get the same error.
While running "./Allwmake" One recurring set of errors I get are the following: make[2]: *** No rule to make target `darwinIntel64DPOpt/options'. Stop. wmake error: file 'Make/darwinIntel64DPOpt/objectFiles' could not be created in /Users/l-jodawson/OpenFOAM/OpenFOAM-2.3.x/applications/solvers/multiphase/twoPhaseEulerFoam make[1]: *** [twoPhaseEulerFoam] Error 1 make[1]: Target `application' not remade because of errors. make: *** [multiphase] Error 2 make: Target `application' not remade because of errors. thanks. Jonathan |
Quote:
Code:
cd $FOAM_UTILITIES/mesh/generation/blockMesh Philip |
Sorry for delay in coming back, I tried installing the whole OpenFoam2.3.x again on my mac.
This time the change regarding "flex_xcode" already in place. But still when I run "blockMesh" in cavity folder, I get the same error: dyld: Symbol not found: __ZN11yyFlexLexer6yywrapEv Referenced from: /Users/l-jodawson/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64ClangDPOpt/lib/libsurfMesh.dylib Expected in: flat namespace in /Users/l-jodawson/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64ClangDPOpt/lib/libsurfMesh.dylib Trace/BPT trap: 5 Please any help is appreciated much? Thanks a lot, Jonathan P.S: Did I need to reboot my Mac after I made that change of "flex_xcode" ? |
Quote:
Hmnn I thought that would work. You could try using the flex in ThirdParty but I'm not sure if it will definitely fix it; you would do the following: copy prefs.sh file (if you haven't already done so): Code:
cp $WM_PROJECT_DIR/etc/prefs.sh-EXAMPLE $WM_PROJECT_DIR/etc/prefs.sh Code:
#export WM_THIRD_PARTY_USE_FLEX_2535=1 Philip |
Hi Philip,
Thanks. I don't have a ThirdParty folder. I followed the installation steps from:https://openfoamwiki.net/index.php/I...OpenFOAM_2.3.x As suggested there, I had installed all the ports from MacPorts. Just now following your suggestion I also looked into the "prefs.sh" file, actually located in "/Users/ljodawson/OpenFOAM/OpenFOAM_2.3.x/etc/config/example/", and I didn't find the line you mentioned (i.e export WM_THIRD_PARTY_USE_FLEX_2535=1). Jonathan |
Quote:
I'm not quite sure where/if you can specify to use flex from the ThirdParty folder for OpenFOAM-2.3.x, and if it will help. Philip |
Quote:
It won't help you but for those who have this problem with foam-extend-3.2, the solution is to use the 3rd party version of flex instead of system or macports: Copy the prefs.sh-EXAMPLE file to prefs.sh Code:
cd $WM_PROJECT_DIR/etc Code:
#export WM_THIRD_PARTY_USE_FLEX_2535=1 Code:
export WM_THIRD_PARTY_USE_FLEX_2535=1 foam Code:
./Allwmake.firstInstall Jonathan, for OpenFOAM-2.3.x, I believe the error is related to using the correct version of flex and making sure settings/environment variables are consistent. Philip |
|
All times are GMT -4. The time now is 14:39. |