CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] [MacOSX] 10.10.5 Yosemite, OpenFOAM-2.3.x: "Symbol not found: *FlexLexer*"

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 14, 2016, 10:06
Default [MacOSX] 10.10.5 Yosemite, OpenFOAM-2.3.x: "Symbol not found: *FlexLexer*"
  #1
New Member
 
jonathan
Join Date: Feb 2016
Posts: 8
Rep Power: 10
edjonathan is on a distinguished road
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.
edjonathan is offline   Reply With Quote

Old   February 15, 2016, 10:37
Default
  #2
New Member
 
jonathan
Join Date: Feb 2016
Posts: 8
Rep Power: 10
edjonathan is on a distinguished road
Any help will be much appreciated? ...

Quote:
Originally Posted by edjonathan View Post
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.
edjonathan is offline   Reply With Quote

Old   February 16, 2016, 13:46
Default
  #3
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by edjonathan View Post
Any help will be much appreciated? ...
Hi,

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
But note that you must disable System Integrity Protection (SIP - a new feature of El Capitan) to be able to modify items in /usr/bin.
Details of disabling SIP are given here, but in short are:
  • reboot
  • as soon as you hear the "Mac sound" on the grey screen, press Cmd+R to enter Recovery mode
  • Open Utilities->Terminal
  • Run the command:
    Code:
     csrutil disable
  • Reboot, you'll land in the normal OS with SIP disabled, open the terminal and
  • run the command:
    Code:
     sudo mv /usr/bin/flex /usr/bin/flex_xcode
  • Reboot again
  • as soon as you hear the "Mac sound" on the grey screen, press Cmd+R to enter Recovery mode
  • Enable SIP with:
    Code:
     csrutil enable
  • Reboot again
  • done

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
bigphil is offline   Reply With Quote

Old   February 16, 2016, 14:06
Default
  #4
New Member
 
jonathan
Join Date: Feb 2016
Posts: 8
Rep Power: 10
edjonathan is on a distinguished road
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?
edjonathan is offline   Reply With Quote

Old   February 16, 2016, 14:12
Default
  #5
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by edjonathan View Post
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?
Good question; a quick way to check is to try rename the flex while logged in as normal; if you can do it then SIP is not active.
So open a terminal and run:
Code:
sudo mv /usr/bin/flex /usr/bin/flex_xcode
When I try it, I get the following:
Code:
dhcp-892b95d9:~ philipc$ sudo mv /usr/bin/flex /usr/bin/flex_xcode
Password:
mv: rename /usr/bin/flex to /usr/bin/flex_xcode: Operation not permitted
If it works for you then you don't need to disable and re-enable SIP.

Philip
bigphil is offline   Reply With Quote

Old   February 16, 2016, 14:18
Default
  #6
New Member
 
jonathan
Join Date: Feb 2016
Posts: 8
Rep Power: 10
edjonathan is on a distinguished road
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
edjonathan is offline   Reply With Quote

Old   February 16, 2016, 14:19
Default
  #7
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by edjonathan View Post
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
Yep, "./Allwmake" again.

Philip
bigphil is offline   Reply With Quote

Old   February 16, 2016, 14:47
Default
  #8
New Member
 
jonathan
Join Date: Feb 2016
Posts: 8
Rep Power: 10
edjonathan is on a distinguished road
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
edjonathan is offline   Reply With Quote

Old   February 16, 2016, 14:53
Default
  #9
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by edjonathan View Post
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
Try clean and remake the applications, for example try blockMesh:
Code:
cd $FOAM_UTILITIES/mesh/generation/blockMesh
wclean
wmake
And then try run blockMesh.

Philip
bigphil is offline   Reply With Quote

Old   February 17, 2016, 09:09
Default
  #10
New Member
 
jonathan
Join Date: Feb 2016
Posts: 8
Rep Power: 10
edjonathan is on a distinguished road
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" ?
edjonathan is offline   Reply With Quote

Old   February 17, 2016, 16:50
Default
  #11
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by edjonathan View Post
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" ?
Hi Jonathan,

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
Then uncomment (remove the leading hash symbol) the following line in $WM_PROJECT_DIR/etc/prefs.sh:
Code:
#export WM_THIRD_PARTY_USE_FLEX_2535=1
Then open a new terminal and recompile foam with ./Allwmake.firstInstall

Philip
bigphil is offline   Reply With Quote

Old   February 17, 2016, 17:09
Default
  #12
New Member
 
jonathan
Join Date: Feb 2016
Posts: 8
Rep Power: 10
edjonathan is on a distinguished road
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
edjonathan is offline   Reply With Quote

Old   February 17, 2016, 17:12
Default
  #13
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by edjonathan View Post
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
Sorry, I was thinking of foam extend.
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
bigphil is offline   Reply With Quote

Old   February 23, 2016, 07:12
Default
  #14
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by bigphil View Post
Sorry, I was thinking of foam extend.
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
Hi Jonathan,

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
cp prefs.sh-EXAMPLE prefs.sh
Open the "foam-extend-3.2/etc/prefs.sh” file with a text editor and find and replace this line:
Code:
#export WM_THIRD_PARTY_USE_FLEX_2535=1
with this line:
Code:
export WM_THIRD_PARTY_USE_FLEX_2535=1
Then open a new terminal and compile all of foam:
foam
Code:
./Allwmake.firstInstall
Note: if you have previously unsuccessfully compiled then you may need to clean the some of the library (e.g. wclean lib $FOAM_SRC/meshTools).


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
bigphil is offline   Reply With Quote

Old   September 27, 2016, 14:15
Default
  #15
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
FYI

http://www.cfd-online.com/Forums/ope...tml#post595275
bigphil is offline   Reply With Quote

Reply

Tags
installation, macos10.10, openfoam-2.3.x

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 15:24
CGNS Compiling Diego Main CFD Forum 17 December 21, 2014 02:40
Symbol lookup error after upgrading to 2.1.1 ChrisA OpenFOAM Programming & Development 2 March 6, 2013 21:38
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 05:26
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 10:57.