Ticket #3594 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

ppc stage1 panic for --enable-shared

Reported by: juhpetersen Owned by: igloo
Priority: high Milestone: 7.0.1
Component: Compiler Version: 6.13
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: powerpc
Type of failure: Building GHC failed Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Not sure if this is expected but ghc-6.12 panics on ppc when it starts to build shared libraries:

/usr/bin/ar: creating libraries/haskeline/dist-install/build/libHShaskeline-0.6.2.1.a
"inplace/bin/ghc-stage1" -fPIC -dynamic  -H32m -O    -package-name ghc-prim-0.2.0.0 -hide-all-packages -i -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build -ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/dist-install/build -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.    -optP-include -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package rts-1.0  -package-name ghc-prim -XCPP -XMagicHash -XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples -XEmptyDataDecls -XNoImplicitPrelude -O2 -XGenerics -fno-warn-deprecated-flags     -odir libraries/ghc-prim/dist-install/build -hidir libraries/ghc-prim/dist-install/build -stubdir libraries/ghc-prim/dist-install/build -hisuf dyn_hi -osuf  dyn_o -hcsuf dyn_hc -c libraries/ghc-prim/./GHC/Generics.hs -o libraries/ghc-prim/dist-install/build/GHC/Generics.dyn_o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 6.12.0.20091010 for powerpc-unknown-linux):
        getRegisterReg-memory PicBaseReg

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Generics.dyn_o] Error 1
make: *** [all] Error 2

so reporting it here.

Attachments

PPC-CodeGen-PicBaseReg.patch Download (37.4 KB) - added by PHO 3 years ago.

Change History

Changed 4 years ago by igloo

  • difficulty set to Unknown
  • milestone set to _|_

Thanks for the report. PPC/Linux isn't a tier-1 platform, so I'm setting the milestone to _|_.

Changed 3 years ago by PHO

Changed 3 years ago by PHO

  • failure set to None/Unknown
  • version changed from 6.12.1 RC1 to 6.13
  • os changed from Linux to Unknown/Multiple

Patch attached:

Sat May  8 23:39:00 JST 2010  pho@cielonegro.org
  * PIC support for PowerPC
  
  PPC.CodeGen.getRegister was not properly handling PicBaseReg.
  It seems working with this patch, but I'm not sure this change is correct.

Changed 3 years ago by PHO

And I report that now I can build the darcs HEAD on powerpc-apple-darwin with shared libraries (with the patch I posted to #3260). PlatformSupportsSharedLibs? should include it.

--- old-ghc/mk/config.mk.in     2010-05-08 23:45:23.000000000 +0900
+++ new-ghc/mk/config.mk.in     2010-05-08 23:45:23.000000000 +0900
@@ -103,7 +103,7 @@
 GhcLibProfiled=$(if $(filter p,$(GhcLibWays)),YES,NO)
 
 # Do we support shared libs?
-PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),i386-unknown-linux x86_64-unknown-linux i386-unknown-freebsd x86_64-unknown-freebsd i386-unknown-mingw32 i386-apple-darwin),YES,NO)
+PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),i386-unknown-linux x86_64-unknown-linux i386-unknown-freebsd x86_64-unknown-freebsd i386-unknown-mingw32 i386-apple-darwin powerpc-apple-darwin),YES,NO)
 
 # Build a compiler that will build *unregisterised* libraries and
 # binaries by default.  Unregisterised code is supposed to compile and

Changed 3 years ago by simonmar

  • priority changed from normal to high
  • status changed from new to patch
  • milestone changed from _|_ to 6.14.1

Changed 3 years ago by PHO

  • failure changed from None/Unknown to Building GHC failed

Changed 3 years ago by igloo

  • owner set to igloo

Changed 3 years ago by igloo

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

Thanks, patch applied.

Note: See TracTickets for help on using tickets.