|
[Sponsors] |
May 14, 2012, 18:47 |
|
#41 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Hello,
I am trying to compile OF 1.7.1 in Kubuntu 11.10 and am getting errors. I am not sure if it is important but I already have OF 2.1.0 installed and working fine. versions: g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 flex 2.5.35 I installed the additional dependencies as suggested above: Code:
sudo apt-get install binutils-dev flex bison git-core build-essential python-dev libreadline5-dev wget zlib1g-dev cmake libpng12-dev libxt-dev libxi-dev libxrender-dev libxrandr-dev libxcursor-dev libxinerama-dev libfreetype6-dev libfontconfig1-dev libglib2.0-dev freeglut3-dev libqt4-dev qt4-dev-tools After I run: Code:
./Allwmake > make.log 2>&1 Code:
+ wmake all solvers make[1]: Entering directory `/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/DNS' make[2]: Entering directory `/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/DNS/dnsFoam' g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/randomProcesses/lnInclude -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/sampling/lnInclude -IlnInclude -I. -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOpt/dnsFoam.o -L/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt \ -lfiniteVolume -lrandomProcesses -lsampling -lmeshTools -lOpenFOAM -liberty -ldl -lm -o /home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/dnsFoam /usr/bin/ld: Make/linux64GccDPOpt/dnsFoam.o: undefined reference to symbol 'Foam::OPstream::write(Foam::Pstream::commsTypes, int, char const*, long)' /usr/bin/ld: note: 'Foam::OPstream::write(Foam::Pstream::commsTypes, int, char const*, long)' is defined in DSO /home/mdenno/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-1.4.1/libPstream.so so try adding it to the linker command line /home/mdenno/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-1.4.1/libPstream.so: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/dnsFoam] Error 1 make[2]: Leaving directory `/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/DNS/dnsFoam' make[1]: *** [dnsFoam] Error 2 make[1]: Target `application' not remade because of errors. make[1]: Leaving directory `/home/mdenno/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/DNS' make: *** [DNS] Error 2 Any thoughts? Last edited by mgdenno; May 14, 2012 at 18:51. Reason: md5sums do match |
|
May 14, 2012, 19:39 |
|
#42 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Matthew,
Well, OpenFOAM 1.7.1 isn't compatible with Gcc 4.6.1 See here: http://openfoamwiki.net/index.php/In...tion_.28GCC.29 You can either install Gcc 4.4.x that Ubuntu 11.10 has or make a custom build of Gcc 4.4.x or 4.5.x. For then using Gcc 4.4.x... there are a few explanations: GCC and other compiler issues with OpenFOAM - but the best one might be described here, "On how to use gcc44 in RHEL/CentOS/Rocks": OpenFOAM install on RHEL 5.5 Best regards, Bruno
__________________
|
|
May 14, 2012, 21:48 |
|
#43 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Bruno,
Thanks so much for the advice. It is compiling now... Matt |
|
March 5, 2022, 14:34 |
Keep geting similar errors in OpenFOAM 2.4.0
|
#44 | |
New Member
Yovanny Morales Hernández
Join Date: May 2018
Posts: 11
Rep Power: 8 |
Quote:
HTML Code:
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I../solidDisplacementFoam -ItractionDisplacementCorrectionStress -I/home/qbex/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude -I/home/qbex/OpenFOAM/OpenFOAM-2.4.0/src/meshTools/lnInclude -IlnInclude -I. -I/home/qbex/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/home/qbex/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/tractionDisplacementCorrectionFvPatchVectorField.o Make/linuxGccDPOpt/solidEquilibriumDisplacementFoam.o -L/home/qbex/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/lib \ -lfiniteVolume -lmeshTools -lOpenFOAM -ldl -lm -o /home/qbex/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/bin/solidEquilibriumDisplacementFoam /home/qbex/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/lib/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()' collect2: error: ld returned 1 exit status /home/qbex/OpenFOAM/OpenFOAM-2.4.0/wmake/Makefile:149: recipe for target '/home/qbex/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/bin/solidEquilibriumDisplacementFoam' failed make[2]: *** [/home/qbex/OpenFOAM/OpenFOAM-2.4.0/platforms/linuxGccDPOpt/bin/solidEquilibriumDisplacementFoam] Error 1 make[2]: Leaving directory '/home/qbex/OpenFOAM/OpenFOAM-2.4.0/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam' /home/qbex/OpenFOAM/OpenFOAM-2.4.0/wmake/MakefileApps:39: recipe for target 'solidEquilibriumDisplacementFoam' failed make[1]: *** [solidEquilibriumDisplacementFoam] Error 2 make[1]: Target 'application' not remade because of errors. make[1]: Leaving directory '/home/qbex/OpenFOAM/OpenFOAM-2.4.0/applications/solvers/stressAnalysis' /home/qbex/OpenFOAM/OpenFOAM-2.4.0/wmake/MakefileApps:39: recipe for target 'stressAnalysis' failed make: *** [stressAnalysis] Error 2 make: Target 'application' not remade because of errors. Thanks in advance for your time. Last edited by yMorH; March 5, 2022 at 14:37. Reason: Forgot version of gcc |
||
March 6, 2022, 08:09 |
|
#45 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
The errors state that you don't have flex installed. Did you use a system flex or a ThirdParty flex? I don't think that a ThirdParty flex is well tested at all.
|
|
March 6, 2022, 13:02 |
|
#46 | |
New Member
Yovanny Morales Hernández
Join Date: May 2018
Posts: 11
Rep Power: 8 |
Quote:
I found this tread on this website Problems installing OpenFOAM 2.4.0 on Ubuntu 16.04 and there I found a step by step guide to install OpenFOAM-2.4.0,https://openfoamwiki.net/index.php/I...u#Ubuntu_16.04 , I run all the steps in that guide and the installation run smoothly. No more errors so far. Thanks for your answer! |
||
March 6, 2022, 14:21 |
|
#47 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quite simply that your error shows the following
Code:
undefined reference to `yyFlexLexer::yywrap()' Keep in mind that you are trying to compile code that is about 6.5 years old, so the amount of help you can expect will be pretty modest. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
wmake compiling new solver | mksca | OpenFOAM Programming & Development | 14 | June 22, 2018 07:29 |
Compilation error OF1.5-dev on Suse10.3 | darenyang | OpenFOAM Installation | 0 | April 29, 2009 05:55 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |