All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
@ 2017-05-31 12:00 Kamil Rytarowski
  2017-06-01 10:00 ` Michael Tokarev
  2017-06-05 14:29 ` Michael Tokarev
  0 siblings, 2 replies; 17+ messages in thread
From: Kamil Rytarowski @ 2017-05-31 12:00 UTC (permalink / raw)
  To: qemu-trivial
  Cc: qemu-devel, eblake, peter.maydell, marcandre.lureau, f4bug,
	armbru, Kamil Rytarowski

Currently ivshmem requires eventfd() which is Linux specific.
Do not and build it unconditionally on every Linux/BSD/Solaris.

This patch indirectly fixes build failure on NetBSD, where these tools
additionally require -lrt for shm_open(3). In future there should be
added support for NetBSD and the linking addressed appropriately.

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
 configure                            | 2 ++
 contrib/ivshmem-client/Makefile.objs | 2 +-
 contrib/ivshmem-server/Makefile.objs | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 1a5ee4b909..483307be53 100755
--- a/configure
+++ b/configure
@@ -4928,6 +4928,8 @@ if test "$want_tools" = "yes" ; then
   tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     tools="qemu-nbd\$(EXESUF) $tools"
+  fi
+  if [ "$eventfd" = "yes" ]; then
     tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools"
   fi
 fi
diff --git a/contrib/ivshmem-client/Makefile.objs b/contrib/ivshmem-client/Makefile.objs
index bfab2d20dd..13d864082d 100644
--- a/contrib/ivshmem-client/Makefile.objs
+++ b/contrib/ivshmem-client/Makefile.objs
@@ -1 +1 @@
-ivshmem-client-obj-y = ivshmem-client.o main.o
+ivshmem-client-obj-$(CONFIG_IVSHMEM) = ivshmem-client.o main.o
diff --git a/contrib/ivshmem-server/Makefile.objs b/contrib/ivshmem-server/Makefile.objs
index c060dd3698..d9469fd777 100644
--- a/contrib/ivshmem-server/Makefile.objs
+++ b/contrib/ivshmem-server/Makefile.objs
@@ -1 +1 @@
-ivshmem-server-obj-y = ivshmem-server.o main.o
+ivshmem-server-obj-$(CONFIG_IVSHMEM) = ivshmem-server.o main.o
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-05-31 12:00 [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available Kamil Rytarowski
@ 2017-06-01 10:00 ` Michael Tokarev
  2017-06-05 14:29 ` Michael Tokarev
  1 sibling, 0 replies; 17+ messages in thread
From: Michael Tokarev @ 2017-06-01 10:00 UTC (permalink / raw)
  To: Kamil Rytarowski, qemu-trivial
  Cc: qemu-devel, armbru, marcandre.lureau, peter.maydell, eblake, f4bug

31.05.2017 15:00, Kamil Rytarowski wrote:
> Currently ivshmem requires eventfd() which is Linux specific.
> Do not and build it unconditionally on every Linux/BSD/Solaris.
> 
> This patch indirectly fixes build failure on NetBSD, where these tools
> additionally require -lrt for shm_open(3). In future there should be
> added support for NetBSD and the linking addressed appropriately.

Applied to -trivial, thanks!

/mjt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-05-31 12:00 [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available Kamil Rytarowski
  2017-06-01 10:00 ` Michael Tokarev
@ 2017-06-05 14:29 ` Michael Tokarev
  2017-06-05 14:52   ` [Qemu-devel] [Qemu-trivial] " Kamil Rytarowski
  2017-06-22 15:54   ` [Qemu-devel] " Peter Maydell
  1 sibling, 2 replies; 17+ messages in thread
From: Michael Tokarev @ 2017-06-05 14:29 UTC (permalink / raw)
  To: Kamil Rytarowski, qemu-trivial
  Cc: qemu-devel, armbru, marcandre.lureau, peter.maydell, eblake, f4bug

31.05.2017 15:00, Kamil Rytarowski wrote:
> Currently ivshmem requires eventfd() which is Linux specific.
> Do not and build it unconditionally on every Linux/BSD/Solaris.
> 
> This patch indirectly fixes build failure on NetBSD, where these tools
> additionally require -lrt for shm_open(3). In future there should be
> added support for NetBSD and the linking addressed appropriately.

Unfortunately this breaks static build.

$ ../configure --disable-system --disable-linux-user --static
$ make V=1
...
c++ -I/usr/include/pixman-1  -Werror -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -m64 -mcx16 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes
-fno-strict-aliasing -fno-common -fwrapv  -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong
-I/usr/include/libpng16 -I/build/qemu/git/tests -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g  -Wl,--warn-common -m64 -static -g  -o ivshmem-server
libqemuutil.a libqemustub.a   -lm -lgthread-2.0 -pthread -lglib-2.0 -pthread -lpcre -pthread  -lz -lrt -lz -lnettle  -lutil
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
Makefile:475: error building «ivshmem-server»
$ _

I'll take a look at this later. reverting it for now.

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-05 14:29 ` Michael Tokarev
@ 2017-06-05 14:52   ` Kamil Rytarowski
  2017-06-06  6:54     ` Markus Armbruster
  2017-06-22 15:54   ` [Qemu-devel] " Peter Maydell
  1 sibling, 1 reply; 17+ messages in thread
From: Kamil Rytarowski @ 2017-06-05 14:52 UTC (permalink / raw)
  To: Michael Tokarev, qemu-trivial
  Cc: armbru, f4bug, qemu-devel, marcandre.lureau, peter.maydell, eblake

[-- Attachment #1: Type: text/plain, Size: 1807 bytes --]

On 05.06.2017 16:29, Michael Tokarev wrote:
> 31.05.2017 15:00, Kamil Rytarowski wrote:
>> Currently ivshmem requires eventfd() which is Linux specific.
>> Do not and build it unconditionally on every Linux/BSD/Solaris.
>>
>> This patch indirectly fixes build failure on NetBSD, where these tools
>> additionally require -lrt for shm_open(3). In future there should be
>> added support for NetBSD and the linking addressed appropriately.
> 
> Unfortunately this breaks static build.
> 
> $ ../configure --disable-system --disable-linux-user --static
> $ make V=1
> ...
> c++ -I/usr/include/pixman-1  -Werror -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -m64 -mcx16 -D_GNU_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes
> -fno-strict-aliasing -fno-common -fwrapv  -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs
> -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong
> -I/usr/include/libpng16 -I/build/qemu/git/tests -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g  -Wl,--warn-common -m64 -static -g  -o ivshmem-server
> libqemuutil.a libqemustub.a   -lm -lgthread-2.0 -pthread -lglib-2.0 -pthread -lpcre -pthread  -lz -lrt -lz -lnettle  -lutil
> /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crt1.o: In function `_start':
> (.text+0x20): undefined reference to `main'
> collect2: error: ld returned 1 exit status
> Makefile:475: error building «ivshmem-server»
> $ _
> 
> I'll take a look at this later. reverting it for now.
> 
> Thanks,
> 
> /mjt
> 

I will try to reproduce it locally.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-05 14:52   ` [Qemu-devel] [Qemu-trivial] " Kamil Rytarowski
@ 2017-06-06  6:54     ` Markus Armbruster
  2017-06-06  7:10       ` [Qemu-devel] " Michael Tokarev
  0 siblings, 1 reply; 17+ messages in thread
From: Markus Armbruster @ 2017-06-06  6:54 UTC (permalink / raw)
  To: Kamil Rytarowski
  Cc: Michael Tokarev, qemu-trivial, qemu-devel, marcandre.lureau,
	peter.maydell, f4bug

Kamil Rytarowski <n54@gmx.com> writes:

> On 05.06.2017 16:29, Michael Tokarev wrote:
>> 31.05.2017 15:00, Kamil Rytarowski wrote:
>>> Currently ivshmem requires eventfd() which is Linux specific.
>>> Do not and build it unconditionally on every Linux/BSD/Solaris.
>>>
>>> This patch indirectly fixes build failure on NetBSD, where these tools
>>> additionally require -lrt for shm_open(3). In future there should be
>>> added support for NetBSD and the linking addressed appropriately.
>> 
>> Unfortunately this breaks static build.
>> 
>> $ ../configure --disable-system --disable-linux-user --static
>> $ make V=1
>> ...
>> c++ -I/usr/include/pixman-1  -Werror -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -m64 -mcx16 -D_GNU_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes
>> -fno-strict-aliasing -fno-common -fwrapv  -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs
>> -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong
>> -I/usr/include/libpng16 -I/build/qemu/git/tests -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g  -Wl,--warn-common -m64 -static -g  -o ivshmem-server
>> libqemuutil.a libqemustub.a   -lm -lgthread-2.0 -pthread -lglib-2.0 -pthread -lpcre -pthread  -lz -lrt -lz -lnettle  -lutil
>> /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crt1.o: In function `_start':
>> (.text+0x20): undefined reference to `main'
>> collect2: error: ld returned 1 exit status
>> Makefile:475: error building «ivshmem-server»
>> $ _
>> 
>> I'll take a look at this later. reverting it for now.
>> 
>> Thanks,
>> 
>> /mjt
>> 
>
> I will try to reproduce it locally.

I haven't, but here's a quick guess on what we need to squash into the
patch:

diff --git a/Makefile b/Makefile
index c830d7a..2ef5a78 100644
--- a/Makefile
+++ b/Makefile
@@ -469,10 +469,12 @@ ifneq ($(EXESUF),)
 qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
 endif
 
+ifdef CONFIG_IVSHMEM
 ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
+endif
 
 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
 	$(call quiet-command,$(PYTHON) $< $@ \
diff --git a/tests/Makefile.include b/tests/Makefile.include
index f42f3df..ab70d01 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -203,7 +203,7 @@ gcov-files-pci-y += hw/display/virtio-gpu-pci.c
 gcov-files-pci-$(CONFIG_VIRTIO_VGA) += hw/display/virtio-vga.c
 check-qtest-pci-y += tests/intel-hda-test$(EXESUF)
 gcov-files-pci-y += hw/audio/intel-hda.c hw/audio/hda-codec.c
-check-qtest-pci-$(CONFIG_EVENTFD) += tests/ivshmem-test$(EXESUF)
+check-qtest-pci-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF)
 gcov-files-pci-y += hw/misc/ivshmem.c
 
 check-qtest-i386-y = tests/endianness-test$(EXESUF)

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-06  6:54     ` Markus Armbruster
@ 2017-06-06  7:10       ` Michael Tokarev
  2017-06-06 11:05         ` Markus Armbruster
  2017-06-06 13:38         ` Kamil Rytarowski
  0 siblings, 2 replies; 17+ messages in thread
From: Michael Tokarev @ 2017-06-06  7:10 UTC (permalink / raw)
  To: Markus Armbruster, Kamil Rytarowski
  Cc: qemu-trivial, qemu-devel, marcandre.lureau, peter.maydell, f4bug

06.06.2017 09:54, Markus Armbruster wrote:

[ ./configure --disable-linux-user --disable-system --static ]

> I haven't, but here's a quick guess on what we need to squash into the
> patch:
> 
> diff --git a/Makefile b/Makefile
> index c830d7a..2ef5a78 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -469,10 +469,12 @@ ifneq ($(EXESUF),)
>  qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
>  endif
>  
> +ifdef CONFIG_IVSHMEM
>  ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
>  	$(call LINK, $^)
>  ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
>  	$(call LINK, $^)
> +endif

This effectively disables building ivshmem executables on this config
on linux, while previously they were building fine. Hmm..

/mjt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-06  7:10       ` [Qemu-devel] " Michael Tokarev
@ 2017-06-06 11:05         ` Markus Armbruster
  2017-06-06 13:38         ` Kamil Rytarowski
  1 sibling, 0 replies; 17+ messages in thread
From: Markus Armbruster @ 2017-06-06 11:05 UTC (permalink / raw)
  To: Michael Tokarev
  Cc: Kamil Rytarowski, qemu-trivial, peter.maydell, marcandre.lureau,
	qemu-devel, f4bug

Michael Tokarev <mjt@tls.msk.ru> writes:

> 06.06.2017 09:54, Markus Armbruster wrote:
>
> [ ./configure --disable-linux-user --disable-system --static ]
>
>> I haven't, but here's a quick guess on what we need to squash into the
>> patch:
>> 
>> diff --git a/Makefile b/Makefile
>> index c830d7a..2ef5a78 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -469,10 +469,12 @@ ifneq ($(EXESUF),)
>>  qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
>>  endif
>>  
>> +ifdef CONFIG_IVSHMEM
>>  ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
>>  	$(call LINK, $^)
>>  ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
>>  	$(call LINK, $^)
>> +endif
>
> This effectively disables building ivshmem executables on this config
> on linux, while previously they were building fine. Hmm..

These executables are only useful together with an ivshmem device.  Not
building them when they can't be useful makes sense to me.

See previous discussion
Message-ID: <87fufwjfqw.fsf@dusky.pond.sub.org>
https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg05108.html

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-06  7:10       ` [Qemu-devel] " Michael Tokarev
  2017-06-06 11:05         ` Markus Armbruster
@ 2017-06-06 13:38         ` Kamil Rytarowski
  2017-06-06 14:34           ` Peter Maydell
  1 sibling, 1 reply; 17+ messages in thread
From: Kamil Rytarowski @ 2017-06-06 13:38 UTC (permalink / raw)
  To: Michael Tokarev, Markus Armbruster
  Cc: qemu-trivial, qemu-devel, marcandre.lureau, Peter Maydell, f4bug

[-- Attachment #1: Type: text/plain, Size: 2404 bytes --]

On 06.06.2017 09:10, Michael Tokarev wrote:
> 06.06.2017 09:54, Markus Armbruster wrote:
> 
> [ ./configure --disable-linux-user --disable-system --static ]
> 
>> I haven't, but here's a quick guess on what we need to squash into the
>> patch:
>>
>> diff --git a/Makefile b/Makefile
>> index c830d7a..2ef5a78 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -469,10 +469,12 @@ ifneq ($(EXESUF),)
>>  qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
>>  endif
>>  
>> +ifdef CONFIG_IVSHMEM
>>  ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
>>  	$(call LINK, $^)
>>  ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
>>  	$(call LINK, $^)
>> +endif
> 
> This effectively disables building ivshmem executables on this config
> on linux, while previously they were building fine. Hmm..
> 
> /mjt
> 

I've linked qemu with the original patch and:
./configure --disable-linux-user --disable-system --static

I got some warnings, I think they are originated from our libc and are
not related to qemu:
  LINK    sparc64-bsd-user/qemu-sparc64
/usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
overridden by definition
/usr/lib/crt0.o: warning: defined here
/usr/lib/libc.a(_env.o): warning: multiple common of `environ'
/usr/lib/crt0.o: warning: previous common is here
/usr/lib/libc.a(getprogname.o): warning: common of `__progname'
overridden by definition
/usr/lib/crt0.o: warning: defined here
  LINK    x86_64-bsd-user/qemu-x86_64
/usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
overridden by definition
/usr/lib/crt0.o: warning: defined here
/usr/lib/libc.a(_env.o): warning: multiple common of `environ'
/usr/lib/crt0.o: warning: previous common is here
/usr/lib/libc.a(getprogname.o): warning: common of `__progname'
overridden by definition
/usr/lib/crt0.o: warning: defined here
  LINK    i386-bsd-user/qemu-i386
/usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
overridden by definition
/usr/lib/crt0.o: warning: defined here
/usr/lib/libc.a(_env.o): warning: multiple common of `environ'
/usr/lib/crt0.o: warning: previous common is here
/usr/lib/libc.a(getprogname.o): warning: common of `__progname'
overridden by definition
/usr/lib/crt0.o: warning: defined here

I will ask other NetBSD developers about __ps_strings, environ and
__progname.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-06 13:38         ` Kamil Rytarowski
@ 2017-06-06 14:34           ` Peter Maydell
  2017-06-06 14:56             ` Kamil Rytarowski
  0 siblings, 1 reply; 17+ messages in thread
From: Peter Maydell @ 2017-06-06 14:34 UTC (permalink / raw)
  To: Kamil Rytarowski
  Cc: Michael Tokarev, Markus Armbruster, QEMU Trivial,
	QEMU Developers, Marc-André Lureau,
	Philippe Mathieu-Daudé

On 6 June 2017 at 14:38, Kamil Rytarowski <n54@gmx.com> wrote:
> I've linked qemu with the original patch and:
> ./configure --disable-linux-user --disable-system --static
>
> I got some warnings, I think they are originated from our libc and are
> not related to qemu:
>   LINK    sparc64-bsd-user/qemu-sparc64
> /usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
> overridden by definition
> /usr/lib/crt0.o: warning: defined here
> /usr/lib/libc.a(_env.o): warning: multiple common of `environ'
> /usr/lib/crt0.o: warning: previous common is here
> /usr/lib/libc.a(getprogname.o): warning: common of `__progname'
> overridden by definition
> /usr/lib/crt0.o: warning: defined here

Yes, I think I've seen those before on NetBSD -- they look
like a bug in your libc to me, it shouldn't be confusing itself
with itself like that :-)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-06 14:34           ` Peter Maydell
@ 2017-06-06 14:56             ` Kamil Rytarowski
  2017-06-10 13:41               ` Kamil Rytarowski
  0 siblings, 1 reply; 17+ messages in thread
From: Kamil Rytarowski @ 2017-06-06 14:56 UTC (permalink / raw)
  To: Peter Maydell
  Cc: QEMU Developers, QEMU Trivial, Michael Tokarev,
	Philippe Mathieu-Daudé,
	Markus Armbruster, Marc-André Lureau

[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]

On 06.06.2017 16:34, Peter Maydell wrote:
> On 6 June 2017 at 14:38, Kamil Rytarowski <n54@gmx.com> wrote:
>> I've linked qemu with the original patch and:
>> ./configure --disable-linux-user --disable-system --static
>>
>> I got some warnings, I think they are originated from our libc and are
>> not related to qemu:
>>   LINK    sparc64-bsd-user/qemu-sparc64
>> /usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
>> overridden by definition
>> /usr/lib/crt0.o: warning: defined here
>> /usr/lib/libc.a(_env.o): warning: multiple common of `environ'
>> /usr/lib/crt0.o: warning: previous common is here
>> /usr/lib/libc.a(getprogname.o): warning: common of `__progname'
>> overridden by definition
>> /usr/lib/crt0.o: warning: defined here
> 
> Yes, I think I've seen those before on NetBSD -- they look
> like a bug in your libc to me, it shouldn't be confusing itself
> with itself like that :-)
> 
> thanks
> -- PMM
> 

I have filed this bug upstream: http://gnats.netbsd.org/52278



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-06 14:56             ` Kamil Rytarowski
@ 2017-06-10 13:41               ` Kamil Rytarowski
  2017-06-10 15:15                 ` Markus Armbruster
  0 siblings, 1 reply; 17+ messages in thread
From: Kamil Rytarowski @ 2017-06-10 13:41 UTC (permalink / raw)
  To: Peter Maydell
  Cc: QEMU Developers, QEMU Trivial, Michael Tokarev,
	Philippe Mathieu-Daudé,
	Markus Armbruster, Marc-André Lureau

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

On 06.06.2017 16:56, Kamil Rytarowski wrote:
> On 06.06.2017 16:34, Peter Maydell wrote:
>> On 6 June 2017 at 14:38, Kamil Rytarowski <n54@gmx.com> wrote:
>>> I've linked qemu with the original patch and:
>>> ./configure --disable-linux-user --disable-system --static
>>>
>>> I got some warnings, I think they are originated from our libc and are
>>> not related to qemu:
>>>   LINK    sparc64-bsd-user/qemu-sparc64
>>> /usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
>>> overridden by definition
>>> /usr/lib/crt0.o: warning: defined here
>>> /usr/lib/libc.a(_env.o): warning: multiple common of `environ'
>>> /usr/lib/crt0.o: warning: previous common is here
>>> /usr/lib/libc.a(getprogname.o): warning: common of `__progname'
>>> overridden by definition
>>> /usr/lib/crt0.o: warning: defined here
>>
>> Yes, I think I've seen those before on NetBSD -- they look
>> like a bug in your libc to me, it shouldn't be confusing itself
>> with itself like that :-)
>>
>> thanks
>> -- PMM
>>
> 
> I have filed this bug upstream: http://gnats.netbsd.org/52278
> 
> 


What's the status with this patch?

NetBSD build still breaks due to ivshmem-*.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-10 13:41               ` Kamil Rytarowski
@ 2017-06-10 15:15                 ` Markus Armbruster
  2017-06-10 15:24                   ` [Qemu-devel] [Qemu-trivial] " Kamil Rytarowski
  0 siblings, 1 reply; 17+ messages in thread
From: Markus Armbruster @ 2017-06-10 15:15 UTC (permalink / raw)
  To: Kamil Rytarowski
  Cc: Peter Maydell, QEMU Trivial, Michael Tokarev, QEMU Developers,
	Marc-André Lureau, Philippe Mathieu-Daudé

Kamil Rytarowski <n54@gmx.com> writes:

> On 06.06.2017 16:56, Kamil Rytarowski wrote:
>> On 06.06.2017 16:34, Peter Maydell wrote:
>>> On 6 June 2017 at 14:38, Kamil Rytarowski <n54@gmx.com> wrote:
>>>> I've linked qemu with the original patch and:
>>>> ./configure --disable-linux-user --disable-system --static
>>>>
>>>> I got some warnings, I think they are originated from our libc and are
>>>> not related to qemu:
>>>>   LINK    sparc64-bsd-user/qemu-sparc64
>>>> /usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
>>>> overridden by definition
>>>> /usr/lib/crt0.o: warning: defined here
>>>> /usr/lib/libc.a(_env.o): warning: multiple common of `environ'
>>>> /usr/lib/crt0.o: warning: previous common is here
>>>> /usr/lib/libc.a(getprogname.o): warning: common of `__progname'
>>>> overridden by definition
>>>> /usr/lib/crt0.o: warning: defined here
>>>
>>> Yes, I think I've seen those before on NetBSD -- they look
>>> like a bug in your libc to me, it shouldn't be confusing itself
>>> with itself like that :-)
>>>
>>> thanks
>>> -- PMM
>>>
>> 
>> I have filed this bug upstream: http://gnats.netbsd.org/52278
>> 
>> 
>
>
> What's the status with this patch?
>
> NetBSD build still breaks due to ivshmem-*.

I guess Michael expects a v4 that doesn't break the static build.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-10 15:15                 ` Markus Armbruster
@ 2017-06-10 15:24                   ` Kamil Rytarowski
  2017-06-19  7:42                     ` Markus Armbruster
  0 siblings, 1 reply; 17+ messages in thread
From: Kamil Rytarowski @ 2017-06-10 15:24 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Peter Maydell, QEMU Trivial, Michael Tokarev,
	Philippe Mathieu-Daudé,
	QEMU Developers, Marc-André Lureau

[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]

On 10.06.2017 17:15, Markus Armbruster wrote:
> Kamil Rytarowski <n54@gmx.com> writes:
> 
>> On 06.06.2017 16:56, Kamil Rytarowski wrote:
>>> On 06.06.2017 16:34, Peter Maydell wrote:
>>>> On 6 June 2017 at 14:38, Kamil Rytarowski <n54@gmx.com> wrote:
>>>>> I've linked qemu with the original patch and:
>>>>> ./configure --disable-linux-user --disable-system --static
>>>>>
>>>>> I got some warnings, I think they are originated from our libc and are
>>>>> not related to qemu:
>>>>>   LINK    sparc64-bsd-user/qemu-sparc64
>>>>> /usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
>>>>> overridden by definition
>>>>> /usr/lib/crt0.o: warning: defined here
>>>>> /usr/lib/libc.a(_env.o): warning: multiple common of `environ'
>>>>> /usr/lib/crt0.o: warning: previous common is here
>>>>> /usr/lib/libc.a(getprogname.o): warning: common of `__progname'
>>>>> overridden by definition
>>>>> /usr/lib/crt0.o: warning: defined here
>>>>
>>>> Yes, I think I've seen those before on NetBSD -- they look
>>>> like a bug in your libc to me, it shouldn't be confusing itself
>>>> with itself like that :-)
>>>>
>>>> thanks
>>>> -- PMM
>>>>
>>>
>>> I have filed this bug upstream: http://gnats.netbsd.org/52278
>>>
>>>
>>
>>
>> What's the status with this patch?
>>
>> NetBSD build still breaks due to ivshmem-*.
> 
> I guess Michael expects a v4 that doesn't break the static build.
> 

-static works for me, I have restricted options to test build on !NetBSD
systems.

Was this patch ok?

diff --git a/Makefile b/Makefile
index c830d7a..2ef5a78 100644
--- a/Makefile
+++ b/Makefile
@@ -469,10 +469,12 @@ ifneq ($(EXESUF),)
 qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
 endif

+ifdef CONFIG_IVSHMEM
 ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
+endif


So I could amend it.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-10 15:24                   ` [Qemu-devel] [Qemu-trivial] " Kamil Rytarowski
@ 2017-06-19  7:42                     ` Markus Armbruster
  2017-06-19 11:06                       ` Kamil Rytarowski
  0 siblings, 1 reply; 17+ messages in thread
From: Markus Armbruster @ 2017-06-19  7:42 UTC (permalink / raw)
  To: Kamil Rytarowski
  Cc: Peter Maydell, QEMU Trivial, Michael Tokarev,
	Philippe Mathieu-Daudé,
	QEMU Developers, Marc-André Lureau

Kamil Rytarowski <n54@gmx.com> writes:

> On 10.06.2017 17:15, Markus Armbruster wrote:
>> Kamil Rytarowski <n54@gmx.com> writes:
>> 
>>> On 06.06.2017 16:56, Kamil Rytarowski wrote:
>>>> On 06.06.2017 16:34, Peter Maydell wrote:
>>>>> On 6 June 2017 at 14:38, Kamil Rytarowski <n54@gmx.com> wrote:
>>>>>> I've linked qemu with the original patch and:
>>>>>> ./configure --disable-linux-user --disable-system --static
>>>>>>
>>>>>> I got some warnings, I think they are originated from our libc and are
>>>>>> not related to qemu:
>>>>>>   LINK    sparc64-bsd-user/qemu-sparc64
>>>>>> /usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
>>>>>> overridden by definition
>>>>>> /usr/lib/crt0.o: warning: defined here
>>>>>> /usr/lib/libc.a(_env.o): warning: multiple common of `environ'
>>>>>> /usr/lib/crt0.o: warning: previous common is here
>>>>>> /usr/lib/libc.a(getprogname.o): warning: common of `__progname'
>>>>>> overridden by definition
>>>>>> /usr/lib/crt0.o: warning: defined here
>>>>>
>>>>> Yes, I think I've seen those before on NetBSD -- they look
>>>>> like a bug in your libc to me, it shouldn't be confusing itself
>>>>> with itself like that :-)
>>>>>
>>>>> thanks
>>>>> -- PMM
>>>>>
>>>>
>>>> I have filed this bug upstream: http://gnats.netbsd.org/52278
>>>>
>>>>
>>>
>>>
>>> What's the status with this patch?
>>>
>>> NetBSD build still breaks due to ivshmem-*.
>> 
>> I guess Michael expects a v4 that doesn't break the static build.
>> 
>
> -static works for me, I have restricted options to test build on !NetBSD
> systems.
>
> Was this patch ok?
>
> diff --git a/Makefile b/Makefile
> index c830d7a..2ef5a78 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -469,10 +469,12 @@ ifneq ($(EXESUF),)
>  qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
>  endif
>
> +ifdef CONFIG_IVSHMEM
>  ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
>  	$(call LINK, $^)
>  ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
>  	$(call LINK, $^)
> +endif
>
>
> So I could amend it.

Please do.  Additionally consider

diff --git a/tests/Makefile.include b/tests/Makefile.include
index f42f3df..ab70d01 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -203,7 +203,7 @@ gcov-files-pci-y += hw/display/virtio-gpu-pci.c
 gcov-files-pci-$(CONFIG_VIRTIO_VGA) += hw/display/virtio-vga.c
 check-qtest-pci-y += tests/intel-hda-test$(EXESUF)
 gcov-files-pci-y += hw/audio/intel-hda.c hw/audio/hda-codec.c
-check-qtest-pci-$(CONFIG_EVENTFD) += tests/ivshmem-test$(EXESUF)
+check-qtest-pci-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF)
 gcov-files-pci-y += hw/misc/ivshmem.c
 
 check-qtest-i386-y = tests/endianness-test$(EXESUF)

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-19  7:42                     ` Markus Armbruster
@ 2017-06-19 11:06                       ` Kamil Rytarowski
  0 siblings, 0 replies; 17+ messages in thread
From: Kamil Rytarowski @ 2017-06-19 11:06 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Peter Maydell, QEMU Trivial, Michael Tokarev,
	Philippe Mathieu-Daudé,
	QEMU Developers, Marc-André Lureau

[-- Attachment #1: Type: text/plain, Size: 2967 bytes --]

On 19.06.2017 09:42, Markus Armbruster wrote:
> Kamil Rytarowski <n54@gmx.com> writes:
> 
>> On 10.06.2017 17:15, Markus Armbruster wrote:
>>> Kamil Rytarowski <n54@gmx.com> writes:
>>>
>>>> On 06.06.2017 16:56, Kamil Rytarowski wrote:
>>>>> On 06.06.2017 16:34, Peter Maydell wrote:
>>>>>> On 6 June 2017 at 14:38, Kamil Rytarowski <n54@gmx.com> wrote:
>>>>>>> I've linked qemu with the original patch and:
>>>>>>> ./configure --disable-linux-user --disable-system --static
>>>>>>>
>>>>>>> I got some warnings, I think they are originated from our libc and are
>>>>>>> not related to qemu:
>>>>>>>   LINK    sparc64-bsd-user/qemu-sparc64
>>>>>>> /usr/lib/libc.a(initfini.o): warning: common of `__ps_strings'
>>>>>>> overridden by definition
>>>>>>> /usr/lib/crt0.o: warning: defined here
>>>>>>> /usr/lib/libc.a(_env.o): warning: multiple common of `environ'
>>>>>>> /usr/lib/crt0.o: warning: previous common is here
>>>>>>> /usr/lib/libc.a(getprogname.o): warning: common of `__progname'
>>>>>>> overridden by definition
>>>>>>> /usr/lib/crt0.o: warning: defined here
>>>>>>
>>>>>> Yes, I think I've seen those before on NetBSD -- they look
>>>>>> like a bug in your libc to me, it shouldn't be confusing itself
>>>>>> with itself like that :-)
>>>>>>
>>>>>> thanks
>>>>>> -- PMM
>>>>>>
>>>>>
>>>>> I have filed this bug upstream: http://gnats.netbsd.org/52278
>>>>>
>>>>>
>>>>
>>>>
>>>> What's the status with this patch?
>>>>
>>>> NetBSD build still breaks due to ivshmem-*.
>>>
>>> I guess Michael expects a v4 that doesn't break the static build.
>>>
>>
>> -static works for me, I have restricted options to test build on !NetBSD
>> systems.
>>
>> Was this patch ok?
>>
>> diff --git a/Makefile b/Makefile
>> index c830d7a..2ef5a78 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -469,10 +469,12 @@ ifneq ($(EXESUF),)
>>  qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
>>  endif
>>
>> +ifdef CONFIG_IVSHMEM
>>  ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
>>  	$(call LINK, $^)
>>  ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
>>  	$(call LINK, $^)
>> +endif
>>
>>
>> So I could amend it.
> 
> Please do.  Additionally consider
> 
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index f42f3df..ab70d01 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -203,7 +203,7 @@ gcov-files-pci-y += hw/display/virtio-gpu-pci.c
>  gcov-files-pci-$(CONFIG_VIRTIO_VGA) += hw/display/virtio-vga.c
>  check-qtest-pci-y += tests/intel-hda-test$(EXESUF)
>  gcov-files-pci-y += hw/audio/intel-hda.c hw/audio/hda-codec.c
> -check-qtest-pci-$(CONFIG_EVENTFD) += tests/ivshmem-test$(EXESUF)
> +check-qtest-pci-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF)
>  gcov-files-pci-y += hw/misc/ivshmem.c
>  
>  check-qtest-i386-y = tests/endianness-test$(EXESUF)
> 

Thank you, I will give it a try.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-05 14:29 ` Michael Tokarev
  2017-06-05 14:52   ` [Qemu-devel] [Qemu-trivial] " Kamil Rytarowski
@ 2017-06-22 15:54   ` Peter Maydell
  2017-06-22 16:24     ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 17+ messages in thread
From: Peter Maydell @ 2017-06-22 15:54 UTC (permalink / raw)
  To: Michael Tokarev
  Cc: Kamil Rytarowski, QEMU Trivial, Markus Armbruster,
	Philippe Mathieu-Daudé,
	QEMU Developers, Marc-André Lureau, peter.maydell

On 5 June 2017 at 15:29, Michael Tokarev <mjt@tls.msk.ru> wrote:
> 31.05.2017 15:00, Kamil Rytarowski wrote:
>> Currently ivshmem requires eventfd() which is Linux specific.
>> Do not and build it unconditionally on every Linux/BSD/Solaris.
>>
>> This patch indirectly fixes build failure on NetBSD, where these tools
>> additionally require -lrt for shm_open(3). In future there should be
>> added support for NetBSD and the linking addressed appropriately.
>
> Unfortunately this breaks static build.
>
> $ ../configure --disable-system --disable-linux-user --static
> $ make V=1
> ...

Why are you trying to build with both system emulation QEMU
and linux-user QEMU disabled anyway? That doesn't leave very
much left to build...

thanks
-- PMM

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available
  2017-06-22 15:54   ` [Qemu-devel] " Peter Maydell
@ 2017-06-22 16:24     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-06-22 16:24 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Michael Tokarev, Kamil Rytarowski, QEMU Trivial,
	Markus Armbruster, QEMU Developers, Marc-André Lureau,
	peter.maydell

On Thu, Jun 22, 2017 at 12:54 PM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> On 5 June 2017 at 15:29, Michael Tokarev <mjt@tls.msk.ru> wrote:
[...]
>> $ ../configure --disable-system --disable-linux-user --static
>> $ make V=1
>> ...
>
> Why are you trying to build with both system emulation QEMU
> and linux-user QEMU disabled anyway? That doesn't leave very
> much left to build...

Hmm the only point would be to build libqemuutil.a...

Should the ./configure script return an error if $target_list is empty?

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-06-22 16:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 12:00 [Qemu-devel] [PATCH v3] ivshmem-server: ivshmem-client: Build when eventfd() is available Kamil Rytarowski
2017-06-01 10:00 ` Michael Tokarev
2017-06-05 14:29 ` Michael Tokarev
2017-06-05 14:52   ` [Qemu-devel] [Qemu-trivial] " Kamil Rytarowski
2017-06-06  6:54     ` Markus Armbruster
2017-06-06  7:10       ` [Qemu-devel] " Michael Tokarev
2017-06-06 11:05         ` Markus Armbruster
2017-06-06 13:38         ` Kamil Rytarowski
2017-06-06 14:34           ` Peter Maydell
2017-06-06 14:56             ` Kamil Rytarowski
2017-06-10 13:41               ` Kamil Rytarowski
2017-06-10 15:15                 ` Markus Armbruster
2017-06-10 15:24                   ` [Qemu-devel] [Qemu-trivial] " Kamil Rytarowski
2017-06-19  7:42                     ` Markus Armbruster
2017-06-19 11:06                       ` Kamil Rytarowski
2017-06-22 15:54   ` [Qemu-devel] " Peter Maydell
2017-06-22 16:24     ` Philippe Mathieu-Daudé

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.