ASSERT when cross compiling to QNX with Debug enabled

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ASSERT when cross compiling to QNX with Debug enabled

Nathan Hüsken
Hey,

When I cross compile to arm-unknown-nto-qnx8.0.0eabi and add DDEBUG to
GhcStage1HcOpts I get:

"inplace/bin/ghc-stage1" -static  -H64m -O0 -fllvm    -package-name
base-4.7.0.0 -hide-all-packages -i -ilibraries/base/.
-ilibraries/base/dist-install/build
-ilibraries/base/dist-install/build/autogen
-Ilibraries/base/dist-install/build
-Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include
-optP-include
-optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package
ghc-prim-0.3.1.0 -package integer-simple-0.1.1.0 -package rts-1.0
-package-name base -XHaskell98 -XCPP -O -fllvm  -no-user-package-db
-rtsopts      -odir libraries/base/dist-install/build -hidir
libraries/base/dist-install/build -stubdir
libraries/base/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c
libraries/base/./Unsafe/Coerce.hs -o
libraries/base/dist-install/build/Unsafe/Coerce.o
"inplace/bin/ghc-stage1" -static  -H64m -O0 -fllvm    -package-name
base-4.7.0.0 -hide-all-packages -i -ilibraries/base/.
-ilibraries/base/dist-install/build
-ilibraries/base/dist-install/build/autogen
-Ilibraries/base/dist-install/build
-Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include
-optP-include
-optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package
ghc-prim-0.3.1.0 -package integer-simple-0.1.1.0 -package rts-1.0
-package-name base -XHaskell98 -XCPP -O -fllvm  -no-user-package-db
-rtsopts      -odir libraries/base/dist-install/build -hidir
libraries/base/dist-install/build -stubdir
libraries/base/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c
libraries/base/./GHC/Int.hs -o libraries/base/dist-install/build/GHC/Int.o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.7.20130109 for arm-unknown-nto-qnx):
        ASSERT failed!
    file compiler/basicTypes/Literal.lhs line 222 2147483648

I do not know if this is fatal, but I would like to have a build with
debug symbols ...

Regards,
Nathan


Reply | Threaded
Open this post in threaded view
|

ASSERT when cross compiling to QNX with Debug enabled

Nathan Hüsken
I found something out :).

When editing libraries/base/GHC/Int.hs

and change:

instance Bounded Int32 where
    minBound = -0x80000000
    maxBound =  0x7FFFFFFF

to

instance Bounded Int32 where
    minBound = -0x7FFFFFFF
    maxBound =  0x7FFFFFFF

the Assert disappears.
This is of course no solution!
But I thought I should share.


On 01/10/2013 11:12 PM, Nathan H?sken wrote:

> Hey,
>
> When I cross compile to arm-unknown-nto-qnx8.0.0eabi and add DDEBUG to
> GhcStage1HcOpts I get:
>
> "inplace/bin/ghc-stage1" -static  -H64m -O0 -fllvm    -package-name
> base-4.7.0.0 -hide-all-packages -i -ilibraries/base/.
> -ilibraries/base/dist-install/build
> -ilibraries/base/dist-install/build/autogen
> -Ilibraries/base/dist-install/build
> -Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include
> -optP-include
> -optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package
> ghc-prim-0.3.1.0 -package integer-simple-0.1.1.0 -package rts-1.0
> -package-name base -XHaskell98 -XCPP -O -fllvm  -no-user-package-db
> -rtsopts      -odir libraries/base/dist-install/build -hidir
> libraries/base/dist-install/build -stubdir
> libraries/base/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c
> libraries/base/./Unsafe/Coerce.hs -o
> libraries/base/dist-install/build/Unsafe/Coerce.o
> "inplace/bin/ghc-stage1" -static  -H64m -O0 -fllvm    -package-name
> base-4.7.0.0 -hide-all-packages -i -ilibraries/base/.
> -ilibraries/base/dist-install/build
> -ilibraries/base/dist-install/build/autogen
> -Ilibraries/base/dist-install/build
> -Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include
> -optP-include
> -optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package
> ghc-prim-0.3.1.0 -package integer-simple-0.1.1.0 -package rts-1.0
> -package-name base -XHaskell98 -XCPP -O -fllvm  -no-user-package-db
> -rtsopts      -odir libraries/base/dist-install/build -hidir
> libraries/base/dist-install/build -stubdir
> libraries/base/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c
> libraries/base/./GHC/Int.hs -o libraries/base/dist-install/build/GHC/Int.o
> ghc-stage1: panic! (the 'impossible' happened)
>   (GHC version 7.7.20130109 for arm-unknown-nto-qnx):
> ASSERT failed!
>     file compiler/basicTypes/Literal.lhs line 222 2147483648
>
> I do not know if this is fatal, but I would like to have a build with
> debug symbols ...
>
> Regards,
> Nathan
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>