View Issue Details

IDProjectCategoryView StatusLast Update
0001974OpenFOAMBugpublic2016-01-18 19:46
Reporterprojectionist Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSArch LinuxOS Version4.3.3-2-ARCH
Product Versiondev 
Summary0001974: OpenFOAM fails to compile on Arch Linux due to flex-2.6
DescriptionA check for the version of flex, probably introduced to resolve issue #224, causes an OpenFOAM compilation to fail.
Steps To ReproduceThe code in question:

#if YY_FLEX_SUBMINOR_VERSION < 34
extern "C" int yywrap()
#else
int yyFlexLexer::yywrap()
#endif
{
    return 1;
}

The command

find . -type f | xargs grep '#if YY_FLEX_SUBMINOR_VERSION < 34' | wc

shows that 14 files are affected.
Additional InformationChanging the check to

#if YY_FLEX_SUBMINOR_VERSION < 34 && YY_FLEX_MINOR_VERSION < 6

allows a minimal example on my system to compile correctly.



Attached is a minimal example.
Extract and run the following commands:


flex test.ll
g++ -c lex.yy.cc
g++ -o test test.c lex.yy.o
./test
echo $?


It should compile, and the last command should return 42.
TagsNo tags attached.

Activities

projectionist

2016-01-18 19:28

reporter  

flexTest.tar.gz (307 bytes)

projectionist

2016-01-18 19:31

reporter   ~0005854

This issue with flex-2.6 was also reported in:

http://www.cfd-online.com/Forums/openfoam-installation/163986-building-openfoam-3-0-archlinux.html
http://www.cfd-online.com/Forums/openfoam-installation/164682-installation-issues-flex-2-6-0-inelegant-solution.html

henry

2016-01-18 19:46

manager   ~0005855

Thanks for the report and proposed fix.
Resolved by commit a4eabffbacfa8e4648f044e3d4c2a74d722a2b47

Issue History

Date Modified Username Field Change
2016-01-18 19:28 projectionist New Issue
2016-01-18 19:28 projectionist File Added: flexTest.tar.gz
2016-01-18 19:31 projectionist Note Added: 0005854
2016-01-18 19:46 henry Note Added: 0005855
2016-01-18 19:46 henry Status new => resolved
2016-01-18 19:46 henry Resolution open => fixed
2016-01-18 19:46 henry Assigned To => henry