CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Problems installing OpenFOAM 2.4.0 on Fedora 23 (https://www.cfd-online.com/Forums/openfoam-installation/171381-problems-installing-openfoam-2-4-0-fedora-23-a.html)

tlcoons May 6, 2016 07:23

Problems installing OpenFOAM 2.4.0 on Fedora 23
 
1 Attachment(s)
Code:

[tlcoons@localhost ~]$ cd $WM_PROJECT_DIR
[tlcoons@localhost OpenFOAM-2.4.0]$ ./Allwmake > make2.log 2>&1
[tlcoons@localhost OpenFOAM-2.4.0]$ icofoam --help
bash: icofoam: command not found...
[tlcoons@localhost OpenFOAM-2.4.0]$

I attached the make2.log compressed as make2.log.gz
I'm not sure what to look for concerning icofoam command?
Thanks for your help.

tlcoons May 7, 2016 00:36

Problems installing OpenFOAM 2.4.0 on Fedora 23
 
1 Attachment(s)
I started getting errors when autoRefineMesh was being compiled.
Code:

      -lautoMesh -lbarotropicCompressibilityModel -lsolidThermo -lfluidThermophysicalModels -lblockMesh -lchemistryModel -lcoalCombustion -lcompressibleLESModels -lcompressibleRASModels -lcompressibleTurbulenceModel -lconversion -ldecompositionMethods -ldistributed -ldistributionModels -ldsmc -ldynamicFvMesh -ldynamicMesh -ledgeMesh -lengine -lfieldFunctionObjects -lfileFormats -lfiniteVolume -lfoamCalcFunctions -lforces -lfvMotionSolvers -lgenericPatchFields -lincompressibleLESModels -lincompressibleRASModels -lincompressibleTransportModels -lincompressibleTurbulenceModel -linterfaceProperties -lIOFunctionObjects -ljobControl -llagrangian -llagrangianIntermediate -llaminarFlameSpeedModels -lLESdeltas -lLESfilters -lliquidMixtureProperties -lliquidProperties -lmeshTools -lmolecularMeasurements -lmolecule -lODE -lOpenFOAM -lpotential -lradiationModels -lrandomProcesses -lreactionThermophysicalModels -lreconstruct -lsampling -lSLGThermo -lsolidMixtureProperties -lsolidParticle -lsolidProperties -lspecie -lsurfaceFilmModels -lsurfMesh -lsystemCall -lthermophysicalFunctions -ltopoChangerFvMesh -ltriSurface -ltwoPhaseProperties -lutilityFunctionObjects -lOpenFOAM -ldl  -lm -o /home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/bin/foamDebugSwitches
/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/lib/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()'
collect2: error: ld returned 1 exit status
/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/wmake/Makefile:149: recipe for target '/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/bin/autoRefineMesh' failed
@                                                                             
                                                              311,1        12%
/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/lib/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()'
collect2: error: ld returned 1 exit status
/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/wmake/Makefile:149: recipe for target '/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/bin/autoRefineMesh' failed
make[3]: *** [/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/bin/autoRefineMesh] Error 1
/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/wmake/MakefileApps:39: recipe for target 'autoRefineMesh' failed
make[2]: *** [autoRefineMesh] Error 2
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/src/dynamicMesh/lnInclude -I/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/src/meshTools/lnInclude -I/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude  -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/collapseEdges.o -L/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/lib \
    -ldynamicMesh -lmeshTools -lfiniteVolume -lOpenFOAM -ldl  -lm -o /home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/bin/collapseEdges
/home/tlcoons/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/lib/libreactionThermophysicalModels.so: undefined reference to `yyFlexLexer::yywrap()'
  collect2: error: ld returned 1 exit status
@                                                                                                                                          315,1        13%

Thanks for your help.

wyldckat May 8, 2016 13:56

Quick answer: Sorry, I didn't know that Fedora 23 had upgraded their Flex version. I've updated the instructions here: https://openfoamwiki.net/index.php/I...dora#Fedora_23

To fix the problem you're having, please run the following commands:
Code:

#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR
 
#Change how the flex version is checked
find src applications -name "*.L" -type f | xargs sed -i -e 's=\(YY\_FLEX\_SUBMINOR\_VERSION\)=YY_FLEX_MINOR_VERSION < 6 \&\& \1='

And then you can try building again, by running:
Code:

#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR
 
# This next command will take a while... somewhere between 30 minutes to 3-6 hours.
./Allwmake > log.make 2>&1
 
#Run it a second time for getting a summary of the installation
./Allwmake > log.make 2>&1


dkokron May 12, 2016 10:19

Thank you Bruno! Seems a recent update to my F22 system installed to offending flex version. This post got me going again.

agustinvo October 18, 2017 09:27

Hello

I have tried the same with OpenFOAM 2.3.X in Fedora 26 and it works


All times are GMT -4. The time now is 12:38.