roban/CosmoloPy

failed to build on macos X

guotsuan opened this issue · 2 comments

Got error:

Downloads/cosmolopy-0.4.1/cosmolopy/EH/tf_fit.c:154:2: error: implicitly declaring library function 'exit' with type 'void (int) attribute((noreturn))' [-Werror,-Wimplicit-function-declaration]
exit(1);
^
/Users/gq/Downloads/cosmolopy-0.4.1/cosmolopy/EH/tf_fit.c:154:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'

which is due to that since Xcode 12, implicit declaration is an error whereas previously it was just a warning. It should be fixed by including the necessary headers.

include the header file <stdlib.h> in tf_fit.c can fix the rror

Can you please update the repo and try reinstalling? We hopefully have already addressed this one several months ago. Please let me know if this doesn't work.

Sorry for the confusion. Yes, the new code has already fixed the problem. I used the old code from pypi.org.

Cheers,

Quan