hhvm / homebrew-hhvm

Official Mac OS X Homebrew formula for HHVM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Builds broken by MacOS SDK update

fredemmott opened this issue · comments

Placeholder task for several issues.

  • jemalloc incompatibliies
  • fmt incompatibilities (can't reproduce locally)
  • cmath issues

fmt problems start with:

In file included from /tmp/hhvm-nightly-20200327-20050-1a6pgmi/hhvm-nightly-2020.03.27/third-party/fmt/fmt/src/format.cc:8:
In file included from /tmp/hhvm-nightly-20200327-20050-1a6pgmi/hhvm-nightly-2020.03.27/third-party/fmt/fmt/include/fmt/format-inl.h:11:
In file included from /tmp/hhvm-nightly-20200327-20050-1a6pgmi/hhvm-nightly-2020.03.27/third-party/fmt/fmt/include/fmt/format.h:33:
/Applications/Xcode_11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error: no member named 'signbit' in the global namespaceusing ::signbit;
      ~~^

fmt probably resolved by updating it.

Trying to test by folly, and found new issue: #include <cmath> fails if built with brew's wrapper and full args from folly build:

clang++ -DBOOST_ALL_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_FIBER_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DFOLLY_HAVE_BITS_FUNCTEXCEPT_H=0 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_IFUNC=0 -DFOLLY_HAVE_LIBDWARF_DWARF_H=0 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LINUX_MEMBARRIER_H=0 -DFOLLY_HAVE_MALLOC_H=0 -DFOLLY_HAVE_MEMRCHR=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_HAVE_PTHREAD_ATFORK=1 -DFOLLY_HAVE_PTHREAD_SPINLOCK_T=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_SCHED_H=1 -DFOLLY_HAVE_VLA=1 -DFOLLY_HAVE_WEAK_SYMBOLS=1 -DFOLLY_NO_CONFIG=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_VERSION=\"0.1\" -DHAVE_CURL_MULTI_WAIT -DHAVE_LIBDL -DHAVE_LIBSODIUM -DNO_LIB_GFLAGS -DNO_TCMALLOC=1 -DOPENSSL_NO_RAND_EGD -DPHP_MYSQL_UNIX_SOCK_ADDR=\"/tmp/mysql.sock\" -DUSE_EDITLINE -DUSE_JEMALLOC=1 -DU_USING_ICU_NAMESPACE=1 -D_GNU_SOURCE -I/Users/fredemmott/code/hhvm/build -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/usr/local/opt/glog/include -I/Users/fredemmott/code/hhvm/third-party/re2/src -I/Users/fredemmott/code/hhvm/third-party/squangle/src -I/Users/fredemmott/code/hhvm/third-party/fb-mysql/src/include -I/usr/local/opt/pcre/include -I/usr/local/opt/libevent/include -I/usr/local/opt/libxml2/include/libxml2 -I/usr/local/opt/sqlite/include -I/usr/local/include/double-conversion -I/usr/local/opt/lz4/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/tbb/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/oniguruma/include -I/usr/local/opt/dwarfutils/include -I/usr/local/include/libelf -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/security -I/Users/fredemmott/code/hhvm/hphp -I/Users/fredemmott/code/hhvm/third-party/folly/src -I/usr/local/Cellar/libsodium/1.0.18_1/include -I/Users/fredemmott/code/hhvm/third-party/folly -I/Users/fredemmott/code/hhvm/build/third-party/jemalloc/jemallocBuild-prefix/include -isystem /usr/local/Cellar/boost/1.72.0/include  -Wno-error=array-bounds -Wno-error=switch -Wno-attributes -Wno-deprecated -Wno-invalid-offsetof -Wno-register -Wno-sign-compare -Wno-strict-aliasing -Wno-unused-function -Wno-unused-local-typedefs -Wno-unused-result -Wno-write-strings -Wno-return-type-c-linkage -Wno-unknown-warning-option -Wno-unused-command-line-argument -msse4.2 -std=gnu++1z -fno-omit-frame-pointer  -Wall -Woverloaded-virtual -Werror=format-security -Qunused-arguments -stdlib=libc++ -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk /tmp/test.cpp
In file included from /tmp/test.cpp:1:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:317:9: error: no member named 'signbit' in the global namespace
using ::signbit;

Does not fail if I use non-brew-wrapper, or if I remove the args

It appears that cmake and homebrew disagree on if xcode or CLI tools should be used, and homebrew disagrees with xcrun --show-sdk-path; homebrew clang++ is using the devtools sdk path instead.

Test case is fixed with

export HOMEBREW_SDKROOT=$(xcrun --show-sdk-path)

fmt and cmath issues fixed by b235998

heads up to @jjergus in case we end up backporting somewhere strange. I'll cherry pick a few things to the supported branches just in case.