c++ - Cannot compile pyethash python package which requires C99 compiler (AFAIU). Error - Cannot open include file: 'alloca.h' -


problem

when installing pyethash manually or pip same kind of error:

fatal error c1083: cannot open include file: 'alloca.h': no such file or directory error: command 'c:\program files (x86)\microsoft visual studio 9.0\vc\bin\amd64\cl.exe' failed exit status 2

related , tried already:

similar problem no answer:

other facts:

  • successfully installed crypto , scrypt require c++ compiler.
  • there 3 files mentioned in pyethash core.c source file headers absent anywhere on drive:
    • alloca.h
    • stdint.h
    • stdlib.h

system

python 2.7.11 (v2.7.11:6d1b6a68f775, dec 5 2015, 20:40:30) [msc v.1500 64 bit (amd64)], windows 8.1 x64

...\ethash-master> python setup.py install

ps c:\pyethereum\ethash-master> python setup.py install running install running build running build_ext building 'pyethash' extension c:\program files (x86)\microsoft visual studio 9.0\vc\bin\amd64\cl.exe /c /nologo /ox /md /w3 /gs- /dndebug -ic:\python2 7\include -ic:\python27\pc /tcsrc/python/core.c /fobuild\temp.win-amd64-2.7\release\src/python/core.obj -isrc/ -std=gnu9 9 -wall cl : command line warning d9002 : ignoring unknown option '-std=gnu99' core.c c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(81) : warning c4820: 'pre attribute' : '4' bytes padding added after data member 'access' c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(96) : warning c4820: 'pre attribute' : '4' bytes padding added after data member 'nullterminated' c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(112) : warning c4820: 'po stattribute' : '4' bytes padding added after data member 'access' c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(191) : warning c4820: 'pr erangeattribute' : '4' bytes padding added after data member 'deref' c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(203) : warning c4820: 'po strangeattribute' : '4' bytes padding added after data member 'deref' c:\program files (x86)\microsoft visual studio 9.0\vc\include\io.h(60) : warning c4820: '_finddata32i64_t' : '4' bytes p adding added after data member 'name' c:\program files (x86)\microsoft visual studio 9.0\vc\include\io.h(64) : warning c4820: '_finddata64i32_t' : '4' bytes p adding added after data member 'attrib' c:\program files (x86)\microsoft visual studio 9.0\vc\include\io.h(73) : warning c4820: '__finddata64_t' : '4' bytes pad ding added after data member 'attrib' c:\program files (x86)\microsoft visual studio 9.0\vc\include\io.h(78) : warning c4820: '__finddata64_t' : '4' bytes pad ding added after data member 'name' c:\program files (x86)\microsoft visual studio 9.0\vc\include\io.h(126) : warning c4820: '_wfinddata64i32_t' : '4' bytes  padding added after data member 'attrib' c:\program files (x86)\microsoft visual studio 9.0\vc\include\io.h(131) : warning c4820: '_wfinddata64i32_t' : '4' bytes  padding added after data member 'name' c:\program files (x86)\microsoft visual studio 9.0\vc\include\io.h(135) : warning c4820: '_wfinddata64_t' : '4' bytes pa dding added after data member 'attrib' c:\program files\microsoft sdks\windows\v7.0\include\basetsd.h(114) : warning c4668: '__midl' not defined prepro cessor macro, replacing '0' '#if/#elif' c:\program files\microsoft sdks\windows\v7.0\include\basetsd.h(424) : warning c4668: '_win32_winnt' not defined preprocessor macro, replacing '0' '#if/#elif' c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(62) : warning c4820: '_iobuf' : '4' bytes padding added after data member '_cnt' c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(381) : warning c4255: '_get_printf_count_output' :  no function prototype given: converting '()' '(void)' c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdlib.h(215) : warning c4255: '_get_purecall_handler' : n o function prototype given: converting '()' '(void)' c:\python27\include\pyport.h(206) : warning c4668: 'sizeof_pid_t' not defined preprocessor macro, replacing  '0' '#if/#elif' c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(41) : warning c4820: '_exception' : '4' bytes paddi ng added after data member 'type' c:\program files (x86)\microsoft visual studio 9.0\vc\include\sys/stat.h(111) : warning c4820: '_stat32' : '2' bytes pad ding added after data member 'st_gid' c:\program files (x86)\microsoft visual studio 9.0\vc\include\sys/stat.h(127) : warning c4820: 'stat' : '2' bytes paddin g added after data member 'st_gid' c:\program files (x86)\microsoft visual studio 9.0\vc\include\sys/stat.h(143) : warning c4820: '_stat32i64' : '2' bytes padding added after data member 'st_gid' c:\program files (x86)\microsoft visual studio 9.0\vc\include\sys/stat.h(144) : warning c4820: '_stat32i64' : '4' bytes padding added after data member 'st_rdev' c:\program files (x86)\microsoft visual studio 9.0\vc\include\sys/stat.h(148) : warning c4820: '_stat32i64' : '4' bytes padding added after data member 'st_ctime' c:\program files (x86)\microsoft visual studio 9.0\vc\include\sys/stat.h(157) : warning c4820: '_stat64i32' : '2' bytes padding added after data member 'st_gid' c:\program files (x86)\microsoft visual studio 9.0\vc\include\sys/stat.h(171) : warning c4820: '_stat64' : '2' bytes pad ding added after data member 'st_gid' c:\program files (x86)\microsoft visual studio 9.0\vc\include\sys/stat.h(172) : warning c4820: '_stat64' : '4' bytes pad ding added after data member 'st_rdev' c:\python27\include\object.h(358) : warning c4820: '_typeobject' : '4' bytes padding added after data member 'tp_flags' c:\python27\include\object.h(411) : warning c4820: '_typeobject' : '4' bytes padding added after data member 'tp_version _tag' c:\python27\include\unicodeobject.h(420) : warning c4820: '<unnamed-tag>' : '4' bytes padding added after data member 'h ash' c:\python27\include\intobject.h(26) : warning c4820: '<unnamed-tag>' : '4' bytes padding added after data member 'ob_iva l' c:\python27\include\stringobject.h(49) : warning c4820: '<unnamed-tag>' : '7' bytes padding added after data member 'ob_ sval' c:\python27\include\bytearrayobject.h(26) : warning c4820: '<unnamed-tag>' : '4' bytes padding added after data member ' ob_exports' c:\python27\include\setobject.h(26) : warning c4820: '<unnamed-tag>' : '4' bytes padding added after data member 'hash' c:\python27\include\setobject.h(56) : warning c4820: '_setobject' : '4' bytes padding added after data member 'hash' c:\python27\include\methodobject.h(42) : warning c4820: 'pymethoddef' : '4' bytes padding added after data member 'ml_fl ags' c:\python27\include\fileobject.h(26) : warning c4820: '<unnamed-tag>' : '4' bytes padding added after data member 'f_ski pnextlf' c:\python27\include\fileobject.h(33) : warning c4820: '<unnamed-tag>' : '4' bytes padding added after data member 'writa ble' c:\python27\include\genobject.h(23) : warning c4820: '<unnamed-tag>' : '4' bytes padding added after data member 'gi_run ning' c:\python27\include\descrobject.h(28) : warning c4820: 'wrapperbase' : '4' bytes padding added after data member 'offset ' c:\python27\include\descrobject.h(32) : warning c4820: 'wrapperbase' : '4' bytes padding added after data member 'flags'  c:\python27\include\weakrefobject.h(37) : warning c4820: '_pyweakreference' : '4' bytes padding added after data member 'hash' c:\python27\include\pystate.h(70) : warning c4820: '_ts' : '4' bytes padding added after data member 'use_tracing' c:\python27\include\import.h(61) : warning c4820: '_frozen' : '4' bytes padding added after data member 'size' c:\python27\include\code.h(26) : warning c4820: '<unnamed-tag>' : '4' bytes padding added after data member 'co_firstlin eno' src/python/core.c(2) : fatal error c1083: cannot open include file: 'alloca.h': no such file or directory error: command 'c:\\program files (x86)\\microsoft visual studio 9.0\\vc\\bin\\amd64\\cl.exe' failed exit status 2 

question

how can compile package? (please help, 4th day now!)

alloca allocates automatic memory , jens gustedt noted not standardised.

msvcrt declares in <malloc.h> header. implementation on windows aligns common behavior on unix systems, should work expected. other parts of code might more tightly coupled unix though , may require rewrite.

the other 2 header standard c headers , should in include directory compiler automatically searches.


Comments