Mixing registerised and unregisterised builds

Hi all, The attached e-mail seems to be about a problem using a library compiled with an unregisterised ghc with a registerised ghc. The linking step is giving many "undefined reference to `stg_ap_p_ret'"s (with various numbers of 'p's) as well as a few to `GHCziIOBase_zdWIO_entry', and possible others I didn't spot, while compiling haskelldb with a registerised ghc 6.4.1, where haskelldb depends on hsql, which was compiled with an unregisterised ghc 6.4.1. Is this expected behaviour? i.e. should I just make sure I don't change which arches are registerised within a GHC version? If so, would a library compiled with a registerised ghc being used by an unregisterised ghc also cause problems? Or have I got the problem completely wrong? Based on a quick look at the GHC source, the missing symbols seem to be due to this, in ghc/rts/Linker.c : #ifdef TABLES_NEXT_TO_CODE #define RTS_RET_SYMBOLS /* nothing */ #else #define RTS_RET_SYMBOLS \ [...] SymX(stg_ap_p_ret) \ [...] #endif being toggled due to this, in ghc/includes/RtsConfig.h : #if !defined(USE_MINIINTERPRETER) && !defined(ia64_HOST_ARCH) && !defined (powerpc64_HOST_ARCH) #define TABLES_NEXT_TO_CODE #endif in turn due to this, in ghc/includes/Makefile : ifeq "$(GhcUnregisterised)" "YES" SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER endif Thanks Ian

Ian Lynagh wrote:
The attached e-mail seems to be about a problem using a library compiled with an unregisterised ghc with a registerised ghc. The linking step is giving many "undefined reference to `stg_ap_p_ret'"s (with various numbers of 'p's) as well as a few to `GHCziIOBase_zdWIO_entry', and possible others I didn't spot, while compiling haskelldb with a registerised ghc 6.4.1, where haskelldb depends on hsql, which was compiled with an unregisterised ghc 6.4.1.
Is this expected behaviour? i.e. should I just make sure I don't change which arches are registerised within a GHC version?
If so, would a library compiled with a registerised ghc being used by an unregisterised ghc also cause problems?
That's right - registerised and unregisterised code are completely incompatible. Its similar to the situation with profiled and unprofiled code. Cheers, Simon

On Thu, Mar 16, 2006 at 10:05:44AM +0000, Simon Marlow wrote:
That's right - registerised and unregisterised code are completely incompatible.
OK, thanks.
Its similar to the situation with profiled and unprofiled code.
But in this case we get a warning: "mismatched interface file ways: expected , found p" Perhaps a similar warning could be given for the registerised case? Thanks Ian

Ian Lynagh wrote:
On Thu, Mar 16, 2006 at 10:05:44AM +0000, Simon Marlow wrote:
That's right - registerised and unregisterised code are completely incompatible.
OK, thanks.
Its similar to the situation with profiled and unprofiled code.
But in this case we get a warning: "mismatched interface file ways: expected , found p"
Perhaps a similar warning could be given for the registerised case?
Done. Cheers, Simon
participants (2)
-
Ian Lynagh
-
Simon Marlow