CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..."

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2009, 11:54
Default groovyBC: problems compiling: "flex: not found" and "undefined reference to ..."
  #1
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Maybe its the right time and place to put some questions about groovyBC into a separate thread instead of posting them into other threads about transient boundary condition.

First I have to say, I'm talking about two different computers with two different errors:

First one (running Kubuntu 9.04)

Code:
rm: Entfernen von „Make/linux64GccDPOpt/PatchValueExpressionLexer.C“ nicht möglich: No such file or directory
/bin/sh: flex: not found
mv: Aufruf von stat für „*.c“ nicht möglich: No such file or directory
g++: Make/linux64GccDPOpt/PatchValueExpressionLexer.C: No such file or directory
g++: no input files
make: *** [Make/linux64GccDPOpt/PatchValueExpressionLexer.o] Fehler 1


Second one
(running OpenSUSE 10.3)

Code:
Make/linux64GccDPOpt/groovyBCPointPatchFields.o: In function `Foam::getFvPatch(Foam::pointPatch const&)':
groovyBCPointPatchFields.C:(.text+0x33): undefined reference to `typeinfo for Foam::fvMesh'
groovyBCPointPatchFields.C:(.text+0x66): undefined reference to `Foam::fvMesh::boundary() const'
groovyBCPointPatchFields.C:(.text+0xa3): undefined reference to `typeinfo for Foam::fvMesh'
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Fehler 1
So, any ideas whats wrong?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   July 1, 2009, 12:39
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by sega View Post
Maybe its the right time and place to put some questions about groovyBC into a separate thread instead of posting them into other threads about transient boundary condition.
Good thinking

Quote:
Originally Posted by sega View Post

First one (running Kubuntu 9.04)

Code:
rm: Entfernen von „Make/linux64GccDPOpt/PatchValueExpressionLexer.C“ nicht möglich: No such file or directory
/bin/sh: flex: not found
flex is not installed on that machine. And if that is missing you'll probably have to install bison too
Second one (running OpenSUSE 10.3)

Code:
Make/linux64GccDPOpt/groovyBCPointPatchFields.o: In function `Foam::getFvPatch(Foam::pointPatch const&)':
groovyBCPointPatchFields.C:(.text+0x33): undefined reference to `typeinfo for Foam::fvMesh'
groovyBCPointPatchFields.C:(.text+0x66): undefined reference to `Foam::fvMesh::boundary() const'
groovyBCPointPatchFields.C:(.text+0xa3): undefined reference to `typeinfo for Foam::fvMesh'
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Fehler 1
So, any ideas whats wrong?
[/QUOTE]

That's a strange one. There seem to be some very essential things to be missing from libOpenFOAM.so OR the .so is missing. Did anything every get successfully compiled on that machine?

Bernhard
gschaider is offline   Reply With Quote

Old   July 1, 2009, 13:26
Default
  #3
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Did anything every get successfully compiled on that machine?
Actually not. I'm always struggling to compile OpenFOAM related things on this machine. Even funkySetFields did not work...

I'm working with this machine at the university, but as far as I know there has been big trouble to compile OpenFOAM 1.5.x at all...
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   July 1, 2009, 17:09
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by sega View Post
Actually not. I'm always struggling to compile OpenFOAM related things on this machine. Even funkySetFields did not work...

I'm working with this machine at the university, but as far as I know there has been big trouble to compile OpenFOAM 1.5.x at all...
Sorry. Then it is not a groovyBC-problem per se. From the error message my first guess would be that it can't link to the OpenFOAM library because
  1. it is not there
  2. it is of a different architecture (32/64-bit? the file-command is your friend when it comes to determining whether your .o and the .so in question fit)
  3. they are not off the same ABI (incompatible) because the c++-compiler was changed in the meantime to a much higher version
My personal recommendation: try recompiling one of the standary-applications (interFoam for example). If that doesn't work either then remove all binary stuff from that OF-version and recompile from scratch

You're on your own. Good luck
gschaider is offline   Reply With Quote

Old   July 1, 2009, 17:59
Default
  #5
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Sorry. Then it is not a groovyBC-problem per se. From the error message my first guess would be that it can't link to the OpenFOAM library because
  1. it is not there
  2. it is of a different architecture (32/64-bit? the file-command is your friend when it comes to determining whether your .o and the .so in question fit)
  3. they are not off the same ABI (incompatible) because the c++-compiler was changed in the meantime to a much higher version
My personal recommendation: try recompiling one of the standary-applications (interFoam for example). If that doesn't work either then remove all binary stuff from that OF-version and recompile from scratch

You're on your own. Good luck
Thanks for your answer. Of course I'm stuck with this. Despite I'm not that new to linux I have to make sure of what you mean, when you are talkin about

  • OpenFOAM library. What do you mean by that?
  • .o or .os files. How are they related to the system architecture?
    What about the find-command in this case?! What should I search?
  • What is ABI at all?
  • and how can I check the current C++ compiler version?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   July 2, 2009, 05:56
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by sega View Post
Thanks for your answer. Of course I'm stuck with this. Despite I'm not that new to linux I have to make sure of what you mean, when you are talkin about
I don't know either, some of the time
Quote:
Originally Posted by sega View Post
  • OpenFOAM library. What do you mean by that?
libOpenFOAM.so
Quote:
Originally Posted by sega View Post
  • .o or .os files. How are they related to the system architecture?
    What about the find-command in this case?! What should I search?
for instance on my system

file $FOAM_LIBBIN/libOpenFOAM.so

prints something like

libOpenFOAM.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

If for instance you look at a .o file with

file example.o

the output should be similar:

example.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped

Quote:
Originally Posted by sega View Post
  • What is ABI at all?
http://en.wikipedia.org/wiki/Applica...nary_interface
The ABIs of g++ are usually downward compatible. But if your OpenFOAM was compiled with a NEWER version of g++ than you are currently using (strange things happen)

Quote:
Originally Posted by sega View Post
  • and how can I check the current C++ compiler version?
which g++
g++ -v

But honestly: a recompile of your OF-installation seems to me to be the easiest solution in your case
gschaider is offline   Reply With Quote

Old   November 6, 2009, 09:28
Default
  #7
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18
Arnoldinho is on a distinguished road
Hi,

I have also started using OpenFOAM for some of my simulations. When trying to use the groovyBC condition and testing the Demo cases coming with the boundary condition, I always get the following error, which is independent of the demo I am running (circulatingSplash, pulsedPitzDaily, groovywaveTank):

Quote:
// using new solver syntax:
nuTilda
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-08;
relTol 0;
}


Reading g


cannot open file

file: /home/stahlmann/OpenFOAM/OpenFOAM-1.6/src/groovyBC/Demos/circulatingSplash/constant/g at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 62.

FOAM exiting
There is of course no g file. Do you have any ideas? I'm using Ubuntu 9.04 64-bit and OpenFOAM 1.6.

Arne

Last edited by Arnoldinho; November 6, 2009 at 09:57.
Arnoldinho is offline   Reply With Quote

Old   November 8, 2009, 06:06
Default
  #8
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
I'm not very familiar with groovyBC, but I guess you're using 1.6.x which reads the gravitational acceleration from file in <case>/constant/g file. In previous versions the file was called different. So the only thing you have to do is to look into tutorials of your OpenFOAM installation and copy the g file to your case and check the vector of gravity is heading to where you want.

good luck

matej
matejfor is offline   Reply With Quote

Old   November 9, 2009, 06:04
Default
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by matejfor View Post
I'm not very familiar with groovyBC, but I guess you're using 1.6.x which reads the gravitational acceleration from file in <case>/constant/g file. In previous versions the file was called different. So the only thing you have to do is to look into tutorials of your OpenFOAM installation and copy the g file to your case and check the vector of gravity is heading to where you want.
Matej is right. It doesn't look like a problem with groovyBC, but like one of the usual 1.5/1.6-tranhsition problems

Bernhard
gschaider is offline   Reply With Quote

Old   January 7, 2010, 05:36
Default
  #10
Member
 
Michael
Join Date: Mar 2009
Posts: 48
Rep Power: 17
farbfilm is on a distinguished road
Hello,

I think I need some help with the compilation of the groovybc!!

When I'm trying to do 'wmake libso', I get the following error:

Code:
michael@wopl:~/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/fields/fvPatchFields/derived/groovyBC> wmake libso
SOURCE=PatchResult.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -IMake/linux64GccDPOpt  -I/home/michael/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/michael/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/home/michael/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/PatchResult.o
In file included from PatchResult.C:34:
PatchResult.H:47:19: error: Field.H: No such file or directory
PatchResult.C:35:20: error: vector.H: No such file or directory
PatchResult.C:36:20: error: tensor.H: No such file or directory
PatchResult.C:37:24: error: symmTensor.H: No such file or directory
PatchResult.C:38:29: error: sphericalTensor.H: No such file or directory
In file included from PatchResult.C:34:
PatchResult.H:62: error: ‘string’ does not name a type
PatchResult.H:86: error: ‘Field’ was not declared in this scope
PatchResult.H:86: error: expected primary-expression before ‘>’ token
PatchResult.H:86: error: expected primary-expression before ‘,’ token
PatchResult.H:86: error: expected primary-expression before ‘bool’
PatchResult.H:86: error: variable or field ‘setResult’ declared void
PatchResult.H:89: error: expected initializer before ‘<’ token
PatchResult.H:93: error: ISO C++ forbids declaration of ‘string’ with no type
PatchResult.H:93: error: ‘string’ declared as an ‘inline’ field
PatchResult.H:93: error: expected ‘;’ before ‘&’ token
In file included from PatchResult.H:105,
                 from PatchResult.C:34:
PatchResultI.H:40: error: variable or field ‘setResult’ declared void
PatchResultI.H:40: error: ‘Field’ was not declared in this scope
PatchResultI.H:40: error: expected primary-expression before ‘>’ token
PatchResultI.H:40: error: ‘val’ was not declared in this scope
PatchResultI.H:40: error: expected primary-expression before ‘bool’
PatchResultI.H:50: error: expected constructor, destructor, or type conversion before ‘<’ token
PatchResultI.H:75: error: expected initializer before ‘&’ token
PatchResult.C: In constructor ‘Foam::PatchResult::PatchResult()’:
PatchResult.C:46: error: class ‘Foam::PatchResult’ does not have any field named ‘valType_’
PatchResult.C:47: error: ‘NULL’ was not declared in this scope
PatchResult.C: In copy constructor ‘Foam::PatchResult::PatchResult(const Foam::PatchResult&)’:
PatchResult.C:55: error: class ‘Foam::PatchResult’ does not have any field named ‘valType_’
PatchResult.C:56: error: ‘NULL’ was not declared in this scope
PatchResult.C: In member function ‘void Foam::PatchResult::uglyDelete()’:
PatchResult.C:82: error: ‘valType_’ was not declared in this scope
PatchResult.C:82: error: ‘pTraits’ was not declared in this scope
PatchResult.C:82: error: ‘scalar’ was not declared in this scope
PatchResult.C:82: error: ‘::typeName’ has not been declared
PatchResult.C:83: error: expected type-specifier before ‘scalarField’
PatchResult.C:83: error: expected `>' before ‘scalarField’
PatchResult.C:83: error: expected `(' before ‘scalarField’
PatchResult.C:83: error: ‘scalarField’ was not declared in this scope
PatchResult.C:83: error: expected primary-expression before ‘>’ token
PatchResult.C:83: error: expected `)' before ‘;’ token
PatchResult.C:84: error: ‘vector’ has not been declared
PatchResult.C:85: error: expected type-specifier before ‘Field’
PatchResult.C:85: error: expected `>' before ‘Field’
PatchResult.C:85: error: expected `(' before ‘Field’
PatchResult.C:85: error: ‘Field’ was not declared in this scope
PatchResult.C:85: error: ‘vector’ was not declared in this scope
PatchResult.C:85: error: expected primary-expression before ‘>’ token
PatchResult.C:85: error: expected `)' before ‘;’ token
PatchResult.C:86: error: ‘tensor’ has not been declared
PatchResult.C:87: error: expected type-specifier before ‘Field’
PatchResult.C:87: error: expected `>' before ‘Field’
PatchResult.C:87: error: expected `(' before ‘Field’
PatchResult.C:87: error: ‘Field’ was not declared in this scope
PatchResult.C:87: error: ‘tensor’ was not declared in this scope
PatchResult.C:87: error: expected primary-expression before ‘>’ token
PatchResult.C:87: error: expected `)' before ‘;’ token
PatchResult.C:88: error: ‘symmTensor’ has not been declared
PatchResult.C:89: error: expected type-specifier before ‘Field’
PatchResult.C:89: error: expected `>' before ‘Field’
PatchResult.C:89: error: expected `(' before ‘Field’
PatchResult.C:89: error: ‘Field’ was not declared in this scope
PatchResult.C:89: error: ‘symmTensor’ was not declared in this scope
PatchResult.C:89: error: expected primary-expression before ‘>’ token
PatchResult.C:89: error: expected `)' before ‘;’ token
PatchResult.C:90: error: ‘sphericalTensor’ has not been declared
PatchResult.C:91: error: expected type-specifier before ‘Field’
PatchResult.C:91: error: expected `>' before ‘Field’
PatchResult.C:91: error: expected `(' before ‘Field’
PatchResult.C:91: error: ‘Field’ was not declared in this scope
PatchResult.C:91: error: ‘sphericalTensor’ was not declared in this scope
PatchResult.C:91: error: expected primary-expression before ‘>’ token
PatchResult.C:91: error: expected `)' before ‘;’ token
PatchResult.C:92: error: expected primary-expression before ‘bool’
PatchResult.C:92: error: expected `)' before ‘bool’
PatchResult.C:93: error: expected type-specifier before ‘Field’
PatchResult.C:93: error: expected `>' before ‘Field’
PatchResult.C:93: error: expected `(' before ‘Field’
PatchResult.C:93: error: ‘Field’ was not declared in this scope
PatchResult.C:93: error: expected primary-expression before ‘bool’
PatchResult.C:93: error: expected `)' before ‘bool’
PatchResult.C:93: error: expected `;' before ‘bool’
PatchResult.C:95: error: ‘WarningIn’ was not declared in this scope
PatchResult.C:96: error: ‘endl’ was not declared in this scope
PatchResult.C:97: warning: deleting ‘void*’ is undefined
PatchResult.C:100: error: ‘valType_’ was not declared in this scope
PatchResult.C:101: error: ‘NULL’ was not declared in this scope
PatchResult.C: In member function ‘void Foam::PatchResult::operator=(const Foam::PatchResult&)’:
PatchResult.C:109: error: ‘FatalErrorIn’ was not declared in this scope
PatchResult.C:111: error: ‘FatalError’ was not declared in this scope
PatchResult.C:111: error: ‘abort’ was not declared in this scope
PatchResult.C:115: error: ‘valType_’ was not declared in this scope
PatchResult.C:115: error: ‘const class Foam::PatchResult’ has no member named ‘valType_’
PatchResult.C:118: error: ‘NULL’ was not declared in this scope
make: *** [Make/linux64GccDPOpt/PatchResult.o] Error 1

Can somebody help me??
I'm using OpenFOAM 1.6.x and Bison 2.3


Cheers Michael
farbfilm is offline   Reply With Quote

Old   January 7, 2010, 11:51
Default
  #11
Member
 
Michael
Join Date: Mar 2009
Posts: 48
Rep Power: 17
farbfilm is on a distinguished road
Well, I think I have another problem with my installation...
farbfilm is offline   Reply With Quote

Old   January 8, 2010, 03:36
Default
  #12
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
Yep. It looking at the topmost error, the shell does not know anything about your foam installation. Have you checked the foamInstallationTest ? Your comp. does not see the src I would say. Always look at the topmost error first .


good luck
matej
matejfor is offline   Reply With Quote

Old   February 17, 2010, 10:30
Default
  #13
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi Michael,

Besides the OF installtion issue you mentioned, on the groovyBC wiki it says that groovyBC is know to work with Bison 2.4.1. Maybe you need to have a look at that as well ...
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
wmake problems during custom utility compilation palazi88 OpenFOAM Programming & Development 11 August 13, 2018 21:52
OF211: ThirdParty and /src compiled, but not /applications... vkrastev OpenFOAM Installation 8 October 18, 2012 16:53
OpenFOAM 1.6 ext - Compilation errors - Fedora 17(32bit) toolpost OpenFOAM Installation 15 September 21, 2012 10:38
OpenFoam-1.7.x on Suse 11.2 (64bit) does not compile val46 OpenFOAM Installation 4 August 27, 2010 04:43
Compiling new Solver with wmake lin123 OpenFOAM 3 April 13, 2010 15:18


All times are GMT -4. The time now is 16:51.