Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issue under OSX #13

Closed
ajmazurie opened this issue May 23, 2013 · 6 comments
Closed

Compilation issue under OSX #13

ajmazurie opened this issue May 23, 2013 · 6 comments
Labels

Comments

@ajmazurie
Copy link

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: http://pastebin.com/5CiGgs5Q

Any help would be appreciated.

Thanks,
Aurélien

@dmcc
Copy link
Member

dmcc commented May 24, 2013

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).

@reckart
Copy link

reckart commented May 24, 2013

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

@ajmazurie
Copy link
Author

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.

@josepvalls
Copy link

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

@dmcc
Copy link
Member

dmcc commented Jul 22, 2013

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.

@dmcc
Copy link
Member

dmcc commented Aug 17, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants