All of lore.kernel.org
 help / color / mirror / Atom feed
* libslirp and static linking
@ 2022-08-05 16:13 Peter Maydell
  2022-08-05 17:33 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2022-08-05 16:13 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Samuel Thibault, Michael Tokarev

Hi; I noticed today that Debian's libslirp-dev package doesn't ship
a static library version of libslirp. I was going to file a Debian
bug about that, but then looking at upstream 'libslirp' I found
that its README.md
https://gitlab.freedesktop.org/slirp/libslirp
only documents how to build a shared library libslirp, and says
"(QEMU may build with the submodule static library using --enable-slirp=git)"

So:
(1) is it possible to build the separate libslirp package as
    a static library currently?
(2) if not, can it be enhanced to do so?
(3) otherwise, is upstream QEMU going to have to retain the
    git submodule just for the static linking case ?


I also found that at least the pkg-config file shipped with
Ubuntu libslirp-dev 4.1.0-2ubuntu2.2 results in 'configure --static'
incorrectly detecting that libslirp is present, even though that
package does not ship a static library. I'm not sure whether that's
a bug in the pkg-config file, in the Debian/Ubuntu packaging, or in
QEMU's library probing code...

thanks
-- PMM


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

* Re: libslirp and static linking
  2022-08-05 16:13 libslirp and static linking Peter Maydell
@ 2022-08-05 17:33 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2022-08-05 17:33 UTC (permalink / raw)
  To: Peter Maydell, QEMU Developers; +Cc: Samuel Thibault, Michael Tokarev

On 8/5/22 18:13, Peter Maydell wrote:
> Hi; I noticed today that Debian's libslirp-dev package doesn't ship
> a static library version of libslirp. I was going to file a Debian
> bug about that, but then looking at upstream 'libslirp' I found
> that its README.md
> https://gitlab.freedesktop.org/slirp/libslirp
> only documents how to build a shared library libslirp, and says
> "(QEMU may build with the submodule static library using --enable-slirp=git)"
> 
> So:
> (1) is it possible to build the separate libslirp package as
>      a static library currently?

Yes (same with any other meson project):

$ meson setup -Ddefault_library=both build
$ ninja -Cbuild
$ ls -ld build/libslirp*
-rw-r--r--. 1 pbonzini users 1182058 Aug  5 19:30 build/libslirp.a

Paolo


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

end of thread, other threads:[~2022-08-05 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 16:13 libslirp and static linking Peter Maydell
2022-08-05 17:33 ` Paolo Bonzini

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.