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

Make Error OSX #1

Closed
HenryHoggard opened this issue Oct 21, 2013 · 3 comments
Closed

Make Error OSX #1

HenryHoggard opened this issue Oct 21, 2013 · 3 comments

Comments

@HenryHoggard
Copy link

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
12.2.1 Darwin Kernel Version 12.2.1:

When I try run make on my OSX box I get the following errors:

$ make
make -C lib
gcc -fPIC -std=gnu99 -g -c bytestream.c
bytestream.c:2:20: error: malloc.h: No such file or directory
bytestream.c: In function ‘bsalloc’:
bytestream.c:16: warning: implicit declaration of function ‘printf’
bytestream.c:16: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c:27: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)
bytestream.c:27: error: (Each undeclared identifier is reported only once
bytestream.c:27: error: for each function it appears in.)
bytestream.c:31: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c: In function ‘bsmap’:
bytestream.c:46: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c:52: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c:60: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c:76: warning: incompatible implicit declaration of built-in function ‘printf’
bytestream.c: In function ‘bssave’:
bytestream.c:250: error: ‘FILE’ undeclared (first use in this function)
bytestream.c:250: error: ‘f’ undeclared (first use in this function)
bytestream.c:250: warning: implicit declaration of function ‘fopen’
bytestream.c:254: warning: implicit declaration of function ‘fwrite’
bytestream.c:254: warning: incompatible implicit declaration of built-in function ‘fwrite’
bytestream.c:256: warning: implicit declaration of function ‘fflush’
bytestream.c:257: warning: implicit declaration of function ‘fclose’
make[1]: *** [bytestream] Error 1
make: *** [build_lib] Error 2

@rchiossi
Copy link
Owner

I dont have any computer running OSX to test, but it looks like its not finding the includes...
Try to remove malloc.h and include stdio.h

@jbremer
Copy link
Collaborator

jbremer commented Oct 21, 2013

Ah, yes, I've had the same issue. There's no malloc.h on Mac OS X - use stdlib.h.

@rchiossi
Copy link
Owner

This should be fixed already. Closing.

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

3 participants