Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,408
    • Issues 5,408
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 601
    • Merge requests 601
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #7356
Closed
Open
Issue created Oct 21, 2012 by thorkilnaur@trac-thorkilnaur

Building HEAD on Mac OS X 10.5 reports Undefined "_pthread_threadid_np" ref'd from _kernelThreadId in libHSrts_thr.a(OSThreads.thr_o)

On a Mac OS X 10.5

$ uname -a
Darwin thorkil-naurs-intel-mac-mini.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
$

a build of recent HEAD (http://darcs.haskell.org/ghcBuilder/builders/tn23/731.html) reports

"inplace/bin/ghc-stage1" -o ghc/stage2/build/tmp/ghc-stage2 -static -H32m -O -hide-all-packages -i -ighc/. -ighc/stage2/build -ighc/stage2/build/autogen -Ighc/stage2/build -Ighc/stage2/build/autogen -optP-DGHCI -optP-include -optPghc/stage2/build/autogen/cabal_macros.h -package array-0.4.0.1 -package base-4.6.0.0 -package bytestring-0.10.1.0 -package directory-1.2.0.0 -package filepath-1.3.0.1 -package ghc-7.7.20121021 -package haskeline-0.7.0.3 -package process-1.1.0.2 -package transformers-0.3.0.0 -package unix-2.6.0.0 -fno-warn-name-shadowing -Wall -XHaskell98 -XForeignFunctionInterface -XUnboxedTuples -XFlexibleInstances -XMagicHash -XNondecreasingIndentation -XCPP -XPatternGuards -O2 -threaded -no-user-package-db -rtsopts -odir ghc/stage2/build -hidir ghc/stage2/build -stubdir ghc/stage2/build -hisuf hi -osuf o -hcsuf hc ghc/stage2/build/Main.o ghc/stage2/build/InteractiveUI.o ghc/stage2/build/GhciMonad.o ghc/stage2/build/GhciTags.o ghc/stage2/build/hschooks.o
Undefined symbols:
"_pthread_threadid_np", referenced from:
_kernelThreadId in libHSrts_thr.a(OSThreads.thr_o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [ghc/stage2/build/tmp/ghc-stage2] Error 1
make: *** [all] Error 2

The reason seems to be (http://elliotth.blogspot.dk/2012/04/gettid-on-mac-os.html):

Speaking of 10.6, there's also a non-portable pthread_threadid_np(3) that turns a pthread_t into a uint64_t. This gives the same values you'd get from thread_selfid(2). Again, this is unsupported in 10.5 and earlier.

Best regards Thorkil

Trac metadata
Trac field Value
Version 7.7
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking