Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 10.13 error: unknown type name 'uint8_t' #2009

Closed
lenhsherr opened this issue Nov 17, 2017 · 11 comments

Comments

Projects
None yet
9 participants
@lenhsherr
Copy link

commented Nov 17, 2017

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?

@robertwb

This comment has been minimized.

Copy link
Contributor

commented Nov 18, 2017

Please use the mailing list or stack overflow for user support.

@robertwb robertwb closed this Nov 18, 2017

@matkam

This comment has been minimized.

Copy link

commented Dec 7, 2017

@lenhsherr have you found a solution? I haven't been able to figure this one out.

@lenhsherr

This comment has been minimized.

Copy link
Author

commented Dec 7, 2017

@matkam

This comment has been minimized.

Copy link

commented 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.

@lenhsherr

This comment has been minimized.

Copy link
Author

commented Dec 8, 2017

Thank you @matkam I just tried reinstalling brew and it solved the problem.

@sljeff

This comment has been minimized.

Copy link

commented Jan 18, 2018

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

@riparian-imakedonsky

This comment has been minimized.

Copy link

commented Feb 5, 2018

Lol. It fixed another problem with python extensions compilation i struggled with for a week also.
What a wondrous collateral damage))

Thanks for solution, @matkam

@tninja

This comment has been minimized.

Copy link

commented Mar 29, 2018

Thanks @sljeff 's solution and it works for me.

@kumarn33

This comment has been minimized.

Copy link

commented Nov 6, 2018

@sljeff Thanks for the solution, it works

@ParanoidBeing

This comment has been minimized.

Copy link

commented Mar 15, 2019

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

Thank you for this.

@chuksugwuh

This comment has been minimized.

Copy link

commented Apr 9, 2019

I was able to find a workaround. I went to /usr/local/include and rename the include folder to anything else. Then run the brew command required, e.g. brew install --HEAD libimobiledevice or brew install --HEAD usbmuxd. It'll fail to link, so go back, rename the include folder back to include and then run brew link libimobiledevice. After that it worked and all is well. I'm available to help if you need any further clarification in fixing this error. By the way I'm running MacOS Mojave 10.14.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.