facebook / facebook/folly

bootstrap-osx-homebrew.sh - jemalloc undefined symbols on Mac OS 10.15.7

Abierto
#1,477 1 comentario 3 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
30.5k
Forks
5.9k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I'm trying to build follow the README.md instructions to build under OS X (Homebrew). The build fails with undefined symbol errors when linking logging_example:

```
[100%] Linking CXX executable logging_example
Undefined symbols for architecture x86_64:
"_MallocExtension_Internal_GetNumericProperty", referenced from:
folly::usingTCMalloc()::'lambda'()::operator()() const in libfolly.a(ExceptionString.cpp.o)
folly::getTCMallocNumericProperty(char const*, unsigned long*) in libfolly.a(ExceptionString.cpp.o)
folly::usingTCMalloc()::'lambda'()::operator()() const in libfolly.a(Singleton.cpp.o)
folly::getTCMallocNumericProperty(char const*, unsigned long*) in libfolly.a(Singleton.cpp.o)
folly::usingTCMalloc()::'lambda'()::operator()() const in libfolly.a(Demangle.cpp.o)
folly::getTCMallocNumericProperty(char const*, unsigned long*) in libfolly.a(Demangle.cpp.o)
folly::usingTCMalloc()::'lambda'()::operator()() const in libfolly.a(SymbolizePrinter.cpp.o)
...
"folly::make_queue_observer_factory(std::__1::basic_string, std::__1::allocator > const&, unsigned long)", referenced from:
folly::QueueObserverFactory::make(std::__1::basic_string, std::__1::allocator > const&, unsigned long) in libfolly.a(QueueObserver.cpp.o)
"_dallocx", referenced from:
folly::usingJEMalloc()::'lambda'()::operator()() const in libfolly.a(ExceptionString.cpp.o)
...
```

The script initially failed because it could not link against OpenSSL in the system. I was able to get around that issue by adding symlinks:

```
_ change the version number as is in your system. _
sudo ln -s /usr/local/Cellar/openssl@1.1/1.1.1h/lib/libssl.1.1.dylib /usr/local/lib/libssl.dylib
sudo ln -s /usr/local/Cellar/openssl@1.1/1.1.1h/lib/libcrypto.1.1.dylib /usr/local/lib/libcrypto.dylib
```

Looking at the installed jemalloc:

lipo -info /usr/local/Cellar/jemalloc/5.2.1_1/lib/libjemalloc.2.dylib
Non-fat file: /usr/local/Cellar/jemalloc/5.2.1_1/lib/libjemalloc.2.dylib is architecture: x86_64

nm -gU /usr/local/Cellar/jemalloc/5.2.1_1/lib/libjemalloc.2.dylib

Shows the symbols are present in the lib.

What has to be done to get this to build successfully on Catalina?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.