<p>I get the same error using OS X 10.9 MBPR.</p>

<p>Even though I followed <a href="http://atomton.roon.io/compiling-cudaminer-on-os-x-10-9" rel="nofollow">http://atomton.roon.io/compiling-cudaminer-on-os-x-10-9</a> exactly.</p>

<p>UPDATE: PROBLEM SOLVED.</p>

<p>by changing 
include malloc.h
to 
include malloc/malloc.h</p>

<p>in both scrypt-jane.cpp
and sha3.cpp</p>

CC BY-SA 3.0
2014-02-21T18:33:04.247Z
This helped, also had to edit scrypt.cpp
Nicolas S
CC BY-SA 3.0
2014-02-20T06:07:30.993Z
2014-02-20T07:18:36.147Z
2014-02-20T07:18:36.147Z
trevor
<p>I had this error trying to compile mcrypt. Here is how to use the configure command with CPPFLAGS</p>

<pre><code>./configure CPPFLAGS=-I/usr/include/malloc/
</code></pre>

CC BY-SA 3.0
2015-08-26T13:42:33.507Z
2015-08-26T13:42:33.507Z
Kearney Taaffe
<p>Add <code>malloc</code> library manually when compiling the file/project : 
<code>-I/usr/include/malloc/
</code></p>

CC BY-SA 3.0
2015-06-26T01:24:41.280Z
2015-06-26T01:24:41.280Z
Daniel
<p>I'm almost completely ready to GPU mine but I'm stuck on step #25 of Option #2 of this tutorial:
<a href="http://www.reddit.com/r/dogemining/wiki/index/mac_mining_guide" rel="nofollow">http://www.reddit.com/r/dogemining/wiki/index/mac_mining_guide</a></p>

<p>after running this command inside Cudaminer-master:</p>

<pre><code>make
</code></pre>

<p>I'm getting a missing file error:</p>

<pre><code>sha3.cpp:9:20: fatal error: malloc.h: No such file or directory
compilation terminated.
make[2]: *** [cudaminer-sha3.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
</code></pre>

<p>I believe that it has something to do with modifying "scrypt.cpp" for the manual installation of Cudaminer. All tutorials tell you to make sure to include malloc like so:</p>

<pre><code>#include &lt;emmintrin.h&gt;
#include &lt;malloc/malloc.h&gt;
#include &lt;new&gt;
</code></pre>

<p>It looks like the make command is still unable to find this malloc.h file, should malloc be edited in scrypt.cpp differently for OS X 10.7.5?</p>

<p>My Hackintosh PC is using an Nvidia GeForce 335m</p>

<p>I'm able to run games like BioShock on max settings and get great performance on this hackintosh, so the drivers seem to be doing great.</p>

<p>any ideas?</p>

<mac><dogecoin><gpu>
Cudaminer On Mac OS X installation error: "malloc.h: No such file or directory"
Matt Andrzejczuk
# Cudaminer On Mac OS X installation error: "malloc.h: No such file or directory"

(Asked by: username_0 on 2014-02-15)

I'm almost completely ready to GPU mine but I'm stuck on step #25 of Option #2 of this tutorial:
http://www.reddit.com/r/dogemining/wiki/index/mac_mining_guide
after running this command inside Cudaminer-master:
make

I'm getting a missing file error:
sha3.cpp:9:20: fatal error: malloc.h: No such file or directory
compilation terminated.
make[2]: *** [cudaminer-sha3.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I believe that it has something to do with modifying "scrypt.cpp" for the manual installation of Cudaminer. All tutorials tell you to make sure to include malloc like so:
#include 
#include 
#include 

It looks like the make command is still unable to find this malloc.h file, should malloc be edited in scrypt.cpp differently for OS X 10.7.5?
My Hackintosh PC is using an Nvidia GeForce 335m
I'm able to run games like BioShock on max settings and get great performance on this hackintosh, so the drivers seem to be doing great.
any ideas?

**Tags:** mac, dogecoin, gpu


---

## 3 answers

### Answer by username_1 on 2014-02-20. Score: 4

I get the same error using OS X 10.9 MBPR.

Even though I followed <http://atomton.roon.io/compiling-cudaminer-on-os-x-10-9> exactly.

UPDATE: PROBLEM SOLVED.

by changing
include malloc.h
to
include malloc/malloc.h

in both scrypt-jane.cpp
and sha3.cpp

> **Comments:**
> **username_2**: This helped, also had to edit scrypt.cpp  

---

### Answer by username_3 on 2015-08-26. Score: 3

I had this error trying to compile mcrypt. Here is how to use the configure command with CPPFLAGS
./configure CPPFLAGS=-I/usr/include/malloc/


---

### Answer by username_4 on 2015-06-26. Score: 2

Add `malloc` library manually when compiling the file/project :
`-I/usr/include/malloc/`


---

