#1289: gcc error when building haddock with gcc 4.1.2: initializer element is
not
constant
-----------------------+----------------------------------------------------
Reporter: greenrd | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.4.2
Severity: major | Keywords:
Difficulty: Unknown | Os: Linux
Testcase: | Architecture: x86_64 (amd64)
-----------------------+----------------------------------------------------
I got this error when trying to build haddock on x86_64 Linux with gcc
4.1.2 and ghc 6.4.2:
(Note that this is a build of haddock _before_ I've built ghc, so the
version 6.6.20070422 is completely irrelevant here.)
{{{
------------------------------------------------------------------------
==fptools== make all -wr;
in /tmp/rmake/builds/ghc/ghc-6.6.20070422/haddock-0.7/haddock/src
------------------------------------------------------------------------
make INSTALLING=0 BIN_DIST=0 - --no-print-directory -r all
/usr/bin/ghc -H16m -O -fglasgow-exts -cpp -package network -package mtl
-c FastMutInt.hs -o FastMutInt.o -ohi FastMutInt.hi
In file included from /usr/lib/ghc-6.4.2/include/Stg.h:149,
from /tmp/ghc26249.hc:3:
/usr/lib/ghc-6.4.2/include/Regs.h:213: warning: call-clobbered register
used for global register variable
/usr/lib/ghc-6.4.2/include/Regs.h:342: warning: call-clobbered register
used for global register variable
/tmp/ghc26249.hc:9: warning: initializer element is not computable at load
time
/tmp/ghc26249.hc:9: error: initializer element is not constant
/tmp/ghc26249.hc:9: error: (near initialization for
`FastMutInt_readFastMutInt_closure[0]')
/tmp/ghc26249.hc: In function `s1Z6_ret':
/tmp/ghc26249.hc:20: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:20: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:21: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:26: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: In function `FastMutInt_readFastMutInt_entry':
/tmp/ghc26249.hc:40: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:42: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: At top level:
/tmp/ghc26249.hc:48: warning: initializer element is not computable at
load time
/tmp/ghc26249.hc:48: error: initializer element is not constant
/tmp/ghc26249.hc:48: error: (near initialization for
`FastMutInt_writeFastMutInt_closure[0]')
/tmp/ghc26249.hc: In function `s1Zj_ret':
/tmp/ghc26249.hc:57: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:60: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: In function `s1Zi_ret':
/tmp/ghc26249.hc:74: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:76: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: In function `FastMutInt_writeFastMutInt_entry':
/tmp/ghc26249.hc:87: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:89: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: At top level:
/tmp/ghc26249.hc:95: warning: initializer element is not computable at
load time
/tmp/ghc26249.hc:95: error: initializer element is not constant
/tmp/ghc26249.hc:95: error: (near initialization for
`FastMutInt_incFastMutInt_closure[0]')
/tmp/ghc26249.hc: In function `s1Zw_ret':
/tmp/ghc26249.hc:107: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:107: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:108: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:110: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:115: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: In function `FastMutInt_incFastMutInt_entry':
/tmp/ghc26249.hc:129: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:131: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: At top level:
/tmp/ghc26249.hc:137: warning: initializer element is not computable at
load time
/tmp/ghc26249.hc:137: error: initializer element is not constant
/tmp/ghc26249.hc:137: error: (near initialization for
`FastMutInt_newFastMutInt_closure[0]')
/tmp/ghc26249.hc: In function `s1ZI_ret':
/tmp/ghc26249.hc:156: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:156: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:161: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: At top level:
/tmp/ghc26249.hc:171: warning: initializer element is not computable at
load time
/tmp/ghc26249.hc:171: error: initializer element is not constant
/tmp/ghc26249.hc:171: error: (near initialization for
`FastMutInt_newFastMutInt_info[0]')
/tmp/ghc26249.hc: In function `FastMutInt_newFastMutInt_entry':
/tmp/ghc26249.hc:178: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:178: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc: At top level:
/tmp/ghc26249.hc:192: warning: initializer element is not computable at
load time
/tmp/ghc26249.hc:192: error: initializer element is not constant
/tmp/ghc26249.hc:192: error: (near initialization for
`FastMutInt_incFastMutIntBy_closure[0]')
/tmp/ghc26249.hc: In function `s1ZW_ret':
/tmp/ghc26249.hc:204: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:204: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:205: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:207: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:212: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: In function `s1ZV_ret':
/tmp/ghc26249.hc:229: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:231: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: In function `FastMutInt_incFastMutIntBy_entry':
/tmp/ghc26249.hc:242: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc:244: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: At top level:
/tmp/ghc26249.hc:250: warning: initializer element is not computable at
load time
/tmp/ghc26249.hc:250: error: initializer element is not constant
/tmp/ghc26249.hc:250: error: (near initialization for
`FastMutInt_FastMutInt_closure[0]')
/tmp/ghc26249.hc: In function `FastMutInt_FastMutInt_entry':
/tmp/ghc26249.hc:261: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:261: warning: cast from pointer to integer of different
size
/tmp/ghc26249.hc:266: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: In function `FastMutInt_FastMutInt_con_entry':
/tmp/ghc26249.hc:279: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: In function `FastMutInt_FastMutInt_static_entry':
/tmp/ghc26249.hc:289: warning: cast to pointer from integer of different
size
/tmp/ghc26249.hc: In function `__stginit_FastMutInt_':
/tmp/ghc26249.hc:306: warning: cast to pointer from integer of different
size
make[3]: *** [FastMutInt.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all] Error 1
make[1]: Leaving directory
`/tmp/rmake/builds/ghc/ghc-6.6.20070422/haddock-0.7/haddock'
make: *** [build] Error 1
error: Shell command "cd
/tmp/rmake/builds/ghc/ghc-6.6.20070422/haddock-0.7 && ./configure && make
&& cd /tmp/rmake/builds/ghc/ghc-6.6.2 0070422 && ln -s
haddock-0.7/haddock" exited with exit code 2
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1289>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs