CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OF15dev installation error (http://www.cfd-online.com/Forums/openfoam-installation/57233-of15dev-installation-error.html)

velan January 26, 2009 10:20

Hi I got the error message
 
Hi

I got the error message while installing openfoam-1.5-dev.... Does anybody knows what is that error. Earlier openfoam 1.5 was worked properly

+ wmake libso OpenFOAM
SOURCE=db/regIOobject/regIOobject.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/vc/OpenFOAM/ThirdParty/zlib-1.2.3 -IlnInclude -I. -I/home/vc/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/vc/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/regIOobject.o
lnInclude/PrimitivePatchCheck.C: In instantiation of 'Foam::PrimitivePatch<foam::face,> >':
lnInclude/polyPatch.H:79: instantiated from here
lnInclude/PrimitivePatchCheck.C:347: error: forming reference to reference type 'const Foam::pointField&'
lnInclude/PrimitivePatchCheck.C:429: error: forming reference to reference type 'const Foam::pointField&'
make: *** [Make/linuxGccDPOpt/regIOobject.o] Error 1

mike_jaworski January 26, 2009 11:52

Hi Velan, You are doing m
 
Hi Velan,
You are doing more than just installing OpenFOAM - you are compiling OpenFOAM. There are binaries available online if you don't need to compile yourself. Otherwise, did you make sure all of your package dependencies were installed? There are several forum threads that discuss the necessary items (binutils, flex, etc). I'd suggest checking those first.

Good luck!
Mike J.

mathieu January 26, 2009 13:47

Hi Velan, Once you have ins
 
Hi Velan,

Once you have installed all required packages, run the "foamInstallationTest" and make sure there are no problems except the missing icoFoam solver. Then, the compilation should work (maybe except for stuff associated with paraview; search the forum for more details on this).

Mathieu

naoko_oyama January 28, 2009 05:05

Hi Velan, I also encountere
 
Hi Velan,

I also encountered exactly the same situation. Actually I have managed to compile the previous OpenFOAM-1.5-dev released on 12th Jan, so I don't know why this time it does not work...

Hope we can solve this. Any ideas appreciated! http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Naoko

naoko_oyama February 4, 2009 06:19

Thanks to Prof.Jasak and Wikki
 
Thanks to Prof.Jasak and Wikki the problem was solved with the newer version!
(OpenFOAM-1.5-dev.General_2009-02-02.tgz)
Just a quick note.

Naoko

virginie_e February 10, 2009 04:32

Hi, I have got the followi
 
Hi,

I have got the following error message when I am trying to compile the OpenFOAM-1.5-dev version (02-02-2009)

g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/src/meshTools/lnInclude -IlnInclude -I. -I/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/refinementLevel.o -L/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt \
-lfiniteVolume -lmeshTools -lOpenFOAM -liberty -ldl -lm -o /users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt/refin ementLevel
/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld returned 1 exit status
make[3]: *** [/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt/refi nementLevel] Error 1
make[2]: *** [refinementLevel] Error 2
make[2]: Target `application' not remade because of errors.
make[1]: *** [advanced] Error 2
make[3]: Warning: File `Make/linux64GccDPOpt/dontIncludeDeps' has modification time 0.13 s in the future
make[3]: warning: Clock skew detected. Your build may be incomplete.


I have tried to close th shell and recompile again but I still have the same problem. Can soemone tell me what I should do please? Thank you a lot

Virginie

dmoroian February 10, 2009 04:58

Just a hint: your finiteVolume
 
Just a hint: your finiteVolume library is not compiled.
Try to follow the Allwmake scripts and run each command in a terminal to see exactly where it complains the first time and why.
Another hint is: try to do the compilation localy not on a nfs mounted directory. I think this is the cause of the following warning:

make[3]: Warning: File `Make/linux64GccDPOpt/dontIncludeDeps' has modification time 0.13 s in the future
make[3]: warning: Clock skew detected. Your build may be incomplete.


I hope this is helpful,
Dragos

virginie_e February 13, 2009 06:13

Thank you for your advise Drag
 
Thank you for your advise Dragos. I saw where teh problem was.

When OpenFOAM-1.5-dev compiles in the directory OpenFOAM-1.5-dev/src, everything runs fine until the following command:

wmake libso triSurface

And there is the error message i get :


SOURCE=triSurface/interfaces/STL/readSTLASCII.L ; flex --c++ -f $SOURCE ; mv lex.yy.cc Make/linux64GccDPOpt/readSTLASCII.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/users/V1117324/OpenFOAM/ThirdParty/zlib-1.2.3 -IlnInclude -I. -I/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c Make/linux64GccDPOpt/readSTLASCII.C -o Make/linux64GccDPOpt/readSTLASCII.o
SOURCE=triSurface/interfaces/GTS/writeGTS.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/users/V1117324/OpenFOAM/ThirdParty/zlib-1.2.3 -IlnInclude -I. -I/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/users/V1117324/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/writeGTS.o
flex: unknown flag '-'. For usage, try
flex --help
mv: cannot stat `lex.yy.cc': No such file or directory
g++: Make/linux64GccDPOpt/readSTLASCII.C: No such file or directory
g++: no input files
make: *** [Make/linux64GccDPOpt/readSTLASCII.o] Error 1
make: *** Waiting for unfinished jobs....


The problem comes from flex apparently... So I checked my flex version and the problem comes from the fact that my flex version does not have the option --c++ (flex --c++ -f $SOURCE ). The corresponding option in my case is -+

I tried to compile "manually" with this option and everything ran fine.

So my next question is the following: does someone know where I could change the options --c++ which are used to call flex into -+? Is it in a wmake file or rather in triSurface?

Another question otherwise: are there a lot of files which need to have flex with this option? If there are ten of them I can run them manually, otherwise, it will be difficult ...

I hope my problem is clear. I you need some more information, do not hesitate to ask.

Thanks,

Virginie

elorriaux February 13, 2009 06:52

Hello Virginie, the general
 
Hello Virginie,

the general compiling rules are located in the wmake directory. 'cd' to this directory, and find the file that fix this particular rule.

Generally, i don't want to waste my time exploring the different files, so i use grep (barbar method, but efficient) :

~/OpenFOAM/OpenFOAM-1.5-dev/wmake $ grep -R flex * | grep 'c++'
rules/General/flex:ltoo = flex $$SOURCE ; mv lex.yy.c $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
rules/General/flex++:# For older versions of flex, the option --c++ is not avaliable
rules/General/flex++:#Ltoo = flex++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
rules/General/flex++:Ltoo = flex --c++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
rules/General/.svn/text-base/flex++.test.svn-base:Ltoo = flex++ $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
rules/General/.svn/text-base/flex++.svn-base:# For older versions of flex, the option --c++ is not avaliable
rules/General/.svn/text-base/flex++.svn-base:#Ltoo = flex++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
rules/General/.svn/text-base/flex++.svn-base:Ltoo = flex --c++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
rules/General/.svn/text-base/flex.svn-base:ltoo = flex $$SOURCE ; mv lex.yy.c $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
rules/General/flex++.test:Ltoo = flex++ $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
rules/SiCortex64Gcc/flex++:Ltoo = flex --c++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
rules/SiCortex64Gcc/.svn/text-base/flex++.svn-base:Ltoo = flex --c++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@

Edit your rules/General/flex++ and modify the flex option.

Have fun,

Etienne.

dmoroian February 13, 2009 07:04

Hello again Virginie, I looke
 
Hello again Virginie,
I looked in the OpenFOAM-1.5-dev directory and here is the result:

grep -r -e "--c++" *
wmake/rules/General/flex++:Ltoo = flex --c++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@


I hope this is helpful,
Dragos

virginie_e February 13, 2009 10:16

Thank you very much Etienne an
 
Thank you very much Etienne and Dragos, it works fine now!

mbeaudoin February 13, 2009 10:23

Hello, You can also take in
 
Hello,

You can also take into consideration the following comments in the file: OpenFOAM-1.5-dev/wmake/rules/General/flex++

================================================== ===================
.SUFFIXES: .L

# For older versions of flex, the option --c++ is not avaliable
# Switching to flex++ is an alternative
#Ltoo = flex++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@
Ltoo = flex --c++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@

.L.dep:
$(MAKE_DEP)
================================================== ===================

Martin


All times are GMT -4. The time now is 15:23.