[GHC] #7478: setSessionDynFlags does not always work

GHC ghc-devs at haskell.org
Tue Jan 28 00:09:47 UTC 2014


#7478: setSessionDynFlags does not always work
-------------------------------------+------------------------------------
        Reporter:  edsko             |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:  7.8.1
       Component:  Compiler          |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:  ghc-api/T7478     |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------
Changes (by thoughtpolice):

 * cc: simonmar (added)
 * version:  7.6.1 => 7.7
 * milestone:  7.6.2 => 7.8.1


Comment:

 On my 32bit linux machine (but not 64bit), I see the following test
 failure in a regular `./validate` run. It fails rather unhelpfully by just
 saying "phase 'Linker' failed (exitcode = 1)", but after patching the test
 to use `-v3` verbosity, I get this output:

 {{{
 ...
 wired-in package ghc-prim mapped to ghc-prim-0.3.1.0-inplace
 wired-in package integer-gmp mapped to integer-gmp-0.5.1.0-inplace
 wired-in package base mapped to base-4.7.0.0-inplace
 wired-in package rts mapped to builtin_rts
 wired-in package template-haskell mapped to template-
 haskell-2.9.0.0-inplace
 wired-in package dph-seq not found.
 wired-in package dph-par not found.
 *** Chasing dependencies:
 Chasing modules from: *C.hs
 Stable obj: []
 Stable BCO: []
 Ready for upsweep
   [NONREC
       ModSummary {
          ms_hs_date = 2014-01-21 15:09:29.865159778 UTC
          ms_mod = main:Main,
          ms_textual_imps = [import (implicit) Prelude]
          ms_srcimps = []
       }]
 *** Deleting temp files:
 Deleting:
 compile: input file C.hs
 *** Checking old interface for main:Main:
 *** Parser:
 *** Renamer/typechecker:
 *** Desugar:
 Result size of Desugar (after optimization)
   = {terms: 7, types: 7, coercions: 0}
 *** Simplifier:
 Result size of Simplifier = {terms: 7, types: 7, coercions: 0}
 *** Tidy Core:
 Result size of Tidy Core = {terms: 7, types: 7, coercions: 0}
 writeBinIface: 1 Names
 writeBinIface: 12 dict entries
 *** CorePrep:
 Result size of CorePrep = {terms: 7, types: 7, coercions: 0}
 *** Stg2Stg:
 *** CodeOutput:
 *** New CodeGen:
 *** CPSZ:
 *** CPSZ:
 *** CPSZ:
 *** Assembler:
 /usr/bin/gcc -U__i686 -fno-stack-protector -DTABLES_NEXT_TO_CODE -I. -x
 assembler-with-cpp -c /tmp/ghc7616_0/ghc7616_7.s -o C.o
 Upsweep completely successful.
 *** Deleting temp files:
 Deleting: /tmp/ghc7616_0/ghc7616_8.c /tmp/ghc7616_0/ghc7616_7.s
 /tmp/ghc7616_0/ghc7616_6.s
 Warning: deleting non-existent /tmp/ghc7616_0/ghc7616_8.c
 Warning: deleting non-existent /tmp/ghc7616_0/ghc7616_6.s
 link: linkables are ...
 LinkableM (2014-01-26 02:04:53.320777465 UTC) main:Main
    [DotO C.o]
 *** C Compiler:
 /usr/bin/gcc -U__i686 -fno-stack-protector -DTABLES_NEXT_TO_CODE -c
 /tmp/ghc7616_0/ghc7616_9.c -o /tmp/ghc7616_0/ghc7616_10.o
 -I/home/a/ghc/rts/dist/build -I/home/a/ghc/includes -I/home/a/ghc/includes
 /dist-derivedconstants/header
 *** C Compiler:
 /usr/bin/gcc -U__i686 -fno-stack-protector -DTABLES_NEXT_TO_CODE -c
 /tmp/ghc7616_0/ghc7616_11.s -o /tmp/ghc7616_0/ghc7616_12.o
 -I/home/a/ghc/rts/dist/build -I/home/a/ghc/includes -I/home/a/ghc/includes
 /dist-derivedconstants/header
 *** Linker:
 /usr/bin/gcc -U__i686 -fno-stack-protector -DTABLES_NEXT_TO_CODE -o A C.o
 -L/home/a/ghc/libraries/base/dist-install/build -Wl,-rpath-link
 -Wl,/home/a/ghc/libraries/base/dist-install/build -Wl,-rpath
 -Wl,/home/a/ghc/libraries/base/dist-install/build -L/home/a/ghc/libraries
 /integer-gmp/dist-install/build -Wl,-rpath-link -Wl,/home/a/ghc/libraries
 /integer-gmp/dist-install/build -Wl,-rpath -Wl,/home/a/ghc/libraries
 /integer-gmp/dist-install/build -L/home/a/ghc/libraries/ghc-prim/dist-
 install/build -Wl,-rpath-link -Wl,/home/a/ghc/libraries/ghc-prim/dist-
 install/build -Wl,-rpath -Wl,/home/a/ghc/libraries/ghc-prim/dist-
 install/build -L/home/a/ghc/rts/dist/build -Wl,-rpath-link
 -Wl,/home/a/ghc/rts/dist/build -Wl,-rpath -Wl,/home/a/ghc/rts/dist/build
 /tmp/ghc7616_0/ghc7616_10.o /tmp/ghc7616_0/ghc7616_12.o
 -Wl,-u,ghczmprim_GHCziTypes_Izh_static_info
 -Wl,-u,ghczmprim_GHCziTypes_Czh_static_info
 -Wl,-u,ghczmprim_GHCziTypes_Fzh_static_info
 -Wl,-u,ghczmprim_GHCziTypes_Dzh_static_info
 -Wl,-u,base_GHCziPtr_Ptr_static_info
 -Wl,-u,ghczmprim_GHCziTypes_Wzh_static_info
 -Wl,-u,base_GHCziInt_I8zh_static_info
 -Wl,-u,base_GHCziInt_I16zh_static_info
 -Wl,-u,base_GHCziInt_I32zh_static_info
 -Wl,-u,base_GHCziInt_I64zh_static_info
 -Wl,-u,base_GHCziWord_W8zh_static_info
 -Wl,-u,base_GHCziWord_W16zh_static_info
 -Wl,-u,base_GHCziWord_W32zh_static_info
 -Wl,-u,base_GHCziWord_W64zh_static_info
 -Wl,-u,base_GHCziStable_StablePtr_static_info
 -Wl,-u,ghczmprim_GHCziTypes_Izh_con_info
 -Wl,-u,ghczmprim_GHCziTypes_Czh_con_info
 -Wl,-u,ghczmprim_GHCziTypes_Fzh_con_info
 -Wl,-u,ghczmprim_GHCziTypes_Dzh_con_info -Wl,-u,base_GHCziPtr_Ptr_con_info
 -Wl,-u,base_GHCziPtr_FunPtr_con_info
 -Wl,-u,base_GHCziStable_StablePtr_con_info
 -Wl,-u,ghczmprim_GHCziTypes_False_closure
 -Wl,-u,ghczmprim_GHCziTypes_True_closure
 -Wl,-u,base_GHCziPack_unpackCString_closure
 -Wl,-u,base_GHCziIOziException_stackOverflow_closure
 -Wl,-u,base_GHCziIOziException_heapOverflow_closure
 -Wl,-u,base_ControlziExceptionziBase_nonTermination_closure
 -Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnMVar_closure
 -Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnSTM_closure
 -Wl,-u,base_ControlziExceptionziBase_nestedAtomically_closure
 -Wl,-u,base_GHCziWeak_runFinalizzerBatch_closure
 -Wl,-u,base_GHCziTopHandler_flushStdHandles_closure
 -Wl,-u,base_GHCziTopHandler_runIO_closure
 -Wl,-u,base_GHCziTopHandler_runNonIO_closure
 -Wl,-u,base_GHCziConcziIO_ensureIOManagerIsRunning_closure
 -Wl,-u,base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure
 -Wl,-u,base_GHCziConcziSync_runSparks_closure
 -Wl,-u,base_GHCziConcziSignal_runHandlers_closure
 -lHSbase-4.7.0.0-ghc7.7.20140122 -lHSinteger-gmp-0.5.1.0-ghc7.7.20140122
 -lHSghc-prim-0.3.1.0-ghc7.7.20140122 -lHSrts-ghc7.7.20140122 -lffi -lgmp
 -lm -lrt -ldl '-Wl,--hash-size=31' -Wl,--reduce-memory-overheads
 /usr/bin/ld: dynamic variable `base_GHCziBase_zdfMonadIO_closure' is zero
 size
 /usr/bin/ld: dynamic variable `ghczmprim_GHCziTuple_Z0T_closure' is zero
 size
 /usr/bin/ld: dynamic variable `base_GHCziTopHandler_runMainIO_closure' is
 zero size
 /usr/bin/ld: C.o(.text+0x3b): unresolvable R_386_32 relocation against
 symbol `base_GHCziBase_zdfMonadIO_closure'
 /usr/bin/ld: final link failed: Nonrepresentable section on output
 collect2: ld returned 1 exit status
 T7478: T7478: phase `Linker' failed (exitcode = 1)
 make[1]: *** [T7478] Error 1
 }}}

 I haven't taken the time to fully track this down yet unfortunately.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7478#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list