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

Trying to make on macOS with gcc fails to find malloc.h #1

Open
sodiumnitrate opened this issue Apr 7, 2022 · 2 comments
Open

Trying to make on macOS with gcc fails to find malloc.h #1

sodiumnitrate opened this issue Apr 7, 2022 · 2 comments

Comments

@sodiumnitrate
Copy link

I'm trying to compile this on macOS (11.5.2) but it's searching for and failing to find malloc.h:

xdrf-master make
m4 conf/linux.m4 libxdrf.m4 > libxdrf.c
gcc -O -Dlinux -c libxdrf.c
libxdrf.c:153:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
^~~~~~~~~~
1 error generated.
make: *** [libxdrf.o] Error 1

My understanding is that malloc.h is deprecated and including stdlib.h for malloc is sufficient. Is there a workaround that would let me compile this? Or am I missing something?

@alexholehouse
Copy link
Contributor

You're totally right - thanks so much! I just re-wrote a bunch of the #include statements and updated to address things that have changed from Warnings to Errors. I'm currently on vacation so don't have access to a Linux machine (the university turned my VPN off yesterday!!!) but the updated version I just pushed builds on my macOS machine (12.2.1) with gcc/gfort. Not tested with icc/ifort but I'm hoping it'll build fine...

@alexholehouse
Copy link
Contributor

let me know if this solves your issue on macOS and I'll close this, but will reopen an issue iff it breaks Intel compilation and/or on Linux!

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