Opened 4 years ago

Last modified 18 months ago

#59772 closed defect

python38: fails on Leopard: Undefined symbols: :info:build "_pthread_threadid_np" — at Version 1

Reported by: kencu (Ken) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard tiger Cc:
Port: python38

Description (last modified by kencu (Ken))

: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 a similar issue 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) {
-- 

Change History (3)

Changed 4 years ago by kencu (Ken)

Attachment: python38-fail-leopard.log added

comment:1 Changed 4 years ago by kencu (Ken)

Description: modified (diff)

Changed 4 years ago by kencu (Ken)

Note: See TracTickets for help on using tickets.