CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Canbt compile libso autoMesh OF15 (https://www.cfd-online.com/Forums/openfoam-bugs/62453-canbt-compile-libso-automesh-of15.html)

andersking July 15, 2008 08:15

Hi, I am trying to compile
 
Hi,

I am trying to compile 1.5 from the source, all is fine except for lib autoMesh.

The error I get is

+ wmake libso autoMesh
SOURCE=autoHexMesh/autoHexMeshDriver/autoRefineDriver.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/anders/OpenFOAM/OpenFOAM-1.5/src/decompositionAgglomeration/decompositio nMethods/lnInclude -I/home/anders/OpenFOAM/OpenFOAM-1.5/src/dynamicMesh/lnInclude -I/home/anders/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/home/anders/OpenFOAM/OpenFOAM-1.5/src/lagrangian/basic/lnInclude -I/home/anders/OpenFOAM/OpenFOAM-1.5/src/meshTools/lnInclude -I/home/anders/OpenFOAM/OpenFOAM-1.5/src/edgeMesh/lnInclude -I/home/anders/OpenFOAM/OpenFOAM-1.5/src/triSurface/lnInclude -IlnInclude -I. -I/home/anders/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/anders/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/autoRefineDriver.o
/home/anders/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/PtrList.C: In copy constructor 'Foam::PtrList<t>::PtrList(const Foam::PtrList<t>&) [with T = Foam::featureEdgeMesh]':
autoHexMesh/autoHexMeshDriver/autoRefineDriver.C:260: instantiated from here
/home/anders/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/PtrList.C:56: error: invalid conversion from 'Foam::IOobject*' to 'Foam::featureEdgeMesh*'
make: *** [Make/linuxGccDPOpt/autoRefineDriver.o] Error 1


I am compiling with gcc-4.2.3 (ubuntu system compiler)

I will try to use the binary package for now.

Good work, though, looking forward to testing this out.

Cheers,
Andrew

olesen July 15, 2008 08:35

I've recompiled everything fro
 
I've recompiled everything from source (except the docs), using gcc-4.3.1 and the top-level OpenFOAM-1.5/Allwmake.

Everything went fine, so it looks like a gcc issue to me. I'm using SuSE 10.3 (64-bit) with the ThirdParty gcc.

The new bin/buildParaView3.3-cvs script also worked fine, but I fortunately already had the correct Qt installed. This can sometimes be a really annoying issue with paraview. If you've already compile paraview from cvs sources, you might need to do a fresh cvs checkout - there are sometimes leftover cmake files that confuse newer builds.

gschaider July 18, 2008 09:06

Hi Andrew! I think the prob
 
Hi Andrew!

I think the problem you are experiencing is a problem with old gcc-versions. I did a small workaround for that in order to get it to compile with gcc-4.0.1 on my Mac. Have a look at the first patch-file in the thread http://www.cfd-online.com/OpenFOAM_D...tml?1216382195 and edit autoRefineDriver.C (don't apply the whole patch unless you feel lucky)

Bernhard

roth July 20, 2008 10:37

Thank you Bernhard. Does the
 
Thank you Bernhard. Does the trick.

Note the hand-patched source is below:

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif autoRefineDriver.C.gz

Michael

andersking July 20, 2008 23:54

Hi Bernhard, Thanks for th
 
Hi Bernhard,

Thanks for that. I'll give it a try at some point - In the end I relented and installed all the Thirdparty binaries.

Cheers
Andrew

DSpreitz May 16, 2009 13:31

wmake libso autoMesh fails to compile
 
Hi,

As I wanted to upgrade from OF1.5 to 1.5-dev I did the svn checkout and so forth, updated my .bashrc and tried compiling 1.5-dev.
As I already suspected some errors to pop up, I decided to compile stuff seperately and not to use the top level Allwmake script. So I started in ~/OpenFOAM/OpenFOAM-1.5-dev/src$ by running the Allwmake script there.

However, once it tries to compile autoMesh it fails, for reasons beyond my understanding. Can somebody help me with this issue, please?

Here is some information about my system and the actual log off wmake libso autoMesh:
================================================== ====
Code:

user@pelican:~/OpenFOAM/OpenFOAM-1.5-dev/src/autoMesh$ which gcc
/home/user/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin/gcc
user@pelican:~/OpenFOAM/OpenFOAM-1.5-dev/src/autoMesh$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr/tmp/gcc-4.3.1 --exec-prefix=/usr/tmp/gcc-4.3.1 --enable-languages=c,c++ --enable-shared --enable-__cxa_atexit --disable-checking --with-system-zlib
Thread model: posix
gcc version 4.3.1 (GCC)
user@pelican:~/OpenFOAM/OpenFOAM-1.5-dev/src/autoMesh$ which flex
/usr/bin/flex
user@pelican:~/OpenFOAM/OpenFOAM-1.5-dev/src/autoMesh$ which flex++
/usr/bin/flex++

================================================== ====
================================================== ====
Code:

user@pelican:~/OpenFOAM/OpenFOAM-1.5-dev/src/autoMesh$ head -n20 log_compile_autoMesh
g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -I/home/user/OpenFOAM/OpenFOAM-1.5-dev/src/decompositionAgglomeration/decompositionMethods/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5-dev/src/dynamicMesh/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5-dev/src/lagrangian/basic/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5-dev/src/meshTools/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5-dev/src/edgeMesh/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5-dev/src/triSurface/lnInclude -IlnInclude -I. -I/home/user/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude  -fPIC -pthread Make/linuxGccDPOpt/autoLayerDriver.o Make/linuxGccDPOpt/autoLayerDriverShrink.o Make/linuxGccDPOpt/autoSnapDriver.o Make/linuxGccDPOpt/autoRefineDriver.o Make/linuxGccDPOpt/autoHexMeshDriver.o Make/linuxGccDPOpt/layerParameters.o Make/linuxGccDPOpt/refinementParameters.o Make/linuxGccDPOpt/snapParameters.o Make/linuxGccDPOpt/pointData.o Make/linuxGccDPOpt/meshRefinementBaffles.o Make/linuxGccDPOpt/meshRefinement.o Make/linuxGccDPOpt/meshRefinementMerge.o Make/linuxGccDPOpt/meshRefinementProblemCells.o Make/linuxGccDPOpt/meshRefinementRefine.o Make/linuxGccDPOpt/refinementSurfaces.o Make/linuxGccDPOpt/shellSurfaces.o Make/linuxGccDPOpt/trackedParticle.o Make/linuxGccDPOpt/trackedParticleCloud.o -L/home/user/OpenFOAM/OpenFOAM-1.5-dev/lib/linuxGccDPOpt \
          -lOpenFOAM -ldl  -lm -o OpenFOAM.out
/usr/lib/crt1.o: In function `_start':
/build/buildd/glibc-2.9/csu/../sysdeps/i386/elf/start.S:115: undefined reference to `main'
Make/linuxGccDPOpt/autoLayerDriver.o: In function `Foam::autoLayerDriver::getLayerCellsFaces(Foam::polyMesh const&, Foam::addPatchCellLayer const&, Foam::List<bool>&, Foam::List<bool>&)':
autoLayerDriver.C:(.text+0x53b): undefined reference to `Foam::addPatchCellLayer::addedCells(Foam::polyMesh const&, Foam::List<Foam::List<int> > const&)'
Make/linuxGccDPOpt/autoLayerDriver.o: In function `Foam::autoLayerDriver::doRestorePoints(Foam::removePoints&, Foam::List<int> const&)':
autoLayerDriver.C:(.text+0xaba): undefined reference to `Foam::directTopoChange::directTopoChange(Foam::polyMesh const&, bool)'
autoLayerDriver.C:(.text+0xb02): undefined reference to `Foam::removePoints::getUnrefimentSet(Foam::List<int> const&, Foam::List<int>&, Foam::List<int>&) const'
autoLayerDriver.C:(.text+0xb2b): undefined reference to `Foam::removePoints::setUnrefinement(Foam::List<int> const&, Foam::List<int> const&, Foam::directTopoChange&)'
autoLayerDriver.C:(.text+0xb64): undefined reference to `Foam::directTopoChange::changeMesh(Foam::polyMesh&, bool, bool, bool, bool)'
autoLayerDriver.C:(.text+0xc15): undefined reference to `Foam::removePoints::updateMesh(Foam::mapPolyMesh const&)'
Make/linuxGccDPOpt/autoLayerDriver.o: In function `Foam::autoLayerDriver::doRemovePoints(Foam::removePoints&, Foam::List<bool> const&)':
autoLayerDriver.C:(.text+0xf2a): undefined reference to `Foam::directTopoChange::directTopoChange(Foam::polyMesh const&, bool)'
autoLayerDriver.C:(.text+0xf46): undefined reference to `Foam::removePoints::setRefinement(Foam::List<bool> const&, Foam::directTopoChange&)'
autoLayerDriver.C:(.text+0xf7f): undefined reference to `Foam::directTopoChange::changeMesh(Foam::polyMesh&, bool, bool, bool, bool)'
autoLayerDriver.C:(.text+0x102d): undefined reference to `Foam::removePoints::updateMesh(Foam::mapPolyMesh const&)'
Make/linuxGccDPOpt/autoLayerDriver.o: In function `Foam::autoLayerDriver::checkAndUnmark(Foam::addPatchCellLayer const&, Foam::dictionary const&, Foam::PrimitivePatch<Foam::face, Foam::IndirectList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&, Foam::fvMesh const&, Foam::Field<Foam::Vector<double> >&, Foam::List<int>&, Foam::List<Foam::autoLayerDriver::extrudeMode>&)':
autoLayerDriver.C:(.text+0x1364): undefined reference to `Foam::faceSet::faceSet(Foam::polyMesh const&, Foam::word const&, int, Foam::IOobject::writeOption)'
autoLayerDriver.C:(.text+0x139d): undefined reference to `Foam::motionSmoother::checkMesh(bool, Foam::polyMesh const&, Foam::dictionary const&, Foam::HashSet<int, Foam::Hash<int> >&)'

Regards,

Dominic

henry May 17, 2009 06:02

Have you tried upgrading to 1.5.x from the OpenCFD git repository?

henrik May 17, 2009 10:49

Dear Dominic,

I do not think it's wise to start the compilation somewhere in the middle for any release of OpenFOAM. Usually

cd $FOAM_SRC/..
rmoall
./Allwmake |& tee Allwmake.log

does most of the jobs and you can start working from the errors. So write a log and inspect.

@your particular problem: I noticed that the gcc command has "-o OpenFOAM.out" in it.

This usually happens when you use "wmake" instead of "wmake libso" on a library. I understand that you use the src/Allwmake, which says "wmake libso autoMesh". How comes - I do not know ... Please try

cd $FOAM_SRC/autoMesh
wmake libso

and let us know whether it works.

Henrik

DSpreitz May 18, 2009 02:20

Hey Henrik,

Thanks for your reply. You're right, in stating, that:

Quote:

Originally Posted by henrik (Post 216402)
Dear Dominic,

I do not think it's wise to start the compilation somewhere in the middle for any release of OpenFOAM. Usually

cd $FOAM_SRC/..
rmoall
./Allwmake |& tee Allwmake.log

does most of the jobs and you can start working from the errors. So write a log and inspect.

Starting all over and beginning with the top level Allwmake solved my problems. I got the idea of compiling stuff seperately from the wiki page, which was writen for OF 1.4.1-dev.

So to conclude:
- This is not a bug, I posted in the wrong forum, sorry.
- Do NOT try to appy the instructions given in http://openfoamwiki.net/index.php/Ho...M_the_easy_way to compile OF 1.5-dev
- Use the top level Allwmake to compile


Thanks to Henry for getting me back on track.

Regards

Dominic

fatemeh.sadeghpour May 1, 2013 08:29

Hi gschaider
gschaider I know it is too late and i am sorry for bothering you.
I has uses your Idea in compling gcc-4.3.1 to compile openfoam-1.5-dev.
but after a week, I do not have any success.in configure gcc-4.3.1(after installing mpfr-2.3.2):
igure --prefix=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64 --exec-prefix=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64 --enable-languages=c,c++ --enable-shared --disable-multilib --with-mpfr=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/mpfr-2.3.2/but it has a problem and i do not know what to do:
checking LIBRARY_PATH variable... contains current directory
configure: error:
*** LIBRARY_PATH shouldn't contain the current directory when
*** building gcc
. Please change the environment variable
*** and run configure again.
make[2]: *** [configure-stage1-gcc] Error 1

please help me .
thank you.


All times are GMT -4. The time now is 08:43.