[GHC] #7356: Building HEAD on Mac OS X 10.5 reports Undefined "_pthread_threadid_np" ref'd from _kernelThreadId in libHSrts_thr.a(OSThreads.thr_o)
GHC
cvs-ghc at haskell.org
Sun Oct 21 22:42:57 CEST 2012
#7356: Building HEAD on Mac OS X 10.5 reports Undefined "_pthread_threadid_np"
ref'd from _kernelThreadId in libHSrts_thr.a(OSThreads.thr_o)
---------------------------------+------------------------------------------
Reporter: thorkilnaur | Owner:
Type: bug | Status: new
Priority: normal | Component: Runtime System
Version: 7.7 | Keywords:
Os: MacOS X | Architecture: x86
Failure: Building GHC failed | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by spl):
* cc: leather@… (added)
Comment:
Thanks for reporting this. I sent an email to ghc-cvs and Duncan Coutts on
Oct 3 about this, but now that I have tried to search for a link to that
email, I realize that I was using the wrong "from" email address.
I traced the problem to the following commit:
{{{
commit 647ae1cfbb5ea3e2d3b1541c2bc12ea5db321134
Author: Duncan Coutts
Date: Tue Jul 3 19:18:46 2012 +0100
}}}
I wonder if it's possible to modify kernelThreadId() to do something a bit
more portable. I've seen references to the following options:
1. [http://elliotth.blogspot.nl/2012/04/gettid-on-mac-os.html
pthread_self() (using the pointer)]
1. [http://stackoverflow.com/questions/1540603/mac-iphone-is-there-a-way-
to-get-a-thread-identifier-without-using-objective-c
pthread_mach_thread_np(pthread_self())]
I'm not sure if either one is equivalent or "better." I noticed
pthread_self() is already used for osThreadId(). I have changed it locally
to the second option, which compiles, but I haven't attempted to test
threads.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7356#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list