From nobody Sun Feb 8 19:21:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594894089; cv=none; d=zohomail.com; s=zohoarc; b=GvzYMt2XIiIDRzZAqQ2dXIcMrcLNDR0g0+zesLGgo6SoTTZTD3h+AxBgyRR/iKLB4LNJyTuA/XRyWffUpm+ya931Ah8M83NruEGJP+s0m9RNgFVxlMrLggUYBuVFnnWaw5IOj5ZQmBNyFgPTrQ28lhk+iWsD/dQNQjqCG6xd2Bw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594894089; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=C04rELgXN6PzbsxZmeIEU5D7Cbnzz/2gOVjNeD3kvQw=; b=D6+y6MhCQMuf7Xl5yyzNU7vHnioBRudV4gifB8XpIauOTedb68iIqdBsUrwxXusod7wvTYb9pakHf79mTTZSrgSLtG6InRRaJaI/NsJWD1Xy6nX3jTHx9dIu+I0XAD9QPK50fAFR8iSrBDuO1KbqVqqv8Ox650Vh8LO8Jyoyz2k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1594894089545618.234375503789; Thu, 16 Jul 2020 03:08:09 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-246-66WyOjSnO423CyzF8ioPbw-1; Thu, 16 Jul 2020 06:08:05 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 38569100945A; Thu, 16 Jul 2020 10:08:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19A2861472; Thu, 16 Jul 2020 10:08:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DB9A496259; Thu, 16 Jul 2020 10:07:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA44fQ017639 for ; Thu, 16 Jul 2020 06:04:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 14D522DE69; Thu, 16 Jul 2020 10:04:04 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 83BA02B6DB for ; Thu, 16 Jul 2020 10:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594894088; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=C04rELgXN6PzbsxZmeIEU5D7Cbnzz/2gOVjNeD3kvQw=; b=eznCTXyuN3FGtnRe5PJ71AqUU4KfQ0yuV0nbnwVSeLPwc1KAssW206pPhmYk2jzDFBs0HE dLvjo7HRZSeR45bcuyzQb5Nf0yEgD9cM7mfSBRSnn1rk/alc0QZE5qPiE7N/iu4ReKPTNC omnXT1ZU+BgbF6TnCtEYLHjgruXqNCk= X-MC-Unique: 66WyOjSnO423CyzF8ioPbw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 155/351] meson: src: build libvirt-lxc.so library Date: Thu, 16 Jul 2020 11:56:31 +0200 Message-Id: <91fc2ba04350c31c37d2aad3890f862596749ee1.1594891445.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" There are two extra dependencies compared to automake, apparmor and selinux. It looks like libtool is doing some magic and inheriting dependencies from libvirt.la which inherits these dependencies from other libraries. Without these two dependencies in meson the compilation fails. Signed-off-by: Pavel Hrdina --- m4/virt-win-symbols.m4 | 3 --- src/Makefile.am | 18 --------------- src/meson.build | 50 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 21 deletions(-) diff --git a/m4/virt-win-symbols.m4 b/m4/virt-win-symbols.m4 index dc5c5daa660..5ffee491877 100644 --- a/m4/virt-win-symbols.m4 +++ b/m4/virt-win-symbols.m4 @@ -19,16 +19,13 @@ dnl =20 AC_DEFUN([LIBVIRT_WIN_CHECK_SYMBOLS], [ LIBVIRT_ADMIN_SYMBOL_FILE=3Dadmin/libvirt_admin.syms - LIBVIRT_LXC_SYMBOL_FILE=3D'$(srcdir)/libvirt_lxc.syms' case "$host" in *-*-mingw* ) # Also set the symbol file to .def, so src/Makefile generates libvir= t.def # from libvirt.syms and passes libvirt.def instead of libvirt.syms t= o the # linker LIBVIRT_ADMIN_SYMBOL_FILE=3Dadmin/libvirt_admin.def - LIBVIRT_LXC_SYMBOL_FILE=3Dlibvirt_lxc.def ;; esac AC_SUBST([LIBVIRT_ADMIN_SYMBOL_FILE]) - AC_SUBST([LIBVIRT_LXC_SYMBOL_FILE]) ]) diff --git a/src/Makefile.am b/src/Makefile.am index 5655655ee32..45aee9bea1d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -37,7 +37,6 @@ INSTALL_DATA_LOCAL =3D UNINSTALL_LOCAL =3D SYM_FILES =3D USED_SYM_FILES =3D -GENERATED_SYM_FILES =3D augeas_DATA =3D augeastest_DATA =3D conf_DATA =3D @@ -62,10 +61,6 @@ COMMON_UNIT_VARS =3D \ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ $(NULL) =20 -# Set these variables before we include any of the subdirs as libvirt-admi= n.la -# has to be installed after libvirt.la. -lib_LTLIBRARIES +=3D libvirt-lxc.la - include util/Makefile.inc.am include security/Makefile.inc.am include access/Makefile.inc.am @@ -205,9 +200,6 @@ check-local: check-protocol check-symfile check-symsort= ing \ # All .syms files should be placed in exactly one of these three lists, # depending on whether they are stored in git and/or used in the build. SYM_FILES +=3D $(USED_SYM_FILES) -GENERATED_SYM_FILES +=3D \ - libvirt_lxc.def \ - $(NULL) =20 =20 check-local: check-augeas @@ -246,16 +238,6 @@ libvirt_functions.stp: $(RPC_PROBE_FILES) $(top_srcdir= )/scripts/gensystemtap.py =20 endif WITH_DTRACE_PROBES =20 -libvirt_lxc_la_SOURCES =3D libvirt-lxc.c -libvirt_lxc_la_LDFLAGS =3D \ - $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_LXC_SYMBOL_FILE) \ - -version-info $(LIBVIRT_VERSION_INFO) \ - $(LIBVIRT_NODELETE) \ - $(AM_LDFLAGS) \ - $(NULL) -libvirt_lxc_la_CFLAGS =3D $(AM_CFLAGS) -libvirt_lxc_la_LIBADD =3D libvirt.la - install-sysconfig: $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig for f in $(SYSCONF_FILES:%.sysconf=3D%) ; \ diff --git a/src/meson.build b/src/meson.build index a7fbff674c6..f324b165f99 100644 --- a/src/meson.build +++ b/src/meson.build @@ -305,3 +305,53 @@ libvirt_qemu_lib =3D shared_library( version: libvirt_lib_version, soversion: libvirt_so_version, ) + + +# libvirt-lxc.so symbol files + +libvirt_lxc_syms =3D meson.current_source_dir() / 'libvirt_lxc.syms' +libvirt_lxc_syms_file =3D libvirt_lxc_syms +libvirt_lxc_syms_path =3D libvirt_lxc_syms +if host_machine.system() =3D=3D 'windows' + libvirt_lxc_def =3D custom_target( + 'libvirt_lxc.def', + input: libvirt_lxc_syms, + output: 'libvirt_lxc.def', + command: [ gen_def_files_prog, '@INPUT@' ], + capture: true, + ) + libvirt_lxc_syms_file =3D libvirt_lxc_def + libvirt_lxc_syms_path =3D libvirt_lxc_def.full_path() +endif + + +# libvirt-lxc.so + +libvirt_lxc_syms_flags =3D '@0@@1@'.format( + version_script_flags, + libvirt_lxc_syms_path, +) + +libvirt_lxc_lib =3D shared_library( + 'virt-lxc', + 'libvirt-lxc.c', + dependencies: [ + apparmor_dep, + selinux_dep, + src_dep, + ], + link_args: [ + libvirt_nodelete, + libvirt_lxc_syms_flags, + ], + link_with: [ + libvirt_lib, + ], + link_depends: [ + libvirt_lxc_syms_file, + ], + install: true, + install_rpath: libdir, + version: libvirt_lib_version, + soversion: libvirt_so_version, +) --=20 2.26.2