Skip to content


Compilation issue under OSX #13

ajmazurie opened this Issue · 6 comments

4 participants


When attempting to compile BLIIP through TEES, and later directly, I got the following problems:

-- first, I get a "invalid value '6' in '-O6'" when best-parses is compiled ('make -C second-stage/programs/features best-parses'). It seems that the OSX clang compiler (version 4.2 on my 10.7.5 box) doesn't accept optimization levels that high. Setting it to 3 appears to fix this problem. Note: the compilation of parseIt ('make -C first-stage/PARSE parseIt') uses -O3 instead of -O6; not sure why

-- second, once the optimization flag is changed, I get the following compilation errors:

Any help would be appreciated.


Brown Laboratory for Linguistic Information Processing member

Thanks for the report. I've never used clang before and historically the parser has only worked with gcc/g++ (sometimes not even that...). Is gcc/g++ an option for you? I'm not sure when I'll be able to get to this.

I'm not sure why the optimization is set so high (I'm fine with lowering it to -O3). The parser's Makefile unfortunately does its own things in terms of $CFLAGS and the like (this could certainly be improved).


It looks like the parser is successfully building on OS X 10.8.3 with XCode 4.6.2 using the command

CXX=g++ make

written just like this, all in one line


Thanks reckart! Setting the environment variable CXX to 'g++' did it. That, plus hard-coding the optimization level to 3, solved all compilation issues I had.


Thanks for the tip. Changing the env. variable worked and I did not need to change the optimization level.
Even though the parser gets compiled but I am still getting some errors from the Makefile.
make[1]: *** No rule to make target -lm', needed bysparseval'. Stop.
make: *** [SParseval/src/sparseval] Error 2

Brown Laboratory for Linguistic Information Processing member

Can you try removing the "-lm" from the end of the dependencies in the SParseval/ Makefile? That is, the first line should not end in "-lm" but the following line starting with "$(CC)" should.

Brown Laboratory for Linguistic Information Processing member

I'm closing this bug for now. Please reopen if the above didn't work.

@dmcc dmcc closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.