Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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 4,828
    • Issues 4,828
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 446
    • Merge requests 446
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #8748

Closed
Open
Created Feb 08, 2014 by Sergei Trofimovich@trofiReporter

ghc-7.8-rc1/HEAD: --enable-unregisterised fails to build and run with threaded RTS, profiling mode

Steps to reproduce:

0. Pick any platform. I've performed it on amd64, but seen real failures on unreg arches: ia64, ppc64
1. pull sources
2. ./boot
3. ./configure --enable-unregisterised
# right, no build.mk
4. make

Here we see 2 kinds of bugs at once:

  1. threaded RTS misses -DNOSMP define. Looks like ghc always needs

to carry that define (what is the mechanism for it BTW?), it

doesn't:

  HC [stage 1] compiler/stage2/build/ExtsCompat46.o

In file included from /home/slyfox/dev/git/ghc/includes/Stg.h:232:0:
    0,
                     from /tmp/ghc6527_0/ghc6527_2.hc:3:

/home/slyfox/dev/git/ghc/includes/stg/Regs.h:443:2:
     error: #error BaseReg must be in a register for THREADED_RTS
     #error BaseReg must be in a register for THREADED_RTS
      ^

The implicit declarations are scary as well:

/tmp/ghc1420_0/ghc1420_2.hc: In function 'c7WZ_entry':

/tmp/ghc1420_0/ghc1420_2.hc:43:1:
     warning: implicit declaration of function 'hs_bswap64' [-Wimplicit-function-declaration]
     _c7X5 = hs_bswap64(*((P_)(R1.w+7)));
     ^

I naively tried naive approach:

mk/config.mk.in:

+# Unregisterised build calls c compiler for every
+# .hs file. thus pass it everywhere.
+ifneq "$(GhcWithSMP)" "YES"
+SRC_HC_OPTS += -optc-DNOSMP
+endif

but got stage2, which always SIGSEGVs. Thus it's either incorrect fix or UNREG is broken.

  1. profiling builds (all files with -prof) miss enterFunCCS declaration:
/tmp/ghc7183_0/ghc7183_1.p_hc: In function 's6Y_entry':

/tmp/ghc7183_0/ghc7183_1.p_hc:79:40:
     error: 'enterFunCCS' undeclared (first use in this function)
     ghcFunPtr = ((void (*)(void *, void *))enterFunCCS);
                                            ^
Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited Mar 09, 2019 by Sergei Trofimovich
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking