|
[Sponsors] |
[OpenFOAM.com] Undefined reference to %60yyFlexLexeryywrapb |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 29, 2008, 11:34 |
Undefined reference to %60yyFlexLexeryywrapb
|
#1 |
New Member
Arjaan Buijk
Join Date: Mar 2009
Posts: 2
Rep Power: 0 |
I successfully worked through most of the installation of OpenFOAM-1.4.1 on Ubuntu 8.04 (see details at bottom), except one last issue that occurs twice, and I do not know how to fix:
undefined reference to `yyFlexLexer::yywrap()' It happens here: make[2]: Entering directory `/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/solvers/multiphase/lesInterFo am' g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -Iaveraging -I../interFoam -I/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -I/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/src/transportModels/incompressible/lnIncl ude -I/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/src/transportModels/interfaceProperties/l nInclude -I/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels -I/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels/LESdeltas/lnInclude -I/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread Make/linuxGccDPOpt/lesInterFoam.o -L/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt \ -linterfaceProperties -lincompressibleTransportModels -lincompressibleLESmodels -lfiniteVolume -lOpenFOAM -ldl -lm -o /home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/lesInterFoam /home/arjaan/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()' collect2: ld returned 1 exit status make[2]: *** [/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/lesInterFoa m] Error 1 make[2]: Leaving directory `/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/solvers/multiphase/lesInterFo am' make[1]: *** [lesInterFoam] Error 2 make[1]: Leaving directory `/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/solvers/multiphase' make: *** [multiphase] Error 2 And it happens here: make[3]: Entering directory `/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/patc h/patchIntegrate' g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread Make/linuxGccDPOpt/patchIntegrate.o -L/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt \ -lfiniteVolume -lOpenFOAM -ldl -lm -o /home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/patchIntegra te /home/arjaan/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()' collect2: ld returned 1 exit status make[3]: *** [/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/patchIntegr ate] Error 1 make[3]: Leaving directory `/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/patc h/patchIntegrate' make[2]: *** [patchIntegrate] Error 2 make[2]: Leaving directory `/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/patc h' make[1]: *** [patch] Error 2 make[1]: Leaving directory `/home/arjaan/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing' make: *** [postProcessing] Error 2 ---- Details of what I did: (-) Installed Ubuntu 8.04 (-) Downloaded OpenFOAM-1.4.1 Iterated through the installation, as follows: (-) ssh was not running See: https://help.ubuntu.com/community/SSHHowto (-) During Allwmake: g++ was not found ----------------- Typed '% g++', which told me to do this: % sudo apt-get install g++ g77 was not found ----------------- Typed '% g77', which told me to do this: % sudo apt-get install g77 flex++ was not found -------------------- Typed '% flex++', which told me to do this: % sudo apt-get install flex gmake was not found ------------------- % su % ln -s /usr/bin/make /usr/bin/gmake (as root) zlib.h was not found -------------------- See: http://www.cfd-online.com/cgi-bin/Op...cus/discus.cgi -- searched for zlib.h http://ubuntuforums.org/showthread.php?t=178493 This is a system file: /usr/include/zlib.h % sudo apt-get install build-essential (This did not fix it..) % sudo apt-get install zlib1g-dev libssl-dev X11/Xlib.h - No such file or directory -------------------------------------- See: https://lists.ubuntu.com/archives/ub...er/099230.html % sudo apt-get install libx11-dev (post includes instructions how to down-load other packages as well...) GL/gl.h - No such file or directory ----------------------------------- See: http://ubuntuforums.org/showthread.php?t=235000 % sudo apt-get install mesa-common-dev (post includes instructions how to --reinstall ...) /usr/bin/ld: cannot find -lXext ------------------------------- See: http://packages.ubuntu.com/feisty/x11proto-xext-dev % sudo apt-get install x11proto-xext-dev (did not fix it...) % sudo apt-get install libxext-dev |
|
April 29, 2008, 18:03 |
You should execute all those c
|
#2 |
New Member
Bernd F.
Join Date: Mar 2009
Posts: 18
Rep Power: 17 |
You should execute all those commands like
"sudo apt-get install g++" (then you have to enter the root password of your machine.) However I can't believe that you really have an error saying "g++ not found" because your make output is proving that g++ is in your PATH. The "undefined reference to `yyFlexLexer::yywrap()' " may be caused by an older (or completely missing?) flex++. According to other forum posts you need version 2.5.35. Bernd |
|
April 29, 2008, 19:12 |
Bernd,
thanks for the feedbac
|
#3 |
New Member
Arjaan Buijk
Join Date: Mar 2009
Posts: 2
Rep Power: 0 |
Bernd,
thanks for the feedback. Sorry for the apparently confusing description. I actually did execute all those commands, and there are no issues anymore with g++, g77, etc. The only issue remaining is this undefined reference to yyFlexLexer::yywrap(). I double checked, and I have version 2.5.34 installed. I'll try to upgrade to 2.5.35. I can not find this version in an existing package for Ubuntu, so I might have to build it first. You mentioned other forum posts that discuss flex++, can you point me to them ? Thanks much, -Arjaan |
|
April 29, 2008, 19:36 |
>I'll try to upgrade to 2.5.35
|
#4 |
New Member
Bernd F.
Join Date: Mar 2009
Posts: 18
Rep Power: 17 |
>I'll try to upgrade to 2.5.35. I can not find this version in an existing package for Ubuntu, so I might have to build it first.
Correct. I don't say it solves your problem, but the thread below says that 2.5.35 works better than 2.5.33. >You mentioned other forum posts that discuss flex++, can you point me to them ? http://www.cfd-online.com/OpenFOAM_D.../126/6070.html |
|
May 8, 2008, 12:05 |
Hi Arjaan,
Did you fix your
|
#5 |
Member
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17 |
Hi Arjaan,
Did you fix your flex++ problem? I have exactly the same problem and, despite I have tried to compile OF with different flex versions, the problem persists. Any suggestion? elisabet |
|
May 8, 2008, 14:25 |
Ok, I get it.
I found the a
|
#6 |
Member
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17 |
Ok, I get it.
I found the answer here: http://the-free-meme.blogspot.com/20...rap-it-up.html So, I just substituted the line: extern "C" int yywrap() with int yyFlexLexer::yywrap() in 5 files: 1. $WM_PROJECT_DIR/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L 2. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam .L 3. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent MeshToFoam.L 4. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMe shToFoam.L 5. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L Now, OF-1.4.1 works perfectly on Ubuntu 8.04 under a 64 bit machine. elisabet |
|
May 8, 2008, 17:28 |
Since flex is supplied, I do n
|
#7 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
Since flex is supplied, I do not understand why it is necessary to install it. I had the same problem, having to install flex, zlib-devel and some others to compile the 1.4.1-dev
|
|
May 17, 2008, 15:17 |
Hi.
Since I'm compiling OF on
|
#8 |
New Member
peter anderson
Join Date: Mar 2009
Posts: 2
Rep Power: 0 |
Hi.
Since I'm compiling OF on Ubuntu 8.04 I will ask about my problem here. So far I've followed the advice given above, but now I get : Make/linuxGccDPOpt/multiphaseMixture.o:multiphaseMixture.C: (.text+0x8210): first defined here Make/linuxGccDPOpt/multiphaseMixture.o: In function `Foam::multiphaseMixture::solveAlphas(int, bool, double)': multiphaseMixture.C : (.text+0x82e0): multiple definition of `Foam::multiphaseMixture::solveAlphas(int, bool, double)' Make/linuxGccDPOpt/multiphaseMixture.o:multiphaseMixture.C: (.text+0x82e0): first defined here Make/linuxGccDPOpt/multiphaseMixture.o: In function `Foam::multiphaseMixture::correct()': multiphaseMixture.C: (.text+0x9dc0): multiple definition of `Foam::multiphaseMixture::correct()' Make/linuxGccDPOpt/multiphaseMixture.o:multiphaseMixture.C: (.text+0x9dc0): first defined here Make/linuxGccDPOpt/multiphaseMixture.o: In function `Foam::multiphaseMixture::surfaceTensionForce() const': multiphaseMixture.C: (.text+0xa930): multiple definition of `Foam::multiphaseMixture::surfaceTensionForce() const' Make/linuxGccDPOpt/multiphaseMixture.o:multiphaseMixture.C: (.text+0xa930): first defined here Make/linuxGccDPOpt/multiphaseMixture.o: (.rodata+0x0): multiple definition of `Foam::multiphaseMixture::convertToRad' Make/linuxGccDPOpt/multiphaseMixture.o: (.rodata+0x0): first defined here Make/linuxGccDPOpt/multiphaseInterFoam.o: In function `main': multiphaseInterFoam.C: (.text+0xf0): multiple definition of `main' Make/linuxGccDPOpt/multiphaseInterFoam.o:multiphaseInterFoam.C: (.text+0xf0): first defined here collect2: ld returned 1 exit status make[2]: *** [/home/peter/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/multiphaseIn terFoam] Error 1 make[2]: Leaving directory `/home/peter/OpenFOAM/OpenFOAM-1.4.1/applications/solvers/multiphase/multiphaseI nterFoam' make[1]: *** [multiphaseInterFoam] Error 2 make[1]: Leaving directory `/home/peter/OpenFOAM/OpenFOAM-1.4.1/applications/solvers/multiphase' make: *** [multiphase] Error 2 Does anyone have some idea about this ? Thanks Peter |
|
July 21, 2008, 09:58 |
Peter,
I tried OF-1.5 on Ub
|
#9 |
New Member
Paul Chang
Join Date: Mar 2009
Posts: 11
Rep Power: 17 |
Peter,
I tried OF-1.5 on Ubuntu 8.04. The binaries provided by OF official site can be easily installed. I haven't made any test run yet. (You may need to install Qt4, which provides libQtSql.so to run ParaView) |
|
August 20, 2008, 13:25 |
Sarah,
I have the same proble
|
#10 |
New Member
MR Amiralaei
Join Date: Mar 2009
Posts: 20
Rep Power: 17 |
Sarah,
I have the same problem and I cannot find any solution. Please post if you find any. |
|
August 22, 2008, 12:58 |
I recently had the same proble
|
#11 |
Senior Member
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 17 |
I recently had the same problem and managed to find a solution. OpenFOAM comes with flex++ however it names this utility foamFlex++ which is not used during a compile to my knowledge . Rename the executable to be flex++ and compile it. Do a 'which flex++' and ensure your path is set correctly. Now you can substitute - extern "C" int yywrap() for int yywrap() - in the appropriate files. After doing this the OpenFOAM compile should work!
|
|
October 29, 2008, 07:00 |
It doesn't work for me. When I
|
#12 |
Member
Tomislav Sencic
Join Date: Mar 2009
Posts: 42
Rep Power: 17 |
It doesn't work for me. When I try to compile OF-1.4.1-dev I get the error:
/home/tom/OpenFOAM/OpenFOAM-1.4.1-dev/lib/linuxGccDPOpt/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()' I use Ubuntu 8.0. I installed flex-2.5.35, renamed foamFlex++ in flex++ (I have both). I did not find the lines extern "C" int yywrap(), I suppose it was corrected. Any help is welcome. Tomislav |
|
October 29, 2008, 12:25 |
You need to replace int yywrap
|
#13 |
Senior Member
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 17 |
You need to replace int yywrap() with extern "C" int yywrap() , not the other way around.
|
|
June 1, 2016, 13:33 |
elisabet's instructions worked for me
|
#14 | |
New Member
Pavel
Join Date: Aug 2014
Posts: 15
Rep Power: 11 |
Quote:
---- Thanks for these instructions, elisabet. This worked for me! |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Second Derivative Zero - Boundary Condition | fu-ki-pa | OpenFOAM | 11 | March 27, 2021 05:28 |
LEMOS InflowGenerator | r_gordon | OpenFOAM Running, Solving & CFD | 103 | December 18, 2018 01:58 |
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 | Attesz | OpenFOAM Installation | 45 | January 13, 2012 13:38 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
G95 + CGNS | Bruno | Main CFD Forum | 1 | January 30, 2007 01:34 |