* pipe2 & configure script @ 2021-07-07 3:24 Richard Zak 2021-07-07 4:42 ` Thomas Huth 2021-07-07 14:32 ` Paolo Bonzini 0 siblings, 2 replies; 5+ messages in thread From: Richard Zak @ 2021-07-07 3:24 UTC (permalink / raw) To: QEMU Developers [-- Attachment #1: Type: text/plain, Size: 388 bytes --] What conditions are required for "#define CONFIG_PIPE2" to be set in build/config-host.h? It prevents building for Haiku as pipe2() doesn't exist. I didn't see anything in the configure script regarding pipe2. I also updated my code to the latest in the repository and this issue just popped up. -- Regards, Richard J. Zak Professional Genius PGP Key: https://keybase.io/rjzak/key.asc [-- Attachment #2: Type: text/html, Size: 712 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: pipe2 & configure script 2021-07-07 3:24 pipe2 & configure script Richard Zak @ 2021-07-07 4:42 ` Thomas Huth 2021-07-07 14:36 ` Paolo Bonzini 2021-07-07 14:32 ` Paolo Bonzini 1 sibling, 1 reply; 5+ messages in thread From: Thomas Huth @ 2021-07-07 4:42 UTC (permalink / raw) To: Richard Zak, QEMU Developers On 07/07/2021 05.24, Richard Zak wrote: > What conditions are required for "#define CONFIG_PIPE2" to be set in > build/config-host.h? It prevents building for Haiku as pipe2() doesn't > exist. I didn't see anything in the configure script regarding pipe2. I also > updated my code to the latest in the repository and this issue just popped up. CONFIG_PIPE2 is set from meson.build instead of the configure script. But why is this blocking your build? The only relevant spot is in util/oslib-posix.c and there is a fallback to the normal pipe() function there... Thomas ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: pipe2 & configure script 2021-07-07 4:42 ` Thomas Huth @ 2021-07-07 14:36 ` Paolo Bonzini 0 siblings, 0 replies; 5+ messages in thread From: Paolo Bonzini @ 2021-07-07 14:36 UTC (permalink / raw) To: Thomas Huth, Richard Zak, QEMU Developers On 07/07/21 06:42, Thomas Huth wrote: >> What conditions are required for "#define CONFIG_PIPE2" to be set in >> build/config-host.h? It prevents building for Haiku as pipe2() doesn't >> exist. I didn't see anything in the configure script regarding pipe2. >> I also updated my code to the latest in the repository and this issue >> just popped up. > > CONFIG_PIPE2 is set from meson.build instead of the configure script. > But why is this blocking your build? The only relevant spot is in > util/oslib-posix.c and there is a fallback to the normal pipe() function > there... I suspect the compilation is succeeding with a warning, but linking is not successful. The correct fix is anyway to use a linker test, because a compiler test would not detect a broken system header/library combo, where the prototype is defined but the function is not included. Paolo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: pipe2 & configure script 2021-07-07 3:24 pipe2 & configure script Richard Zak 2021-07-07 4:42 ` Thomas Huth @ 2021-07-07 14:32 ` Paolo Bonzini 2021-07-08 2:37 ` Richard Zak 1 sibling, 1 reply; 5+ messages in thread From: Paolo Bonzini @ 2021-07-07 14:32 UTC (permalink / raw) To: Richard Zak, QEMU Developers On 07/07/21 05:24, Richard Zak wrote: > What conditions are required for "#define CONFIG_PIPE2" to be set in > build/config-host.h? It prevents building for Haiku as pipe2() doesn't > exist. I didn't see anything in the configure script regarding pipe2. I > also updated my code to the latest in the repository and this issue just > popped up. Does this help? diff --git a/meson.build b/meson.build index 660e294b7e..32d5bd3685 100644 --- a/meson.build +++ b/meson.build @@ -1339,7 +1339,7 @@ config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM', config_host_data.set('CONFIG_EVENTFD', cc.compiles(''' #include <sys/eventfd.h> int main(void) { return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); }''')) -config_host_data.set('CONFIG_FDATASYNC', cc.compiles(gnu_source_prefix + ''' +config_host_data.set('CONFIG_FDATASYNC', cc.links(gnu_source_prefix + ''' #include <unistd.h> int main(void) { #if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 @@ -1356,14 +1356,14 @@ config_host_data.set('CONFIG_MADVISE', cc.compiles(gnu_source_prefix + ''' config_host_data.set('CONFIG_MEMFD', cc.compiles(gnu_source_prefix + ''' #include <sys/mman.h> int main(void) { return memfd_create("foo", MFD_ALLOW_SEALING); }''')) -config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.compiles(gnu_source_prefix + ''' +config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.links(gnu_source_prefix + ''' #include <fcntl.h> #if !defined(AT_EMPTY_PATH) # error missing definition #else int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); } #endif''')) -config_host_data.set('CONFIG_PIPE2', cc.compiles(gnu_source_prefix + ''' +config_host_data.set('CONFIG_PIPE2', cc.links(gnu_source_prefix + ''' #include <unistd.h> #include <fcntl.h> ? Paolo ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: pipe2 & configure script 2021-07-07 14:32 ` Paolo Bonzini @ 2021-07-08 2:37 ` Richard Zak 0 siblings, 0 replies; 5+ messages in thread From: Richard Zak @ 2021-07-08 2:37 UTC (permalink / raw) To: Paolo Bonzini, QEMU Developers, Thomas Huth [-- Attachment #1: Type: text/plain, Size: 2218 bytes --] În mie., 7 iul. 2021 la 10:32, Paolo Bonzini <pbonzini@redhat.com> a scris: > On 07/07/21 05:24, Richard Zak wrote: > > What conditions are required for "#define CONFIG_PIPE2" to be set in > > build/config-host.h? It prevents building for Haiku as pipe2() doesn't > > exist. I didn't see anything in the configure script regarding pipe2. I > > also updated my code to the latest in the repository and this issue just > > popped up. > > Does this help? > > diff --git a/meson.build b/meson.build > index 660e294b7e..32d5bd3685 100644 > --- a/meson.build > +++ b/meson.build > @@ -1339,7 +1339,7 @@ config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM', > config_host_data.set('CONFIG_EVENTFD', cc.compiles(''' > #include <sys/eventfd.h> > int main(void) { return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); }''')) > -config_host_data.set('CONFIG_FDATASYNC', cc.compiles(gnu_source_prefix + > ''' > +config_host_data.set('CONFIG_FDATASYNC', cc.links(gnu_source_prefix + ''' > #include <unistd.h> > int main(void) { > #if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 > @@ -1356,14 +1356,14 @@ config_host_data.set('CONFIG_MADVISE', > cc.compiles(gnu_source_prefix + ''' > config_host_data.set('CONFIG_MEMFD', cc.compiles(gnu_source_prefix + ''' > #include <sys/mman.h> > int main(void) { return memfd_create("foo", MFD_ALLOW_SEALING); }''')) > -config_host_data.set('CONFIG_OPEN_BY_HANDLE', > cc.compiles(gnu_source_prefix + ''' > +config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.links(gnu_source_prefix > + ''' > #include <fcntl.h> > #if !defined(AT_EMPTY_PATH) > # error missing definition > #else > int main(void) { struct file_handle fh; return open_by_handle_at(0, > &fh, 0); } > #endif''')) > -config_host_data.set('CONFIG_PIPE2', cc.compiles(gnu_source_prefix + ''' > +config_host_data.set('CONFIG_PIPE2', cc.links(gnu_source_prefix + ''' > #include <unistd.h> > #include <fcntl.h> > > ? > > Paolo > > That did it! build/config-host.h now has "#undef CONFIG_PIPE2" and the code compiles. -- Regards, Richard J. Zak Professional Genius PGP Key: https://keybase.io/rjzak/key.asc [-- Attachment #2: Type: text/html, Size: 3196 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-08 2:38 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-07-07 3:24 pipe2 & configure script Richard Zak 2021-07-07 4:42 ` Thomas Huth 2021-07-07 14:36 ` Paolo Bonzini 2021-07-07 14:32 ` Paolo Bonzini 2021-07-08 2:37 ` Richard Zak
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.