
Ben: I'm getting this from a clean build on Linux. Any ideas?
I'm up to date on master
git branch -v
data-kind-syntax 4174458178 Add IfacePromotionInfo
* master 436b3ef01e Clean up comments about match algorithm a bit.
tc-untouchables b737a45391 More simplifications to the constraint solver
type-nats 87d2a63b8d [behind 1491] Fix uses of (<=?) as a function to reduce properly.
wip/pattern-synonyms e54d396752 [ahead 6, behind 4569] Comments and tracing only
wip/spj-T13397 43540c8c6b Improve code generation for conditionals
wip/spj-early-inline 8515fcfa91 Mark non-recursive join lambdas as one-shot
simonpj@cam-05-unx:~/code/HEAD/compiler$
Simon
libraries/ghc-prim/cbits/atomic.c:311:54: error:
error: '__ATOMIC_SEQ_CST' undeclared (first use in this function)
|
311 | __atomic_store_n((StgWord16 *) x, (StgWord16) val, __ATOMIC_SEQ_CST);
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicwrite32':
make[1]: *** [libraries/ghc-prim/dist-install/build/cbits/atomic.o] Error 1
make[1]: *** Waiting for unfinished jobs....
libraries/ghc-prim/cbits/atomic.c:318:54: error:
error: '__ATOMIC_SEQ_CST' undeclared (first use in this function)
|
318 | __atomic_store_n((StgWord32 *) x, (StgWord32) val, __ATOMIC_SEQ_CST);
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicwrite64':
libraries/ghc-prim/cbits/atomic.c:325:54: error:
error: '__ATOMIC_SEQ_CST' undeclared (first use in this function)
|
325 | __atomic_store_n((StgWord64 *) x, (StgWord64) val, __ATOMIC_SEQ_CST);
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicread64':
libraries/ghc-prim/cbits/atomic.c:294:1: error:
error: control reaches end of non-void function [-Werror=return-type]
|
294 | }
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicread32':
libraries/ghc-prim/cbits/atomic.c:287:1: error:
error: control reaches end of non-void function [-Werror=return-type]
|
287 | }
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicread16':
libraries/ghc-prim/cbits/atomic.c:280:1: error:
error: control reaches end of non-void function [-Werror=return-type]
|
280 | }
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicread8':
libraries/ghc-prim/cbits/atomic.c:273:1: error:
error: control reaches end of non-void function [-Werror=return-type]
|
273 | }
| ^
cc1: all warnings being treated as errors
`gcc' failed in phase `C Compiler'. (Exit code: 1)
make[1]: *** [libraries/ghc-prim/dist-install/build/cbits/atomic.dyn_o] Error 1
<

ps this Linux box is way behind
gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
From: Simon Peyton Jones
Sent: 06 November 2017 16:23
To: ghc-devs@haskell.org
Subject: GHC build broken
Ben: I'm getting this from a clean build on Linux. Any ideas?
I'm up to date on master
git branch -v
data-kind-syntax 4174458178 Add IfacePromotionInfo
* master 436b3ef01e Clean up comments about match algorithm a bit.
tc-untouchables b737a45391 More simplifications to the constraint solver
type-nats 87d2a63b8d [behind 1491] Fix uses of (<=?) as a function to reduce properly.
wip/pattern-synonyms e54d396752 [ahead 6, behind 4569] Comments and tracing only
wip/spj-T13397 43540c8c6b Improve code generation for conditionals
wip/spj-early-inline 8515fcfa91 Mark non-recursive join lambdas as one-shot
simonpj@cam-05-unx:~/code/HEAD/compiler$
Simon
libraries/ghc-prim/cbits/atomic.c:311:54: error:
error: '__ATOMIC_SEQ_CST' undeclared (first use in this function)
|
311 | __atomic_store_n((StgWord16 *) x, (StgWord16) val, __ATOMIC_SEQ_CST);
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicwrite32':
make[1]: *** [libraries/ghc-prim/dist-install/build/cbits/atomic.o] Error 1
make[1]: *** Waiting for unfinished jobs....
libraries/ghc-prim/cbits/atomic.c:318:54: error:
error: '__ATOMIC_SEQ_CST' undeclared (first use in this function)
|
318 | __atomic_store_n((StgWord32 *) x, (StgWord32) val, __ATOMIC_SEQ_CST);
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicwrite64':
libraries/ghc-prim/cbits/atomic.c:325:54: error:
error: '__ATOMIC_SEQ_CST' undeclared (first use in this function)
|
325 | __atomic_store_n((StgWord64 *) x, (StgWord64) val, __ATOMIC_SEQ_CST);
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicread64':
libraries/ghc-prim/cbits/atomic.c:294:1: error:
error: control reaches end of non-void function [-Werror=return-type]
|
294 | }
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicread32':
libraries/ghc-prim/cbits/atomic.c:287:1: error:
error: control reaches end of non-void function [-Werror=return-type]
|
287 | }
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicread16':
libraries/ghc-prim/cbits/atomic.c:280:1: error:
error: control reaches end of non-void function [-Werror=return-type]
|
280 | }
| ^
libraries/ghc-prim/cbits/atomic.c: In function 'hs_atomicread8':
libraries/ghc-prim/cbits/atomic.c:273:1: error:
error: control reaches end of non-void function [-Werror=return-type]
|
273 | }
| ^
cc1: all warnings being treated as errors
`gcc' failed in phase `C Compiler'. (Exit code: 1)
make[1]: *** [libraries/ghc-prim/dist-install/build/cbits/atomic.dyn_o] Error 1
<

Simon Peyton Jones via ghc-devs
Ben: I'm getting this from a clean build on Linux. Any ideas? I'm up to date on master
git branch -v
data-kind-syntax 4174458178 Add IfacePromotionInfo
* master 436b3ef01e Clean up comments about match algorithm a bit.
tc-untouchables b737a45391 More simplifications to the constraint solver
type-nats 87d2a63b8d [behind 1491] Fix uses of (<=?) as a function to reduce properly.
wip/pattern-synonyms e54d396752 [ahead 6, behind 4569] Comments and tracing only
wip/spj-T13397 43540c8c6b Improve code generation for conditionals
wip/spj-early-inline 8515fcfa91 Mark non-recursive join lambdas as one-shot
simonpj@cam-05-unx:~/code/HEAD/compiler$
Simon
libraries/ghc-prim/cbits/atomic.c:311:54: error:
error: '__ATOMIC_SEQ_CST' undeclared (first use in this function)
This is due to Peter Trommler's D4009 (bd765f4b1332b3d2a7908de3f9ff1d50da0e0b1d). This changes the atomic primops to use new GCC builtins available only in GCC 4.7 and later. This version was released in 2012, so I thought we would be fairly safe requiring it. This is another case where upgrading your Ubuntu installation will help. That being said, we should certainly provide a better error message, perhaps catching this in `configure` instead of failing during the build. We could also provide a fallback in the event that we are compiling with an older gcc, although I'm not sure that this is worth the effort. Cheers, - Ben
participants (2)
-
Ben Gamari
-
Simon Peyton Jones