Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

dyld: Symbol not found while installing 3.27-lts on 10.14.6 #143

Open
quizlet-chiragmedhora opened this issue Jun 2, 2021 · 3 comments
Open

Comments

@quizlet-chiragmedhora
Copy link

Description

Same issue as facebook/hhvm#8839, but on HHVM 3.27-lts

Steps to reproduce

brew upgrade
brew install hhvm@3.27-lts
hhvm

Expected behavior
HHVM starts

Actual behavior

dyld: Symbol not found: __ZN6google21kLogSiteUninitializedE
  Referenced from: /usr/local/bin/hhvm
  Expected in: /usr/local/opt/glog/lib/libglog.0.dylib
 in /usr/local/bin/hhvm

Context and Logs

Parameter Value
OS X Version: 10.14.6 Mojave
Homebrew Version: 3.1.9

Output of clang -v:

Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@fredemmott
Copy link
Contributor

I've kicked off a rebuild but:

  • if successful, it will require MacOS Catalina or above; we are no longer able to build packages for Mojave
  • I expect it to fail, due to the age of the dependencies, and that move to Catalina as a baseline also requires updating the XCode version and MacOS SDK

If issues are relatively straightforward, I should be able to resolve them, but as this release has been unsupported since 2019, I won't be able to spend much time on it or make it a priority. If there are more in-depth issues, this might need community pull requests (which I'll be happy to review), but we won't be able to drop the Catalina+ requirement.

@fredemmott
Copy link
Contributor

Initial failure:

In file included from /tmp/hhvmA3.27-lts-20210602-15073-1hfu4rm/hhvm-3.27.8/third-party/folly/src/folly/Conv.cpp:16:
In file included from /tmp/hhvmA3.27-lts-20210602-15073-1hfu4rm/hhvm-3.27.8/third-party/folly/src/folly/Conv.h:47:
In file included from /tmp/hhvmA3.27-lts-20210602-15073-1hfu4rm/hhvm-3.27.8/third-party/folly/src/folly/portability/Math.h:19:
/Applications/Xcode_12.4.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;
      ~~^

This suggests that folly isn't correctly using the MacOS SDK root, but that is being specified by homebrew, and in 3.27, folly is built using HHVM's existing CMake, so it's not clear if that's actually the problem.

This isn't a bug in folly: 3.27 needs a version of folly that is several years older than the compilers and macos sdks we have available. TBC: what's required to make the older version of folly compatible, and if there are other issues with the build.

@fredemmott
Copy link
Contributor

Partial fix for folly (not able to reproduce the original error):

Index: hhvm/third-party/folly/src/folly/String-inl.h
===================================================================
--- hhvm.orig/third-party/folly/src/folly/String-inl.h
+++ hhvm/third-party/folly/src/folly/String-inl.h
@@ -19,6 +19,7 @@
 #include <iterator>
 #include <stdexcept>

+#include <boost/type_traits.hpp>
 #include <folly/CppAttributes.h>

 #ifndef FOLLY_STRING_H_

hhvm-third-party also needs this:

diff --git a/folly/CMakeLists.txt b/folly/CMakeLists.txt
index 1b48097..2be9598 100644
--- a/folly/CMakeLists.txt
+++ b/folly/CMakeLists.txt
@@ -1,3 +1,5 @@
+# Required for new boost
+string(REPLACE "-fno-operator-names" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(FOLLY_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(FOLLY_DIR "${FOLLY_ROOT}/folly")

Then facebook/hhvm@a1b37f2 would need backporting, and it's not a clean backport.

Sorry, but I'm not able to spend more time on this at the moment; I hope I will be able to next week, but not certain.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants