qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] explicitly link libqemuutil against rt
@ 2022-02-28  4:16 Simeon Schaub
  2022-02-28 14:15 ` Peter Maydell
  0 siblings, 1 reply; 8+ messages in thread
From: Simeon Schaub @ 2022-02-28  4:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

>From e77de12cc33846a3de71d1858e497fbf4cdbff96 Mon Sep 17 00:00:00 2001
From: Simeon David Schaub <schaub@mit.edu>
Date: Sun, 27 Feb 2022 22:59:19 -0500
Subject: [PATCH] explicitly link libqemuutil against rt

Qemu uses `clock_gettime` which is already part of more recent versions
of glibc, but on older versions it is still required to link against
librt.

Discovered in https://github.com/JuliaPackaging/Yggdrasil/pull/4506

Signed-off-by: Simeon David Schaub <schaub@mit.edu>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 8df40bfac4..dcf2f43940 100644
--- a/meson.build
+++ b/meson.build
@@ -2730,7 +2730,7 @@ util_ss.add_all(trace_ss)
 util_ss = util_ss.apply(config_all, strict: false)
 libqemuutil = static_library('qemuutil',
                              sources: util_ss.sources() + stub_ss.sources() + genh,
-                             dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman])
+                             dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman, rt])
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
-- 
2.35.1


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

* Re: [PATCH] explicitly link libqemuutil against rt
  2022-02-28  4:16 [PATCH] explicitly link libqemuutil against rt Simeon Schaub
@ 2022-02-28 14:15 ` Peter Maydell
  2022-02-28 14:38   ` Daniel P. Berrangé
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2022-02-28 14:15 UTC (permalink / raw)
  To: Simeon Schaub; +Cc: qemu-trivial, qemu-devel

On Mon, 28 Feb 2022 at 14:12, Simeon Schaub <schaub@mit.edu> wrote:
>
> >From e77de12cc33846a3de71d1858e497fbf4cdbff96 Mon Sep 17 00:00:00 2001
> From: Simeon David Schaub <schaub@mit.edu>
> Date: Sun, 27 Feb 2022 22:59:19 -0500
> Subject: [PATCH] explicitly link libqemuutil against rt
>
> Qemu uses `clock_gettime` which is already part of more recent versions
> of glibc, but on older versions it is still required to link against
> librt.

Which version of glibc are you seeing this with ?

thanks
-- PMM


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

* Re: [PATCH] explicitly link libqemuutil against rt
  2022-02-28 14:15 ` Peter Maydell
@ 2022-02-28 14:38   ` Daniel P. Berrangé
  2022-02-28 15:12     ` Peter Maydell
  2022-02-28 15:13     ` Simeon Schaub
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel P. Berrangé @ 2022-02-28 14:38 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, Simeon Schaub, qemu-devel

On Mon, Feb 28, 2022 at 02:15:11PM +0000, Peter Maydell wrote:
> On Mon, 28 Feb 2022 at 14:12, Simeon Schaub <schaub@mit.edu> wrote:
> >
> > >From e77de12cc33846a3de71d1858e497fbf4cdbff96 Mon Sep 17 00:00:00 2001
> > From: Simeon David Schaub <schaub@mit.edu>
> > Date: Sun, 27 Feb 2022 22:59:19 -0500
> > Subject: [PATCH] explicitly link libqemuutil against rt
> >
> > Qemu uses `clock_gettime` which is already part of more recent versions
> > of glibc, but on older versions it is still required to link against
> > librt.
> 
> Which version of glibc are you seeing this with ?

The man page says

   "Link with -lrt (only for glibc versions before 2.17)."

and even ancient RHEL-7 had glibc 2.17, so I can't imagine any platform
we currently target in QEMU has a glibc older than 2.17, so QEMU should
not need this change, unless there's some other scenario not described
in the commit message.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

* Re: [PATCH] explicitly link libqemuutil against rt
  2022-02-28 14:38   ` Daniel P. Berrangé
@ 2022-02-28 15:12     ` Peter Maydell
  2022-02-28 15:13     ` Simeon Schaub
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2022-02-28 15:12 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: qemu-trivial, Simeon Schaub, qemu-devel

On Mon, 28 Feb 2022 at 14:38, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Mon, Feb 28, 2022 at 02:15:11PM +0000, Peter Maydell wrote:
> > On Mon, 28 Feb 2022 at 14:12, Simeon Schaub <schaub@mit.edu> wrote:
> > >
> > > >From e77de12cc33846a3de71d1858e497fbf4cdbff96 Mon Sep 17 00:00:00 2001
> > > From: Simeon David Schaub <schaub@mit.edu>
> > > Date: Sun, 27 Feb 2022 22:59:19 -0500
> > > Subject: [PATCH] explicitly link libqemuutil against rt
> > >
> > > Qemu uses `clock_gettime` which is already part of more recent versions
> > > of glibc, but on older versions it is still required to link against
> > > librt.
> >
> > Which version of glibc are you seeing this with ?
>
> The man page says
>
>    "Link with -lrt (only for glibc versions before 2.17)."
>
> and even ancient RHEL-7 had glibc 2.17, so I can't imagine any platform
> we currently target in QEMU has a glibc older than 2.17, so QEMU should
> not need this change, unless there's some other scenario not described
> in the commit message.

Is the answer "actually we're using musl, not glibc" ? I vaguely
remember that possibly being different in this area...

thanks
-- PMM


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

* Re: [PATCH] explicitly link libqemuutil against rt
  2022-02-28 14:38   ` Daniel P. Berrangé
  2022-02-28 15:12     ` Peter Maydell
@ 2022-02-28 15:13     ` Simeon Schaub
  2022-02-28 15:17       ` Peter Maydell
  2022-02-28 16:08       ` Daniel P. Berrangé
  1 sibling, 2 replies; 8+ messages in thread
From: Simeon Schaub @ 2022-02-28 15:13 UTC (permalink / raw)
  To: Daniel P. Berrangé, Peter Maydell; +Cc: qemu-trivial, qemu-devel

We generally target glibc 2.12 in the Julia ecosystem, since CentOS 6 is
still quite common in the HPC community.

Best,
Simeon

On 2/28/22 09:38, Daniel P. Berrangé wrote:
> On Mon, Feb 28, 2022 at 02:15:11PM +0000, Peter Maydell wrote:
>> On Mon, 28 Feb 2022 at 14:12, Simeon Schaub <schaub@mit.edu> wrote:
>>>
>>> >From e77de12cc33846a3de71d1858e497fbf4cdbff96 Mon Sep 17 00:00:00 2001
>>> From: Simeon David Schaub <schaub@mit.edu>
>>> Date: Sun, 27 Feb 2022 22:59:19 -0500
>>> Subject: [PATCH] explicitly link libqemuutil against rt
>>>
>>> Qemu uses `clock_gettime` which is already part of more recent versions
>>> of glibc, but on older versions it is still required to link against
>>> librt.
>>
>> Which version of glibc are you seeing this with ?
> 
> The man page says
> 
>    "Link with -lrt (only for glibc versions before 2.17)."
> 
> and even ancient RHEL-7 had glibc 2.17, so I can't imagine any platform
> we currently target in QEMU has a glibc older than 2.17, so QEMU should
> not need this change, unless there's some other scenario not described
> in the commit message.
> 
> Regards,
> Daniel


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

* Re: [PATCH] explicitly link libqemuutil against rt
  2022-02-28 15:13     ` Simeon Schaub
@ 2022-02-28 15:17       ` Peter Maydell
  2022-02-28 15:29         ` Simeon Schaub
  2022-02-28 16:08       ` Daniel P. Berrangé
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2022-02-28 15:17 UTC (permalink / raw)
  To: Simeon Schaub; +Cc: qemu-trivial, Daniel P. Berrangé, qemu-devel

On Mon, 28 Feb 2022 at 15:13, Simeon Schaub <schaub@mit.edu> wrote:
>
> We generally target glibc 2.12 in the Julia ecosystem, since CentOS 6 is
> still quite common in the HPC community.

Unfortunately you're on your own there then -- CentOS 6 is
well out of QEMU upstream's supported-build-platforms list,
and we will not carry portability fixes required only for it.

thanks
-- PMM


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

* Re: [PATCH] explicitly link libqemuutil against rt
  2022-02-28 15:17       ` Peter Maydell
@ 2022-02-28 15:29         ` Simeon Schaub
  0 siblings, 0 replies; 8+ messages in thread
From: Simeon Schaub @ 2022-02-28 15:29 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, Daniel P. Berrangé, qemu-devel

Ok, I understand.

On 2/28/22 10:17, Peter Maydell wrote:
> On Mon, 28 Feb 2022 at 15:13, Simeon Schaub <schaub@mit.edu> wrote:
>>
>> We generally target glibc 2.12 in the Julia ecosystem, since CentOS 6 is
>> still quite common in the HPC community.
> 
> Unfortunately you're on your own there then -- CentOS 6 is
> well out of QEMU upstream's supported-build-platforms list,
> and we will not carry portability fixes required only for it.
> 
> thanks
> -- PMM


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

* Re: [PATCH] explicitly link libqemuutil against rt
  2022-02-28 15:13     ` Simeon Schaub
  2022-02-28 15:17       ` Peter Maydell
@ 2022-02-28 16:08       ` Daniel P. Berrangé
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel P. Berrangé @ 2022-02-28 16:08 UTC (permalink / raw)
  To: Simeon Schaub; +Cc: qemu-trivial, Peter Maydell, qemu-devel

On Mon, Feb 28, 2022 at 10:13:15AM -0500, Simeon Schaub wrote:
> We generally target glibc 2.12 in the Julia ecosystem, since CentOS 6 is
> still quite common in the HPC community.

Oh wow, we dropped RHEL/CentOS 6 support a very long time ago for QEMU,
and also dropped RHEL-7 last year.

FWIW, our platform target policy is set out here:

   https://www.qemu.org/docs/master/about/build-platforms.html

Currently RHEL-8 is the oldest RHEL we support since RHEL-7
also dropped out under the rule

  "Support for the previous major version will be dropped
   2 years after the new major version is released"

I'm surprised you didn't have to patch lots of other aspects of QEMU,
since a system targetting glibc 2.12 would be likely to have a GCC
version that we explicitly block use of at build time, as well as
other outdated 3rd party libraries we check min versions of in
configure.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

end of thread, other threads:[~2022-02-28 16:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-28  4:16 [PATCH] explicitly link libqemuutil against rt Simeon Schaub
2022-02-28 14:15 ` Peter Maydell
2022-02-28 14:38   ` Daniel P. Berrangé
2022-02-28 15:12     ` Peter Maydell
2022-02-28 15:13     ` Simeon Schaub
2022-02-28 15:17       ` Peter Maydell
2022-02-28 15:29         ` Simeon Schaub
2022-02-28 16:08       ` Daniel P. Berrangé

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 NNTP newsgroup(s).