Talk:Static Analysis/Installing the Oink Stack

From MozillaWiki
Jump to navigation Jump to search

Cygwin issues:

The instructions for this page are Linux oriented. For Cygwin, the following changes appear to be in order:

1) There is no use of sudo 2) There is no need for gc-3.4 compatibility, since the standard gcc that comes with Cygwin (for now) is 3.4.x 3) The Oink build improperly generates several yy.cc files. These appear to be missing a closing '*/' after a function header and before a line "#ifndef NO_YYFLEXLEXER_METHODS". Specifically, the files are:

a) ast\agramlex.yy.cc - the error on line 1272 (embedded '/*' in a comment) appears to be due to a missing '*/' on line 1242, just prior to the definition of yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )

b) elkhound\gramlex.yy.cc - same error on line 1396. Fix appears to be missing '*/' on line 1366, just prior to the same yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )

c) elsa\lexer.yy.cc - same error on line 10983. Fix appears to be missing '*/' on line 10953, just prior to the same yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )

d) elsa\xml_lex.gen.yy.cc - same error on line 38785. Same fix on 38755 before same function.

And so on.... After a number of these, you'll get the following error:

xml_lexer.yy.o: In function `_ZN11yyFlexLexer6yywrapEv': /cygdrive/d/pork/oink-stack/elsa/xml_lex.gen.yy.cc:314: multiple definition of ` yyFlexLexer::yywrap()' lexer.yy.o:/cygdrive/d/pork/oink-stack/elsa/lexer.yy.cc:314: first defined here collect2: ld returned 1 exit status make[1]: *** [ccparse] Error 1 make[1]: Leaving directory `/cygdrive/d/pork/oink-stack/elsa' make: *** [all-rec] Error 1

Since the methods are identical, and both are effectively stubs, just comment one out and restart the make.

The next error you'll run into is due to spaces in your path. When you attempt to build Oink, you will, if you are like most Windows users, have a HOME defined within the "Documents and Settings" directory on you machine. This string has spaces and thus must be quoted. However, oink-stack/oink/Build.incl.mk doesn't quote the expansion of ${HOME} to take care of this possibility. You'll need to edit that file and replace ${HOME} with "${HOME}" (the double quotes must be there). This will insure that the string expansion is quoted in case it contains blanks.

NOTE: I have Cygwin installed with Unix line endings. I suspect the problems will be different (and worse) for DOS line endings.