darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.4k stars 441 forks source link

TARGET_OS_EMBEDDED not defined #1023

Open stackotter opened 3 years ago

stackotter commented 3 years ago

Build Log

I am following the build instructions for Ubuntu 20.04 on Ubuntu 21.04 and for some reason it seems TARGET_OS_EMBEDDED is not getting defined. The same error also happened for Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h and I manually removed the if because I know I'm building them for macOS but it seems like quite a few files use TARGET_OS_EMBEDDED.

In file included from /home/stackotter/darling/darling/src/kernel/emulation/linux/unistd/getgroups.c:6:
/home/stackotter/darling/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:200:5: error: 'TARGET_OS_EMBEDDED' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
#if TARGET_OS_EMBEDDED

System Information

Software Version
Clang 10.0.0
CMake 3.18.4
Linux Kernel 5.11.0 -31-generic
Darling Git Commit Hash
stackotter commented 3 years ago

It seems like TargetConditionals.h is not getting included but I don't really know how to manually include it