* bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 on macOS
@ 2017-02-19 8:41 ilove zfs
2017-02-20 22:18 ` bug#25791: atomics " Matt Wette
2017-03-01 16:43 ` bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 " Andy Wingo
0 siblings, 2 replies; 4+ messages in thread
From: ilove zfs @ 2017-02-19 8:41 UTC (permalink / raw)
To: 25791
[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]
On macOS 10.11 and 10.12 building with Xcode 8, guile 2.1.7 fails to compile with several errors saying "address argument to atomic operation must be a pointer to _Atomic type." I can avoid this by setting ac_cv_header_stdatomic_h=no.
Build logs here:
https://gist.github.com/ilovezfs/b18b7e6160e0a4c5da297cc430961f63
https://gist.github.com/57e1513e03ede26dc97c0f63eaad3a98
Build failure is
```
CC libguile_2.2_la-arrays.lo
CC libguile_2.2_la-async.lo
In file included from async.c:27:
../libguile/atomics-internal.h:37:10: error: address argument to atomic operation must be a pointer to _Atomic type ('gl_uint32_t *' (aka 'unsigned int *') invalid)
return atomic_fetch_sub (loc, arg);
^ ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/stdatomic.h:149:43: note: expanded from macro 'atomic_fetch_sub'
#define atomic_fetch_sub(object, operand) __c11_atomic_fetch_sub(object, operand, __ATOMIC_SEQ_CST)
```
and several similar errors.
Previously (as of guile 2.1.4) I had been able to work around the issue without setting ac_cv_header_stdatomic_h=no with this patch:
https://raw.githubusercontent.com/ilovezfs/formula-patches/d2798a468346a7a28fbcd1c8aa3c1ccd5627b03f/guile/guile-atomic-type.patch
However, the patch is no longer sufficient since now void** is one the types needing _Atomic, which isn't allowed.
[-- Attachment #2.1: Type: text/html, Size: 2165 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#25791: atomics on macOS
2017-02-19 8:41 bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 on macOS ilove zfs
@ 2017-02-20 22:18 ` Matt Wette
2017-03-01 16:43 ` bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 " Andy Wingo
1 sibling, 0 replies; 4+ messages in thread
From: Matt Wette @ 2017-02-20 22:18 UTC (permalink / raw)
To: 25791
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
I saw this too and gave up trying to fix it. I think this needs to be worked bottom up: I believe the C99 standard is specific about the type qualifier _Atomic being present for the first argument. The workaround for now IMO, is to change atomics-internal.h from this:
#ifdef HAVE_STDATOMIC_H
to this:
#if (defined HAVE_STDATOMIC_H) && (!defined __clang__)
By the way, gcc is forgiving here.
Matt
[-- Attachment #2: Type: text/html, Size: 2369 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 on macOS
2017-02-19 8:41 bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 on macOS ilove zfs
2017-02-20 22:18 ` bug#25791: atomics " Matt Wette
@ 2017-03-01 16:43 ` Andy Wingo
2017-03-14 12:06 ` Andy Wingo
1 sibling, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2017-03-01 16:43 UTC (permalink / raw)
To: ilove zfs; +Cc: 25791
On Sun 19 Feb 2017 09:41, ilove zfs <ilovezfs@icloud.com> writes:
> On macOS 10.11 and 10.12 building with Xcode 8, guile 2.1.7 fails to compile with several errors saying "address argument to atomic operation must be a pointer to _Atomic type." I
> can avoid this by setting ac_cv_header_stdatomic_h=no.
>
> Build logs here:
> https://gist.github.com/ilovezfs/b18b7e6160e0a4c5da297cc430961f63
> https://gist.github.com/57e1513e03ede26dc97c0f63eaad3a98
>
> Build failure is
> ```
> CC libguile_2.2_la-arrays.lo
> CC libguile_2.2_la-async.lo
> In file included from async.c:27:
> ../libguile/atomics-internal.h:37:10: error: address argument to atomic operation must be a pointer to _Atomic type ('gl_uint32_t *' (aka 'unsigned int *') invalid)
> return atomic_fetch_sub (loc, arg);
> ^ ~~~
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/stdatomic.h:149:43: note: expanded from macro 'atomic_fetch_sub'
> #define atomic_fetch_sub(object, operand) __c11_atomic_fetch_sub(object, operand, __ATOMIC_SEQ_CST)
> ```
> and several similar errors.
>
> Previously (as of guile 2.1.4) I had been able to work around the issue without setting ac_cv_header_stdatomic_h=no with this patch:
> https://raw.githubusercontent.com/ilovezfs/formula-patches/d2798a468346a7a28fbcd1c8aa3c1ccd5627b03f/guile/guile-atomic-type.patch
>
> However, the patch is no longer sufficient since now void** is one the types needing _Atomic, which isn't allowed.
Any ideas here? Sure would be nice to release a Guile with atomics that
compiles with clang.
Andy
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 on macOS
2017-03-01 16:43 ` bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 " Andy Wingo
@ 2017-03-14 12:06 ` Andy Wingo
0 siblings, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2017-03-14 12:06 UTC (permalink / raw)
To: ilove zfs; +Cc: 25791-done
On Wed 01 Mar 2017 17:43, Andy Wingo <wingo@pobox.com> writes:
> On Sun 19 Feb 2017 09:41, ilove zfs <ilovezfs@icloud.com> writes:
>
>> On macOS 10.11 and 10.12 building with Xcode 8, guile 2.1.7 fails to
>> compile with several errors saying "address argument to atomic
>> operation must be a pointer to _Atomic type." I
>> can avoid this by setting ac_cv_header_stdatomic_h=no.
>>
>> Build logs here:
>> https://gist.github.com/ilovezfs/b18b7e6160e0a4c5da297cc430961f63
>> https://gist.github.com/57e1513e03ede26dc97c0f63eaad3a98
>>
>> Build failure is
>> ```
>> CC libguile_2.2_la-arrays.lo
>> CC libguile_2.2_la-async.lo
>> In file included from async.c:27:
>> ../libguile/atomics-internal.h:37:10: error: address argument to
>> atomic operation must be a pointer to _Atomic type ('gl_uint32_t *'
>> (aka 'unsigned int *') invalid)
>> return atomic_fetch_sub (loc, arg);
>> ^ ~~~
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/stdatomic.h:149:43:
>> note: expanded from macro 'atomic_fetch_sub'
>> #define atomic_fetch_sub(object, operand) __c11_atomic_fetch_sub(object, operand, __ATOMIC_SEQ_CST)
>> ```
>> and several similar errors.
>>
>> Previously (as of guile 2.1.4) I had been able to work around the issue without setting ac_cv_header_stdatomic_h=no with this patch:
>> https://raw.githubusercontent.com/ilovezfs/formula-patches/d2798a468346a7a28fbcd1c8aa3c1ccd5627b03f/guile/guile-atomic-type.patch
>>
>> However, the patch is no longer sufficient since now void** is one the types needing _Atomic, which isn't allowed.
>
> Any ideas here? Sure would be nice to release a Guile with atomics that
> compiles with clang.
Fixed in 2.1.8 I think.
Andy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-14 12:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-19 8:41 bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 on macOS ilove zfs
2017-02-20 22:18 ` bug#25791: atomics " Matt Wette
2017-03-01 16:43 ` bug#25791: address argument to atomic operation must be a pointer to _Atomic type with 2.1.7 " Andy Wingo
2017-03-14 12:06 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).