From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id E41E5432BB;
	Mon,  6 Nov 2023 19:17:42 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 2BFDF40DCD;
	Mon,  6 Nov 2023 19:17:42 +0100 (CET)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [170.10.129.124])
 by mails.dpdk.org (Postfix) with ESMTP id 38651402C2
 for <dev@dpdk.org>; Mon,  6 Nov 2023 19:17:40 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1699294659;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=TIn6bGidvtCmlcFJrnMyObcIWqza1u8Je9Ae4LxGnvI=;
 b=QuV+iUsxYpbUe8zpZMQQoMpkcSmm76c//fQLCtz2KTxwrYP/pNm+0YacCaNpipJB3wGlMB
 PyGLcri2iKQgA/LgvrzcQmeMPY3Z35gSt/Yubcsg+GlMwVkE+65A0unNrEdvg/fKbWR7AH
 rdIK9WZK0wfyu0MBoNxTwbQtkm/rDNc=
Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com
 [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
 us-mta-459-VonwNdnoNwylcfn9IRubyQ-1; Mon, 06 Nov 2023 13:17:38 -0500
X-MC-Unique: VonwNdnoNwylcfn9IRubyQ-1
Received: by mail-lj1-f197.google.com with SMTP id
 38308e7fff4ca-2c50234741eso40123151fa.1
 for <dev@dpdk.org>; Mon, 06 Nov 2023 10:17:37 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1699294656; x=1699899456;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=TIn6bGidvtCmlcFJrnMyObcIWqza1u8Je9Ae4LxGnvI=;
 b=uT2zdXA+GQTlx5gJi83B3PSFk/MOXAAOBWo5R7o91TVkis/sGps7g3nPdtCqvaE08A
 kmLp5X4gzeXkCp0NcmsNsrZBjMQ5JEouw5GD6amny6EQWIDOzcQUyX91z01yP8Z+wt9z
 oUJzZh3rm0N92xDAm5dwuNh5KHBEhpEagM897SouJR0JXt+AR0PVGKgQcYg1tpyV0yXG
 byLM/ao8a86JXL1RzXH+zwNA74dDMNFsB59UGrvULbECqgonf6b6W8GXsbh/rnsPlvq9
 Vgburtbq0xBFaD/O0Ai8M/H2nO254FYM0XYLS9u6VG9nF5InzVCT5hfPFW0r9coBmUXC
 +4qw==
X-Gm-Message-State: AOJu0Yz1Za0rDcU+vpcKgKvKNCoM7SW9BN+2gVdHNi5/uxyot4L3jD2P
 rjKyybFLBRCGMxTQy2F0pNbLSQsES3WdYO5xcK9ysXRvcOQOIE6ZFsAGIUuitHuryquJOo4WxFE
 7sPANta2M85vRDsI03mA=
X-Received: by 2002:a05:651c:210e:b0:2b6:df71:cff1 with SMTP id
 a14-20020a05651c210e00b002b6df71cff1mr29567985ljq.52.1699294656633; 
 Mon, 06 Nov 2023 10:17:36 -0800 (PST)
X-Google-Smtp-Source: AGHT+IGZfUxwWrJvqX6hzqVzSDfia3Bq74ajNxJemYlELHlEDX8DxLvKBsIGO61yNhb8NN4ToPFxnXfnANoZN47b8vE=
X-Received: by 2002:a05:651c:210e:b0:2b6:df71:cff1 with SMTP id
 a14-20020a05651c210e00b002b6df71cff1mr29567974ljq.52.1699294656287; Mon, 06
 Nov 2023 10:17:36 -0800 (PST)
MIME-Version: 1.0
References: <20231020170135.18319-1-syalavarthi@marvell.com>
 <20231106041243.13621-1-syalavarthi@marvell.com>
 <CAJFAV8zVtkg5Mjp=6HF7WL+kufi0RxB-ov5oyde76fwOGjfhZA@mail.gmail.com>
 <ZUkTH69hX5j2GBjE@bricha3-MOBL.ger.corp.intel.com>
In-Reply-To: <ZUkTH69hX5j2GBjE@bricha3-MOBL.ger.corp.intel.com>
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 6 Nov 2023 19:17:24 +0100
Message-ID: <CAJFAV8z0PsgeqfLsMd6oNtnhEonFutyGt6g3CNhQ7HAn26cyPQ@mail.gmail.com>
Subject: Re: [PATCH v5 1/1] build: add libarchive to external deps
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Srikanth Yalavarthi <syalavarthi@marvell.com>,
 Aaron Conole <aconole@redhat.com>, 
 Igor Russkikh <irusskikh@marvell.com>, dev@dpdk.org, sshankarnara@marvell.com, 
 aprabhu@marvell.com, ptakkar@marvell.com, stable@dpdk.org
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Mon, Nov 6, 2023 at 5:24=E2=80=AFPM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Mon, Nov 06, 2023 at 05:03:10PM +0100, David Marchand wrote:
> > On Mon, Nov 6, 2023 at 5:12=E2=80=AFAM Srikanth Yalavarthi
> > <syalavarthi@marvell.com> wrote:
> > >
> > > In order to avoid linking with Libs.private, libarchive is not added =
to
> > > ext_deps during the meson setup stage.
> > >
> > > Since libarchive is not added to ext_deps, cross-compilation or nativ=
e
> > > compilation with libarchive installed in non-standard location fails
> > > with errors related to "cannot find -larchive" or "archive.h: No such
> > > file or directory". In order to fix the build failures, user is
> > > required to define the 'c_args' and 'c_link_args' with '-I<includedir=
>'
> > > and '-L<libdir>'.
> > >
> > > This patch adds libarchive to ext_deps and further would not require
> > > setting c_args and c_link_args externally.
> > >
> > > Fixes: 40edb9c0d36b ("eal: handle compressed firmware") Cc:
> > > stable@dpdk.org
> > >
> > > Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
> >
> > This breaks static compilation of applications.  This can be reproduced
> > with test-meson-builds.sh and in GHA (which was not linking examples
> > statically, I added a patch in my github repo):
> > https://github.com/david-marchand/dpdk/actions/runs/6772879600/job/1840=
6442129#step:19:19572
> >
> The libarchive-dev Ubuntu package does not install all its needed
> dependencies for static linking. The errors can be resolved by manually
> installing the 3 missing -dev packages.

Same with fedora.

>
> It's less than ideal, but to my mind, DPDK is behaving correctly with thi=
s
> fix - it is marking that it requires libarchive as a dependency. The fact
> that the libarchive.pc file lists static libraries that aren't installed =
is
> outside of our control. The previous implementation hacked around this by
> just passing -larchive in all cases, rather than using pkg-config
> information. This then caused other issues that the patch submitter hit.

Ok, I'll see how to workaround this on my side.


--=20
David Marchand