Opened 5 years ago
Last modified 2 years ago
#59772 closed defect
python38: fails on Leopard: Undefined symbols: :info:build "_pthread_threadid_np" — at Initial Version
Reported by: | kencu (Ken) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | leopard tiger | Cc: | |
Port: | python38 |
Description
:info:build Undefined symbols: :info:build "_pthread_threadid_np", referenced from: :info:build _PyThread_get_thread_native_id in libpython3.8.a(thread.o)
that symbol exists on SnowLeopard and later. In llvm-9.0, I handled it like this:
diff --git llvm_master/lib/Support/Unix/Threading.inc macports_master/lib/Support/Unix/Threading.inc index ed9a9656305..e8f9a13860f 100644 --- llvm_master/lib/Support/Unix/Threading.inc +++ macports_master/lib/Support/Unix/Threading.inc @@ -14,6 +14,7 @@ #include "llvm/ADT/Twine.h" #if defined(__APPLE__) +#include <Availability.h> #include <mach/mach_init.h> #include <mach/mach_port.h> #endif @@ -153,8 +154,10 @@ void llvm::set_thread_name(const Twine &Name) { ::pthread_setname_np(::pthread_self(), "%s", const_cast<char *>(NameStr.data())); #elif defined(__APPLE__) +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 ::pthread_setname_np(NameStr.data()); #endif +#endif } void llvm::get_thread_name(SmallVectorImpl<char> &Name) { --
Note: See
TracTickets for help on using
tickets.