[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiler error on macOS Siera with address@hidden
From: |
Eric Blake |
Subject: |
Re: compiler error on macOS Siera with address@hidden |
Date: |
Fri, 23 Sep 2016 13:43:03 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 09/23/2016 01:19 PM, Denis Davydov wrote:
> Hi Eric,
>
> Thanks for the swift reply.
>
>>
>> Can you look in config.log, and see why configure seems to think that
>> HAVE_STRUCT_SCHED_PARAM was set to 0 on your platform (since it is
>
> it is indeed set to 0. Searching for HAVE_STRUCT_SCHED_PARAM in config.log
> reveals a single line only, so i don’t know where it is set and why.
> Config log is attached.
Thanks. The log includes:
configure:28741: /Users/davydden/spack/lib/spack/env/gcc/gcc -c -g -O2
-I/Users/davydden/spack/opt/spack/darwin-sierra-x86_64/gcc-6.2.0/libsigsegv-2.10-dduf3ib2khihptbot54hgma7ow2f3zcx/include
conftest.c >&5
In file included from /usr/include/sched.h:27:0,
from conftest.c:274:
/usr/include/pthread_impl.h:32:18: error: missing binary operator before
token "("
#if __has_feature(assume_nonnull)
^
/usr/include/pthread_impl.h:62:18: error: missing binary operator before
token "("
#if __has_feature(assume_nonnull)
^
conftest.c:277:8: error: unknown type name 'pid_t'
pid_t t1;
^~~~~
configure:28741: $? = 1
configure: failed program was:
...
| /* end confdefs.h. */
|
| #include <sched.h>
| struct sched_param a;
| int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
| pid_t t1;
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:28828: checking for struct sched_param
configure:28828: /Users/davydden/spack/lib/spack/env/gcc/gcc -c -g -O2
-I/Users/davydden/spack/opt/spack/darwin-sierra-x86_64/gcc-6.2.0/libsigsegv-2.10-dduf3ib2khihptbot54hgma7ow2f3zcx/include
conftest.c >&5
In file included from /usr/include/sched.h:27:0,
from conftest.c:273:
/usr/include/pthread_impl.h:32:18: error: missing binary operator before
token "("
#if __has_feature(assume_nonnull)
^
/usr/include/pthread_impl.h:62:18: error: missing binary operator before
token "("
#if __has_feature(assume_nonnull)
^
configure:28828: $? = 1
configure: failed program was:
...
and it looks like the test program tried a bunch of #define followed by
an #include <sched.h> as its first header.
So something about your system is causing the inclusion of <sched.h> in
isolation to be treated as a syntax error when it calls out to
/usr/include/pthread_impl.h. I don't know what is supposed to be
happening with the __has_feature() stuff, or if including some other
header prior to <sched.h> will avoid the compilation error; but the
reason your compilation failed is because configure was unable to probe
for the presence of sched_param due to the unrelated compilation failure.
Is that something you can figure out where things are going wrong, or if
an additional header included before <sched.h> fixes things?
>> around the issue by setting appropriate cache variables during the
>> configure run?
>
> I tried adding
>
> HAVE_STRUCT_SCHED_PARAM=1
>
> to ./configure but it does not change anything. How do I do that?
./configure ac_cv_type_struct_sched_param=yes
If that works, it is basically telling configure the desired answer to
the probe (the answer that is not happening due to the unrelated syntax
error).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: compiler error on macOS Siera with address@hidden, Eric Blake, 2016/09/23
- Re: compiler error on macOS Siera with address@hidden, Denis Davydov, 2016/09/23
- Re: compiler error on macOS Siera with address@hidden, Denis Davydov, 2016/09/23
- Re: compiler error on macOS Siera with address@hidden, Paul Eggert, 2016/09/23
- Re: compiler error on macOS Siera with address@hidden, Denis Davydov, 2016/09/23
- Re: compiler error on macOS Siera with address@hidden, Eric Blake, 2016/09/23
- Re: compiler error on macOS Siera with address@hidden, Paul Eggert, 2016/09/23
- Re: compiler error on macOS Siera with address@hidden, Denis Davydov, 2016/09/23
- Re: compiler error on macOS Siera with address@hidden, Paul Eggert, 2016/09/25
Re: compiler error on macOS Siera with address@hidden,
Eric Blake <=