Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

build failed on os x #108

Open
bin-zhao opened this issue Mar 30, 2017 · 3 comments
Open

build failed on os x #108

bin-zhao opened this issue Mar 30, 2017 · 3 comments

Comments

@bin-zhao
Copy link

OS X version: 10.11.6
GCC version: Apple LLVM version 8.0.0 (clang-800.0.42.1)
Bash command: gcc -c -I ../Include -isysroot ./build/macosx10.11/ -arch i386 *.cpp
Fatal error:

In file included from ./RakMemoryOverride.h:30:
./RakAlloca.h:18:10: fatal error: 'malloc/malloc.h' file not found
#include <malloc/malloc.h>
         ^
1 error generated.
In file included from BitStream.cpp:20:
In file included from ./BitStream.h:24:
In file included from ./RakMemoryOverride.h:30:
./RakAlloca.h:18:10: fatal error: 'malloc/malloc.h' file not found
#include <malloc/malloc.h>
         ^
1 error generated.
In file included from CCRakNetSlidingWindow.cpp:11:
In file included from ./CCRakNetSlidingWindow.h:47:
In file included from ./RakNetTypes.h:29:
./SocketIncludes.h:54:11: fatal error: 'unistd.h' file not found

etc.
@Luke1410
Copy link

Luke1410 commented Aug 8, 2017

I tested this a few weeks ago and didn't run into this issue. This sounds like a configuration issue on your build environment to me. Can you confirm that you get the issue when building RakNet using the cmake generated project files?

@phoenixgou
Copy link

phoenixgou commented Aug 17, 2017

@Luke1410
I encountered the same problem on osx 10.12.6
Can not find file for <malloc / malloc.h>
I found the osx system and found that there is no one place to have this file.
I ask you how to get this file?
thanks first!~

@Luke1410
Copy link

Luke1410 commented Aug 17, 2017

@phoenixgou / @bin-zhao Try to substitute line 18 in RakAlloc.h with this one:

#include <stdlib.h>

Does that solve the compile error for you?

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

No branches or pull requests

3 participants