Building webkit2-gtk with macports, errors sys/types not found Trying to build webkit2 with macports, I get 

:info:build /usr/bin/cc -c  -I/opt/local/include -fno-common
-DPERL_DARWIN -mmacosx-version-min=10.14 -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
-fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -m64 -O3   -DVERSION=\"1.85\" -DXS_VERSION=\"1.85\"  "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE"   SSLeay.c :info:build clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot] :info:build In file included from SSLeay.xs:141:
:info:build /opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE/perl.h:684:10:¡™ fatal error: 'sys/types.h' file not found 
:info:build #include &lt;sys/types.h&gt;
:info:build          ^~~~~~~~~~~~~ 
:info:build 1 error generated. :info:build make: *** [SSLeay.o] Error 1


Is sys/types.h provided by netports, or a third party POSIX-compat package?
Your problem is that you have specified a non-existent sysroot directory.

Currently you have specified the following:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk


This is usually due to either not having Xcode installed, or having it installed in the wrong version. Even if Xcode runs, it may not be "installed". Check that the App is in /Applications, if not drag it from wherever you extracted the .xip into the Applications directory.

In your case, I would suggest installing Xcode, if it's not already installed, or update it to the latest version to get the 10.14 SDK.

If you're willing to update Xcode for some reason, you can change your sysroot to match the older version of Xcode like this:

Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk


This path points to the latest installed SDK versions. Hopefully it will be enough to build webkit2, or you will be forced to update Xcode.