-
Notifications
You must be signed in to change notification settings - Fork 51
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
Build error on MacOSX 10.9 #15
Comments
Thanks :-) Graham [email protected]
|
Hmm.. there seems to have been a change in compilers going to 10.9 that broke things. Remove “-Werror” from the makefile, install macports, install gcc version 4.7 in there, and use that by doing On Dec 4, 2013, at 12:33 AM, LordGenome [email protected] wrote:
|
I had a go at getting SeqPrep to compile on OS X with the newer compiler. It seems to have been choking on the inline annotations. I was able to build it by removing the inlines that it was complaining about. I'm not sure this is the ultimate solution, but it might be worth investigating why it is failing on those inlines. Unfortunately I cannot send a patch because I don't have regular access to a machine with the newer compiler. |
This just bit me as well. Removing the inlines is in fact the correct thing to do for OS X. Starting with 10.9 OS X just simlinks gcc to clang. Clang is more rigorous about implementing language standards than gcc: "inline" means something quite different in the C99 standard to what gcc interprets. Basically, you're always supposed to have a functionally equivalent non-inlined version of the function, and if it's missing, then trying to call it from another translation unit will result in missing symbols. Besides, in clang the inline directive is at best a suggestion and generally irrelevant. |
Thanks for the info! I will go through and do that unless someone beats me On Wed, Sep 24, 2014 at 12:29 PM, Anselm Levskaya [email protected]
|
Hi, |
$ make
gcc -c -Wall -Werror -O0 -g SeqPrep.c -o SeqPrep.o
gcc -c -Wall -Werror -O0 -g utils.c -o utils.o
utils.c:1062:3: error: non-constant static local variable in inline function may be different in different files [-Werror,-Wstatic-local-in-inline]
static bool warned = false;
^
./utils.h:79:1: note: use 'static' to give inline function 'revcom_char' internal linkage
inline char revcom_char(const char base);
^
static
1 error generated.
make: *** [utils.o] Error 1
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
The text was updated successfully, but these errors were encountered: