[GHC] #11981: unknown symbol `__udivti3' when BuildFlavour = perf-llvm

GHC ghc-devs at haskell.org
Wed Aug 3 11:04:16 UTC 2016


#11981: unknown symbol `__udivti3' when BuildFlavour = perf-llvm
-------------------------------------+-------------------------------------
        Reporter:  erikd             |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.2
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by erikd):

 On my Debian system, the symbol `__udivti3` seems to be provided by
 `/lib/x86_64-linux-gnu/libgcc_s.so.1`

 Easiest way to trigger the problem is to build with `BuildFlavour = perf-
 llvm` and then run:

 {{{
 $ inplace/bin/ghc-stage2 --interactive
 GHCi, version 8.1.20160802: http://www.haskell.org/ghc/  :? for help
 ghc-stage2: /home/erikd/Git/ghc-upstream/libraries/ghc-prim/dist-
 install/build/HSghc-prim-0.5.0.0.o: unknown symbol `__udivti3'
 ghc-stage2: unable to load package `ghc-prim-0.5.0.0'
 }}}

 Not sure how to add this to the build system, but I was able to hack
 something together to test using the following steps.

 * Full build with `BuildFlavour = perf-llvm`.
 * Edit `ghc/stage2/package-data.mk` and add `gcc_s` to the
 `ghc_stage2_DEP_EXTRA_LIBS` line.
 * Edit `mk/build.mk` and uncomment `stage=2` so we only build the stage 2
 compiler.
 * `touch compiler/main/GHC.hs` to force a rebuild.
 * Run `make`.

 Now when I run `inplace/bin/ghc-stage2 --interactive` it works correctly.

 @thomie Any idea on how this could be fixed in the build system?

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


More information about the ghc-tickets mailing list