macOS 10.13 error: unknown type name 'uint8_t'

See original GitHub issue

Hi,

I encountered this error running the very basic hello world tutorial

cythoning hello.pyx to hello.cpp
building 'hello' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.6
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/haotian/anaconda3/include -arch x86_64 -I/Users/haotian/anaconda3/include -arch x86_64 -I/Users/haotian/anaconda3/include/python3.6m -c hello.cpp -o build/temp.macosx-10.7-x86_64-3.6/hello.o -stdlib=libc++
In file included from hello.cpp:4:
In file included from /Users/haotian/anaconda3/include/python3.6m/Python.h:34:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:94:
In file included from /usr/include/stdlib.h:65:
In file included from /usr/include/sys/wait.h:110:
/usr/include/sys/resource.h:196:2: error: unknown type name 'uint8_t'
        uint8_t  ri_uuid[16];
        ^
/usr/include/sys/resource.h:197:2: error: unknown type name 'uint64_t'
        uint64_t ri_user_time;
        ^
/usr/include/sys/resource.h:198:2: error: unknown type name 'uint64_t'
        uint64_t ri_system_time;
        ^
/usr/include/sys/resource.h:199:2: error: unknown type name 'uint64_t'
        uint64_t ri_pkg_idle_wkups;
        ^
/usr/include/sys/resource.h:200:2: error: unknown type name 'uint64_t'
        uint64_t ri_interrupt_wkups;
        ^
/usr/include/sys/resource.h:201:2: error: unknown type name 'uint64_t'
        uint64_t ri_pageins;
        ^
/usr/include/sys/resource.h:202:2: error: unknown type name 'uint64_t'
        uint64_t ri_wired_size;
        ^
/usr/include/sys/resource.h:203:2: error: unknown type name 'uint64_t'
        uint64_t ri_resident_size;
        ^
/usr/include/sys/resource.h:204:2: error: unknown type name 'uint64_t'
        uint64_t ri_phys_footprint;
        ^
/usr/include/sys/resource.h:205:2: error: unknown type name 'uint64_t'
        uint64_t ri_proc_start_abstime;
        ^
/usr/include/sys/resource.h:206:2: error: unknown type name 'uint64_t'
        uint64_t ri_proc_exit_abstime;
        ^
/usr/include/sys/resource.h:210:2: error: unknown type name 'uint8_t'
        uint8_t  ri_uuid[16];
        ^
/usr/include/sys/resource.h:211:2: error: unknown type name 'uint64_t'
        uint64_t ri_user_time;
        ^
/usr/include/sys/resource.h:212:2: error: unknown type name 'uint64_t'
        uint64_t ri_system_time;
        ^
/usr/include/sys/resource.h:213:2: error: unknown type name 'uint64_t'
        uint64_t ri_pkg_idle_wkups;
        ^
/usr/include/sys/resource.h:214:2: error: unknown type name 'uint64_t'
        uint64_t ri_interrupt_wkups;
        ^
/usr/include/sys/resource.h:215:2: error: unknown type name 'uint64_t'
        uint64_t ri_pageins;
        ^
/usr/include/sys/resource.h:216:2: error: unknown type name 'uint64_t'
        uint64_t ri_wired_size;
        ^
/usr/include/sys/resource.h:217:2: error: unknown type name 'uint64_t'
        uint64_t ri_resident_size;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'gcc' failed with exit status 1

I’m using python 3.6.3, Cython 0.27.3. Any idea why this is happening?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

123reactions
sljeffcommented, Jan 18, 2018

I just removed /usr/local/include and then reinstalled llvm using homebrew. Problem solved.

72reactions
matkamcommented, Dec 7, 2017

@lenhsherr I think I figured it out. When I upgraded to Mac OS 10.13, the upgrade messed up my homebrew installation, including a bunch of header files under /usr/local/include directory. I renamed this directory and don’t see any more compilation errors. So I’ll have to remove this directory and reinstall my brew packages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot compile any C++ programs; error: unknown type name ...
I recently moved a lot of files from a MacBook Air to this machine, ... error: unknown type name 'uint8_t' uint8_t ri_uuid[16]; ...
Read more >
Undefined type name 'uint8_t' (in XCode) - C++ - Cocos Forums
Hello, I'm trying to build a base code with XCode 5.5 on macosx 10.9 and I get this error and the same for...
Read more >
T240664 Can't build on Mac OS 10.13.2 as "timer_t" is not ...
Can't build on Mac OS 10.13.2 as "timer_t" is not available on Mac OS ... pecl or dowloaded from git and using make...
Read more >
unknown type name uint8_t
When i declare uint8_t variable in my i2c.h file, i'm getting error: error: unknown type name 'uint8_t'; did you mean 'uint24_t'?
Read more >
python script error: ImportError: No module named pysam
copying pysam/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/pysam ... /usr/include/sys/resource.h:196:2: error: unknown type name 'uint8_t'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found