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

installation problem #4

Open
harshkumar13 opened this issue Jun 28, 2018 · 3 comments
Open

installation problem #4

harshkumar13 opened this issue Jun 28, 2018 · 3 comments

Comments

@harshkumar13
Copy link

Hi, when i run make command in macos High Sierra(64 bit). I got this error.
gcc -funroll-loops -O3 -ansi -std=c99 -pedantic-errors -Wall -I../../cfitsio/include -D_GNU_SOURCE -c main.c
main.c:4:9: fatal error: 'malloc.h' file not found
#include<malloc.h>
^~~~~~~~~~
1 error generated.
make: *** [main.o] Error 1

can somebody help me how to resolve this.

@exowanderer
Copy link

Hi @harshkumar13, yes! I had the same problem and made a pull request to address it here Created check for MACOSX with MACH #3.

An example of my edits behind the pull request can be found here:
https://github.com/exowanderer/hotpants/blob/macosx_check_malloc/main.c

The gist is that I added

#if !defined(__MACH__)
#include <malloc.h>
#endif
#if defined(__MACH__)
#include <stdlib.h>
#endif

to every *.c file that imported malloc.h. OSX does not have a real malloc.h; but the underlying malloc infrastructure is the same if we use stdlib.h

Although I haven't looked at the @acbecker's HOTPANTS master branch since February, my fork still works for me now: https://github.com/exowanderer/hotpants/

@harshkumar13
Copy link
Author

Hi,
thanks for replying, that error get solved as per your suggestions. but now a new error comes :-
main.c:14:9: fatal error: 'fitsio.h' file not found
#include<fitsio.h>
^~~~~~~~~~
1 error generated.
make: *** [main.o] Error 1
any suggestions for this one?

@exowanderer
Copy link

I think for that, I used brew to install cfitsio; i.e. brew install cfitsio. You may need to direct the hotpants Makefile towards your /usr/local/include directory.

Just in case you don't have brew: https://brew.sh/

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

No branches or pull requests

2 participants