View Issue Details

IDProjectCategoryView StatusLast Update
0000224OpenFOAM[All Projects] Bugpublic2011-06-22 12:31
ReporterjherbAssigned Tohenry 
Status resolvedResolutionfixed 
PlatformRedHatEnterpriseLinuxServer 5.4OSLinux 2.6.18-164.el5OS Version(please specify)
Product Version 
Fixed in Version 
Summary0000224: Build error due to problem with flex/flex++ rules
DescriptionThe compilation of OpenFOAM-2.0.0 produces an error during build:
$ pwd
$ wmake
SOURCE=meshTriangulation/meshTriangulation.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/net_opt/OpenFOAM/OpenFOAM-2.0.0/src/fileFormats/lnInclude -IlnInclude -I. -I/net_opt/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude -I/net_opt/OpenFOAM/OpenFOAM-2.0.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/meshTriangulation.o
In file included from meshTriangulation/meshTriangulation.C:26:0:
meshTriangulation/meshTriangulation.H:42:24: fatal error: triSurface.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/meshTriangulation.o] Error 1
[hej@nec-gar04 triSurface]$
Steps To ReproduceBuild the triSurface libso
Additional InformationThe problem can be fixed by changing the rules files (add space after option "-o" in call to flex in flex/flex++:

ltoo = flex -o $*.c $$SOURCE ; $(cc) $(cFLAGS) -c $*.c -o $@
        add space here

Ltoo = flex -+ -o $*.C -f $$SOURCE ; $(CC) $(c++FLAGS) -c $*.C -o $@
           add space here

TagsNo tags attached.



2011-06-21 11:32

reporter   ~0000468

$ flex --version
flex version 2.5.4


2011-06-21 11:39

manager   ~0000469

In OpenFOAM-2.0.x/wmake/rules/General:

dm(207) grep flex *
flex:ltoo = flex -o $*.c $$SOURCE ; $(cc) $(cFLAGS) -c $*.c -o $@
flex++:Ltoo = flex -+ -o $*.C -f $$SOURCE ; $(CC) $(c++FLAGS) -c $*.C -o $@

i.e. there already is a space after the "-o"


2011-06-21 17:47

reporter   ~0000471

Sorry, I meant the oposite:
The space has to be removed. See man page of flex:

       flex - fast lexical analyzer generator

       flex [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton] [--help --version] [filename ...]


2011-06-22 12:31

manager   ~0000476

The flex command-line option handling is different between versions 2.5.35 and 2.5.4 but luckily the "-o" options without a following space is supported by both versions so I have committed the change: e7e5f60fcaf30cdef1a8d05c640618cee34560dd

Thanks for reporting.

Issue History

Date Modified Username Field Change
2011-06-21 11:31 jherb New Issue
2011-06-21 11:32 jherb Note Added: 0000468
2011-06-21 11:39 henry Note Added: 0000469
2011-06-21 17:47 jherb Note Added: 0000471
2011-06-22 12:31 henry Note Added: 0000476
2011-06-22 12:31 henry Status new => resolved
2011-06-22 12:31 henry Resolution open => fixed
2011-06-22 12:31 henry Assigned To => henry