[GHC] #8921: ghc-stage2 fails with ld: fatal: library -lrt: not found on topHandler02(profthreaded) test

GHC ghc-devs at haskell.org
Sun Mar 23 19:38:15 UTC 2014


#8921: ghc-stage2 fails with ld: fatal: library -lrt: not found on
topHandler02(profthreaded) test
-------------------------------------+-------------------------------------
        Reporter:  AlainODea         |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.8.1-rc2
      Resolution:                    |         Keywords:
Operating System:  Solaris           |     Architecture:  x86_64 (amd64)
 Type of failure:  Compile-time      |       Difficulty:  Easy (less than 1
  crash                              |  hour)
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+-------------------------------------

Comment (by AlainODea):

 Rich Lowe gave some solid insight on this on smartos-discuss:

 > You're passing both -lrt and -r, which is likely to cause ld to look for
 an archive
 > library (librt.a, which will never exist) and not the shared object,
 since -r asks for
 > relocatable output.

 However, this causes a separate problem with unresolved references:

 {{{
 # /opt/local/gcc47/libexec/gcc/x86_64-sun-solaris2.11/4.7.3/collect2
 -R/opt/local/lib/ -Y P,/lib/amd64:/usr/lib/amd64:/opt/local/lib/ -Qy -o
 topHandler02.o -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3
 -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64
 -sun-solaris2.11/lib/amd64 -L/opt/local/gcc47/lib/gcc/x86_64-sun-
 solaris2.11/4.7.3/../../../amd64 -L/lib/amd64 -L/usr/lib/amd64
 -L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64
 -sun-solaris2.11/lib -L/opt/local/gcc47/lib/gcc/x86_64-sun-
 solaris2.11/4.7.3/../../.. -R/opt/local/gcc47/x86_64-sun-
 solaris2.11/lib/amd64 -R/opt/local/gcc47/lib/amd64 -lrt
 /tmp/ghc93957_0/ghc93957_6.o /tmp/ghc93957_0/ghc93957_5.o
 Undefined                       first referenced
  symbol                             in file
 era                                 /tmp/ghc93957_0/ghc93957_6.o
 base_GHCziIOziException_zdfExceptionAsyncExceptionzuzdctoException_info
 /tmp/ghc93957_0/ghc93957_6.o
 CC_ID                               /tmp/ghc93957_0/ghc93957_5.o
 pushCostCentre                      /tmp/ghc93957_0/ghc93957_6.o
 CCS_DONT_CARE                       /tmp/ghc93957_0/ghc93957_6.o
 CCS_ID                              /tmp/ghc93957_0/ghc93957_5.o
 base_GHCziIOziException_zdfExceptionAsyncExceptionzuzdctoException_closure
 /tmp/ghc93957_0/ghc93957_6.o
 enterFunCCS                         /tmp/ghc93957_0/ghc93957_6.o
 newCAF                              /tmp/ghc93957_0/ghc93957_6.o
 CC_LIST                             /tmp/ghc93957_0/ghc93957_5.o
 base_GHCziIOziException_UserInterrupt_closure /tmp/ghc93957_0/ghc93957_6.o
 stg_bh_upd_frame_info               /tmp/ghc93957_0/ghc93957_6.o
 CCS_LIST                            /tmp/ghc93957_0/ghc93957_5.o
 stg_IND_STATIC_info                 /tmp/ghc93957_0/ghc93957_6.o
 stg_raiseIOzh                       /tmp/ghc93957_0/ghc93957_6.o
 base_GHCziTopHandler_runMainIO1_info /tmp/ghc93957_0/ghc93957_6.o
 base_GHCziTopHandler_runMainIO1_closure /tmp/ghc93957_0/ghc93957_6.o
 ld: fatal: symbol referencing errors. No output written to topHandler02.o
 collect2: error: ld returned 1 exit status
 }}}

 I don't see the -r option in GNU ld, so this seems to be SunOS/Illumos
 specific.

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


More information about the ghc-tickets mailing list