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

[OpenFOAM.org] OpenFOAM 5.x on Linux Mint Tara and FlexLexer issue

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By pbrady2013
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2018, 12:41
Default OpenFOAM 5.x on Linux Mint Tara and FlexLexer issue
  #1
New Member
 
VladJ
Join Date: Feb 2012
Location: Belgium
Posts: 18
Rep Power: 14
kingeorge is on a distinguished road
Dear All,


I would greatly appreciate if someone could help around with this issue which has never appeared before.

Here is the problem:


Code:
/home/vladj/OpenFOAM/OpenFOAM-5.x/platforms/linux64GccDPInt32Opt/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L.C:302:10: fatal error: FlexLexer.h: No such file or directory
 #include <FlexLexer.h>
          ^~~~~~~~~~~~~
compilation terminated.
Thank you very much in advance!
kingeorge is offline   Reply With Quote

Old   September 23, 2018, 19:19
Default Flex Package
  #2
Member
 
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 12
pbrady2013 is on a distinguished road
Hi Vladimir,


I think that its looking for a specific development component in the GNU flex library:


https://www.gnu.org/software/flex/


As for a new error is there something different in this install? Base OS, version of OF, changes in compiler search paths?


I'm good at fiddling with my bash paths as I have multiple versions of OF installed at the same time. Sometimes there is confusion but usually they are isolated and plat nice.



Cheers,
-pete
pbrady2013 is offline   Reply With Quote

Old   September 24, 2018, 03:02
Default
  #3
New Member
 
VladJ
Join Date: Feb 2012
Location: Belgium
Posts: 18
Rep Power: 14
kingeorge is on a distinguished road
Hello Pete,
I appreciate you're trying to help.


Well, there is nothing unusual in the installation procedure for this version of OF which is 5.x. I did compile it without any problem on the Linux Mint version which was based on Ubuntu 16.04. However, now I switched to the latest Linux Mint (based on Ubuntu 18.04) and it aborts compilation.


I have always followed this procedure:


http://openfoamwiki.net/index.php/In...u#Ubuntu_18.04


and never had any problem until now.


This is all I can say for the moment.


Cheers and thanks again,
Vladimir
kingeorge is offline   Reply With Quote

Old   September 24, 2018, 03:18
Default Dev Packages
  #4
Member
 
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 12
pbrady2013 is on a distinguished road
Hi,


I spend more time in RedHat land and have not used Mint myself but I'll see if I can give it a try when I get into the office tomorrow.



Skimming that instruction set though I note that in RHEL I sometimes have to explicitly install both the base and *-devel packages to get the header files. Maybe Tara update changed that?


Cheers,
-pete
pbrady2013 is offline   Reply With Quote

Old   September 25, 2018, 22:38
Default Package Check for libfl-dev
  #5
Member
 
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 12
pbrady2013 is on a distinguished road
Hi,


Sorry for the delay in responding. I've not had time to spin up a Mint or Ubuntu to check.


As far as I can tell the libfl-dev package is required to install this header. This package is not explicitly installed via the instruction set you linked to and it may have been installed through dependencies in the past.


Can you check that this package is installed?


Assuming it is then its back to checking the search paths.


It looks like some packages have been rearranged as there is a "flex-old" package that contains the header you are missing. That package would have been installed under the old instructions.



Hope that helps,
-pete
wyldckat and kingeorge like this.
pbrady2013 is offline   Reply With Quote

Old   September 28, 2018, 15:25
Default
  #6
New Member
 
VladJ
Join Date: Feb 2012
Location: Belgium
Posts: 18
Rep Power: 14
kingeorge is on a distinguished road
Hello Pete!


As you suggested:


sudo apt-get install libfl-dev

and compilation went through the critical stage. So far so good.


Thank you very much. I am back in business.


Cheers,
V
kingeorge is offline   Reply With Quote

Old   September 30, 2018, 19:14
Default [SOLVED] with Package
  #7
Member
 
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 12
pbrady2013 is on a distinguished road
Great news. Have fun Foaming!


Cheers,
-pete
pbrady2013 is offline   Reply With Quote

Old   October 7, 2018, 08:23
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

I was really intrigued what happened with the difficulties on Linux Mint, just because of one single package... and I've finally managed to figure out that it has to do with how Linux Mint has disabled the installation of recommended packages when using apt.

By using this command:
Code:
grep "APT::Install-Recommends" /etc/apt/apt.conf.d/*
  • On Linux Mint we get:
    Code:
    /etc/apt/apt.conf.d/00recommends:APT::Install-Recommends "false";
  • On Ubuntu 18.04 we don't get anything.
  • On Ubuntu 16.04 we get:
    Code:
    /etc/apt/apt.conf.d/99synaptic:APT::Install-Recommends "true";
What this means is that on Ubuntu using the package name "flex" is enough to also installing the packages "libfl-dev" and "libfl2", but on Linux Mint we should use "libfl-dev" instead, given that this package has a hard-dependency on the other two, instead of just a recommendation.


Therefore, I've updated the instructions at openfoamwiki.net for 5.x, 6 and dev to install this package instead of just "flex".


What I find strange is that this problem should have started since 2014, given that this kind of issue was already discussed back then here: https://forums.linuxmint.com/viewtopic.php?t=185770 - and I don't remember ever seeing this issue being reported in the past here on the OpenFOAM forum(s)...


Best regards,
Bruno
kingeorge and pbrady2013 like this.
__________________

Last edited by wyldckat; October 7, 2018 at 08:25. Reason: finished what I had started writing...
wyldckat is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 16:46.