Including `-Dstatic=True` / `--prefer-static` isn't building the library statically.
Good morning,
I've stumbled upon a problem regarding an option to compile libslirp statically. While in meson_options.txt
there's an entry for linking library statically, ninja
is still compiling it dynamically. What should I do or what am I missing?
Log:
# /libslirp > meson -Dstatic=True --prefer-static build --buildtype release
The Meson build system
Version: 1.1.0
Source dir: /libslirp/source
Build dir: /libslirp/source/build
Build type: native build
Project name: libslirp
Project version: 4.7.0
C compiler for the host machine: cc (gcc 12.2.1 "cc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924")
C linker for the host machine: cc ld.bfd 2.40
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for language cpp for the build machine not found.
Compiler for language cpp for the host machine not found.
Found pkg-config: /usr/bin/pkg-config (1.9.5)
Run-time dependency glib-2.0 found: YES 2.76.6
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wwrite-strings: YES
Check usable header "valgrind/valgrind.h" : YES
Compiler for C supports link arguments -Wl,--version-script,/libslirp/source/src/libslirp.map: YES
Configuring libslirp-version.h using configuration
Build targets in project: 3
NOTICE: Future-deprecated features used:
* 1.1.0: {'"boolean option" keyword argument "value" of type str'}
libslirp 4.7.0
User defined options
buildtype : release
prefer_static: True
static : True
Found ninja-1.9 at /usr/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
# /libslirp > ninja -C build install
ninja: entering directory 'build'
[1/38] Compiling C object ncsitest.p/test_ncsitest.c.o
[2/38] Compiling C object libslirp.so.0.4.0.p/src_vmstate.c.o
[3/38] Compiling C object libslirp.so.0.4.0.p/src_version.c.o
[4/38] Compiling C object libslirp.so.0.4.0.p/src_util.c.o
[5/38] Compiling C object libslirp.so.0.4.0.p/src_udp6.c.o
[6/38] Compiling C object libslirp.so.0.4.0.p/src_udp.c.o
[7/38] Compiling C object libslirp.so.0.4.0.p/src_tftp.c.o
[8/38] Compiling C object libslirp.so.0.4.0.p/src_tcp_timer.c.o
[9/38] Compiling C object libslirp.so.0.4.0.p/src_tcp_subr.c.o
[10/38] Compiling C object libslirp.so.0.4.0.p/src_tcp_output.c.o
[11/38] Compiling C object libslirp.so.0.4.0.p/src_tcp_input.c.o
[12/38] Compiling C object libslirp.so.0.4.0.p/src_stream.c.o
[13/38] Compiling C object libslirp.so.0.4.0.p/src_state.c.o
[14/38] Compiling C object libslirp.so.0.4.0.p/src_socket.c.o
[15/38] Compiling C object libslirp.so.0.4.0.p/src_slirp.c.o
[16/38] Compiling C object libslirp.so.0.4.0.p/src_sbuf.c.o
[17/38] Compiling C object libslirp.so.0.4.0.p/src_ndp_table.c.o
[18/38] Compiling C object libslirp.so.0.4.0.p/src_ncsi.c.o
[19/38] Compiling C object libslirp.so.0.4.0.p/src_misc.c.o
[20/38] Compiling C object libslirp.so.0.4.0.p/src_mbuf.c.o
[21/38] Compiling C object libslirp.so.0.4.0.p/src_ip_output.c.o
[22/38] Compiling C object libslirp.so.0.4.0.p/src_ip_input.c.o
[23/38] Compiling C object libslirp.so.0.4.0.p/src_ip_icmp.c.o
[24/38] Compiling C object libslirp.so.0.4.0.p/src_ip6_output.c.o
[25/38] Compiling C object libslirp.so.0.4.0.p/src_ip6_input.c.o
[26/38] Compiling C object libslirp.so.0.4.0.p/src_ip6_icmp.c.o
[27/38] Compiling C object libslirp.so.0.4.0.p/src_if.c.o
[28/38] Compiling C object libslirp.so.0.4.0.p/src_dnssearch.c.o
[29/38] Compiling C object libslirp.so.0.4.0.p/src_dhcpv6.c.o
[30/38] Compiling C object libslirp.so.0.4.0.p/src_cksum.c.o
[31/38] Compiling C object libslirp.so.0.4.0.p/src_bootp.c.o
[32/38] Compiling C object libslirp.so.0.4.0.p/src_arp_table.c.o
[33/38] Compiling C object pingtest.p/test_pingtest.c.o
[34/38] Linking target libslirp.so.0.4.0
[35/38] Generating symbol file libslirp.so.0.4.0.p/libslirp.so.0.4.0.symbols
[36/38] Linking target ncsitest
[37/38] Linking target pingtest
[38/38] Installing files.
Installing libslirp.so.0.4.0 to /usr/local/lib
Installing /libslirp/source/src/libslirp.h to /usr/local/include/slirp/
Installing /libslirp/source/build/libslirp-version.h to /usr/local/include/slirp
Installing /libslirp/source/build/meson-private/slirp.pc to /usr/local/lib/pkgconfig
Installing symlink pointing to libslirp.so.0.4.0 to /usr/local/lib/libslirp.so.0
Installing symlink pointing to libslirp.so.0 to /usr/local/lib/libslirp.so