Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,385
    • Issues 4,385
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 369
    • Merge Requests 369
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #8223

Closed
Open
Opened Sep 04, 2013 by rwbarton@trac-rwbarton

System.Posix.User fails to build on systems without get{gr,pw}nam_r

I'm trying to build GHC for Android (using https://github.com/neurocyte/ghc-android) and according to include/HsUnixConfig.h Android doesn't have any of the _r functions in the get{gr,pw}* family.

In System/Posix/User.hsc the imports of Control.Monad and System.IO.Error are conditional on defined(HAVE_GETGRNAM_R) || defined(HAVE_GETPWNAM_R), but the use site of those modules (doubleAllocWhileERANGE) was moved outside of any #ifs by http://git.haskell.org/?p=packages/unix.git;a=commit;h=ef683c6ba703.

I would suggest just removing the conditionals around the import of those two modules, since doubleAllocWhileERANGE is by now used by four other functions. Otherwise, need to bracket the definition of doubleAllocWhileERANGE with the same conditional as the one around those imports, and should update the conditionals to reflect all four cases in which doubleAllocWhileERANGE is used.

(BTW, does Android count as "Operating System: Linux"? It is based on the Linux kernel, but with a rather peculiar user-space.)

Trac metadata
Trac field Value
Version 7.7
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/unix
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#8223