libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
535 stars 304 forks source link

fatal error: 'cstddef' file not found [xcode 10, mojave] #135

Closed Security111588 closed 4 years ago

Security111588 commented 5 years ago

when I run $ brew install --HEAD usbmuxd, commend line show these errors

OS 10.14.4 (18E226) xcode Version 10.2 (10E125), NO xcode9

Last 15 lines from /Users/{user}/Library/Logs/Homebrew/usbmuxd/03.make:
/usr/local/include/plist/Node.h:26:10: fatal error: 'cstddef' file not found
collection.c#include <cstddef>
         ^~~~~~~~~
:27:
In file included from /usr/local/include/string.h:25:
/usr/local/include/plist/Node.h:26:10: fatal error: 'cstddef' file not found
#include <cstddef>
         ^~~~~~~~~
1 error generated.
make[1]: *** [collection.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fvisibility=hidden -pthread -g -O2 -c thread.c -o thread.o >/dev/null 2>&1
1 error generated.
make[1]: *** [socket.lo] Error 1
make: *** [install-recursive] Error 1

I guess i need install libstdc++ or other library, but i don't kown whar i need install and how i install them or where put them. other issue didn't solved my problem. thanks a lot, my bad endlish~

nikias commented 5 years ago

The Xcode toolchain ships cstddef so I don't really understand why it can't find it...

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstddef
nikias commented 4 years ago

Try this: xcode-select --install, that should fix the issue.