Ticket #7106 (closed bug: fixed)

Opened 10 months ago

Last modified 10 months ago

ghc-7.4.2 on sparc solaris without threaded rts

Reported by: maeder Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc:
Operating System: Solaris Architecture: sparc
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

my build of ghc-7.4.2 could not link binaries compiled with "-threaded" ("ld: library -lHSrts_thr: not found"). In fact RTS ways does not include "thr" entries as was the case for ghc-7.0.4. Why?

 [("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("GCC extra via C opts"," -fwrapv")
 ,("C compiler command","/opt/csw/bin/gcc")
 ,("C compiler flags"," -fno-stack-protector ")
 ,("ar command","/usr/ccs/bin/ar")
 ,("ar flags","clqs")
 ,("ar supports at file","@ArSupportsAtFile@")
 ,("touch command","touch")
 ,("dllwrap command","/bin/false")
 ,("windres command","/bin/false")
 ,("perl command","/usr/bin/perl")
 ,("target os","OSSolaris2")
 ,("target arch","ArchSPARC")
 ,("target word size","4")
 ,("target has GNU nonexec stack","True")
 ,("target has subsections via symbols","False")
 ,("Project version","7.4.2")
 ,("Booter version","7.0.4")
 ,("Stage","2")
 ,("Build platform","sparc-sun-solaris2")
 ,("Host platform","sparc-sun-solaris2")
 ,("Target platform","sparc-sun-solaris2")
 ,("Have interpreter","YES")
 ,("Object splitting supported","NO")
 ,("Have native code generator","NO")
 ,("Support SMP","NO")
 ,("Unregisterised","YES")
 ,("Tables next to code","YES")
 ,("RTS ways","l debug    ")
 ,("Leading underscore","NO")
 ,("Debug on","False")
 ,("LibDir","/home/pub-bkb/ghc/ghc-7.4.2/lib/ghc-7.4.2")
 ,("Global Package DB","/home/pub-bkb/ghc/ghc-7.4.2/lib/ghc-7.4.2/package.conf.d")
 ,("Gcc Linker flags","[]")
 ,("Ld Linker flags","[]")
 ]

I'm on solaris 10 "SunOS 5.10 Generic_147440-21 sun4u sparc SUNW,Sun-Fire-280R", gcc-4.6.3, and ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.1510

Attachments

log4.gz Download (118.6 KB) - added by maeder 10 months ago.
gmake after fixing DriverPipeline?
log5.gz Download (28.2 KB) - added by maeder 10 months ago.
next and final log

Change History

  Changed 10 months ago by simonmar

  • difficulty set to Unknown

The threaded RTS is built unconditionally, to disable it you would have to do this manually. How did you build GHC?

Changed 10 months ago by maeder

gmake after fixing DriverPipeline?

Changed 10 months ago by maeder

next and final log

follow-up: ↓ 3   Changed 10 months ago by maeder

as always:

-bash-3.00$ cat mk/build.mk
BIN_DIST=1
Project=Ghc
XMLDocWays = html
HADDOCK_DOCS = YES

In addition I've removed the [SysTools?.Option "-Wl,-no-relax"] in compiler/main/DriverPipeline.hs after "ld: unrecognized option '-n'" (see #5407)

I had to continue "gmake" several times. I'll attach the last two logs.

in reply to: ↑ 2   Changed 10 months ago by simonmar

  • status changed from new to closed
  • resolution set to fixed

Replying to maeder:

as always: {{{ -bash-3.00$ cat mk/build.mk BIN_DIST=1 Project=Ghc XMLDocWays = html HADDOCK_DOCS = YES }}}

Except for HADDOCK_DOCS those are all settings for the old build system and won't have any effect. Also HADDOCK_DOCS defaults to YES anyway, so you're effectively compiling with an empty build.mk :-)

I think I see why you don't have the threaded RTS:

GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_debug thr_l,)

this is different in the 7.4 branch: I made the threaded RTS unconditional after 7.4.

Sparc is unregisterised now that the registerised C backend has been removed, which is why you're not getting the threaded RTS. You can enable the threaded RTS explicitly by adding GhcRTSWays += thr to your mk/build.mk.

In addition I've removed the [SysTools?.Option "-Wl,-no-relax"] in compiler/main/DriverPipeline.hs after "ld: unrecognized option '-n'" (see #5407) I had to continue "gmake" several times. I'll attach the last two logs.

follow-up: ↓ 5   Changed 10 months ago by maeder

Ok, I'll try again with extended RTSways.

Do I not need to set BIN_DIST=1 in build.mk in order to create a binary distribution? Can I omit build.mk entirely in future builds?

in reply to: ↑ 4   Changed 10 months ago by simonmar

Replying to maeder:

Do I not need to set BIN_DIST=1 in build.mk in order to create a binary distribution? Can I omit build.mk entirely in future builds?

Yes, and yes.

  Changed 10 months ago by maeder

thanks, meanwhile I've succeeded in creating a working ghc with threaded rts.

Note: See TracTickets for help on using tickets.