#900 Fresh GIT clone doesn't compile on RHEL5

S Wilson

I did a fresh clone of the github code and went through the steps on the wiki - and got the following:

mkdir dep
Using git-describe for VERSION_TAG
error: unknown option `dirty'
usage: git describe [options] <committish>*

--contains find the tag that comes after the commit
--debug debug search strategy on stderr
--all use any ref in .git/refs
--tags use any tag in .git/refs/tags
--long always use long format
--abbrev[=<n>] use <n> digits to display SHA-1s
--exact-match only output exact matches
--candidates <n> consider <n> most recent tags (default: 10)
--match <pattern> only consider tags matching <pattern>
--always show abbreviated commit object as fallback

g++ -DHAVE_CONFIG_H -I. -Ilibmisc -Wall -Wshadow -Wextra -g -O2 -MD -c main.cc -o main.o
main.cc: In function ?int main(int, char**)?:
main.cc:848: error: ?VERSION_TAG? was not declared in this scope
main.cc:861: error: ?VERSION_TAG? was not declared in this scope
make: *** [main.o] Error 1

Got around this by removing the --dirty option in the makefile and re-doing ./configure, then ran "make version" per Steve Williams email suggestion.

Next - ran make again - did lots of compiling - then ran into the following:

flex -s -olexor.cc ./lexor.lex
"./lexor.lex", line 4: unrecognized %option: reentrant
make[1]: *** [lexor.cc] Error 1
make[1]: Leaving directory `/home/stevew/work/iverilog/vhdlpp'

If I edit the Makefile further and remove the vhdl related targets it will build.

bison 2.6
flex 2.5.4
gcc 4.1.2
uname -a
Linux santour 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux


  • Cary R.

    Cary R. - 2012-08-06
    • priority: 5 --> 4
    • milestone: --> devel
  • Cary R.

    Cary R. - 2012-08-06

    Removing --dirty from the git call is an option to get things to compile. I don't remember exactly why it was added and I know the option was added in more recent version of git. If you upgrade to a newer version of git then this issue can be avoided.

    When Steve was working on the vhdlpp (VHDL front end) he needed to create a reentrant parser and newer version of flex support this. I believe you need something in the 2.5.33 range to get this to compile correctly.

    FYI on my RHEL 5 machine I have installed git 1.7.6 and flex 2.5.35 and everything compiles as expected. I'm assuming upgrading git and flex should make the same possible for you. I'll look into seeing if we can add checks for acceptable git/flex version to the configure script. I'm dropping the priority since this is really compilation tools that are out of date not a real Icarus problem.

  • Stephen Williams

    • status: open --> open-works-for-me
  • Stephen Williams

    Updated version of flex and git are indeed required. The "--dirty" flag in the call to git can be removed in the code that builds the version (and you will lose some detail) but vhdlpp simply will not build without a newer flex. We should document minimum version requirements in the wiki.

  • Stephen Williams

    • status: open-works-for-me --> closed-works-for-me
  • Stephen Williams

    This is a tools version issue, so fixed by documentation.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks