|
[Sponsors] |
[OpenFOAM.org] Building OpenFOAM 3.0 on ArchLinux |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 9, 2015, 16:35 |
Building OpenFOAM 3.0 on ArchLinux
|
#1 |
New Member
Join Date: Dec 2015
Posts: 4
Rep Power: 10 |
Hello,
the last two days I tried installing OpenFoam 3.0 on my ArchLinux System, but I keep getting the same error while building the applications. Below is the first error: Code:
+ wmake -all utilities make[1]: Entering directory '/opt/OpenFOAM/OpenFOAM-3.0.0/applications/utilities/mesh' make[2]: Entering directory '/opt/OpenFOAM/OpenFOAM-3.0.0/applications/utilities/mesh/advanced' /opt/OpenFOAM/OpenFOAM-3.0.0/applications/utilities/mesh/advanced/autoRefineMesh make[3]: Entering directory '/opt/OpenFOAM/OpenFOAM-3.0.0/applications/utilities/mesh/advanced/autoRefineMesh' g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM/OpenFOAM-3.0.0/src/dynamicMesh/lnInclude -I/opt/OpenFOAM/OpenFOAM-3.0.0/src/meshTools/lnInclude -I/opt/OpenFOAM/OpenFOAM-3.0.0/src/triSurface/lnInclude -I/opt/OpenFOAM/OpenFOAM-3.0.0/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-3.0.0/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-3.0.0/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed /opt/OpenFOAM/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.o -L/opt/OpenFOAM/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/lib \ -ldynamicMesh -lmeshTools -ltriSurface -llagrangian -lOpenFOAM -ldl \ -lm -o /opt/OpenFOAM/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/bin/autoRefineMesh /opt/OpenFOAM/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/lib/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()' collect2: error: ld returned 1 exit status I use gcc 5.2 and flex 2.6 I hope someone can help, because I really don't wanna install Ubuntu Thanks, Steve |
|
December 9, 2015, 16:50 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Steve and welcome to the forum!
Any chance you can downgrade your flex installation from 2.6 to 2.5.35? Because apparently that's the origin of the problem, since apparently there is something too new in 2.6 that OpenFOAM is not yet ready to handle. Best regards, Bruno
__________________
|
|
December 9, 2015, 17:39 |
|
#3 |
New Member
Join Date: Dec 2015
Posts: 4
Rep Power: 10 |
Thanks you for response Bruno.
Luckily I found a flex-2.5.35 package on some outdated mirror, but sadly it doesn't fix the problem. Is it possible that gcc 5.2 is too new? Thanks, Steve |
|
December 9, 2015, 18:36 |
|
#4 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
Code:
foam wclean all As for GCC 5.2: it's fully supported in OpenFOAM 3.0 and it's the version used with Ubuntu 15.10. |
||
December 10, 2015, 09:05 |
|
#5 |
New Member
Join Date: Dec 2015
Posts: 4
Rep Power: 10 |
Thank you very much for your help, I build everything over night and know it works perfectly
Thanks, Steve |
|
December 26, 2015, 15:22 |
|
#6 | |
New Member
miladrakhsha
Join Date: Aug 2012
Posts: 29
Rep Power: 14 |
Quote:
It is greatly appreciated. Milad |
||
December 26, 2015, 17:32 |
|
#7 |
New Member
Join Date: Dec 2015
Posts: 4
Rep Power: 10 |
I don't know exactly what the problem was, only how I resolved the issue. Like I said I found a old version of flex on some canadian server, but I lost the link. If you don't find another old version you could try this one: https://aur.archlinux.org/packages/flex-android
But I haven't tested this one. I hope I could help a little |
|
January 17, 2016, 06:29 |
|
#8 |
New Member
Weiwen Zhao
Join Date: Dec 2013
Posts: 19
Rep Power: 12 |
Greetings Steve, Bruno and Milad!
And to whom it may concern: Recently Arch Linux upgraded flex to version 2.6.0-1. This break out the compilation for libtriSurface.so . To resolve this issue, you just need a simple patch , which is attached below: Code:
diff --git a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L index 3c732c1..558b483 100644 --- a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L +++ b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L @@ -55,7 +55,7 @@ int yyFlexLexer::yylex() // It is called by yylex but is not used as the mechanism to change file. // See <<EOF>> //! \cond dummy -#if YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_SUBMINOR_VERSION < 34 && YY_FLEX_MINOR_VERSION < 6 extern "C" int yywrap() #else int yyFlexLexer::yywrap() The package upgrade log is stored at /var/log/pacman.log. The following command show the upgrade log for flex. Code:
➜ ~ grep 'flex' /var/log/pacman.log [2014-03-31 19:12] [PACMAN] installed flex (2.5.39-1) [2015-12-08 18:28] [ALPM] upgraded flex (2.5.39-1 -> 2.6.0-1) Regards, Weiwen |
|
January 31, 2016, 12:39 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Just to wrap this thread, the issue/fix indicated by wwzhao has been fixed on OpenFOAM, as reported here: http://www.openfoam.org/mantisbt/view.php?id=1974
Looks like it was reported by the forum member from this post: http://www.cfd-online.com/Forums/ope...tml#post581443 - post #2 |
|
Tags |
archlinux, compiling, error, flex |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting Started with OpenFOAM | wyldckat | OpenFOAM | 26 | June 21, 2024 07:54 |
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin | CFDFoundation | OpenFOAM Announcements from Other Sources | 0 | January 4, 2017 07:15 |
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days | joegi.geo | OpenFOAM Announcements from Other Sources | 0 | October 1, 2016 20:20 |
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | September 21, 2016 12:50 |
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | September 14, 2016 04:19 |