Cudaminer On Mac OS X installation error: "malloc.h: No such file or directory"

3

2

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 <emmintrin.h>
#include <malloc/malloc.h>
#include <new>

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?

Matt Andrzejczuk

Posted 2014-02-15T20:26:55.337

Reputation: 41

Answers

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

trevor

Posted 2014-02-15T20:26:55.337

Reputation: 51

This helped, also had to edit scrypt.cppNicolas S 2014-02-21T18:33:04.247

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/

Kearney Taaffe

Posted 2014-02-15T20:26:55.337

Reputation: 131

2

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

Daniel

Posted 2014-02-15T20:26:55.337

Reputation: 121