I'll give that a shot tomorrow. This is made more challenging due to the code that calls collect2 is itself already compiled rather than being a script or Makefile.
It's very likely problems in the legacy Solaris support since GHC stopped officially supporting Solaris. Hopefully they can be convinced to officially support Illumos. > On Mar 23, 2014, at 20:06, a b <[email protected]> wrote: > > Looks like one or more objects is missing on the collect2 line. > Could you use nm(1) to try and determine which object(s) have the > missing symbols, and add them to the build line? > > These symbols look like GHC functions. For example, you could try > looking for stg_bh_upd_frame_info() in the source code; there is > good probability that the filename which contains that function > will be compiled into a .o file of the same name. You could then > try including that object on the compile / link line, and thus > resolve missing symbols, one .o file at a time. Of course, more > concerning is the question why the build engine has not included > it in the first place, so that is the symptom, rather than the > root cause. Also look whether any inlining is taking place via > compiler options; if that is the case, the compiler will replace > function calls with machine code instructions every time he > enconters said function call, thus the missing symbols. > > Date: Sun, 23 Mar 2014 19:37:45 +0000 > Subject: Re: [smartos-discuss] GHC 7.8 prep: testsuite failure due to "ld: > fatal: library -lrt: not found" > From: [email protected] > To: [email protected] > > Seems like the `-r` masks a bunch of undefined 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 > ``` > > GNU ld does not appear to have this option, so I'm guessing this is a borked > SunOS integration in GHC. > smartos-discuss | Archives | Modify Your Subscription > > ------------------------------------------- > smartos-discuss > Archives: https://www.listbox.com/member/archive/184463/=now > RSS Feed: https://www.listbox.com/member/archive/rss/184463/23736926-be9f0783 > Modify Your Subscription: https://www.listbox.com/member/?& > Powered by Listbox: http://www.listbox.com ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
