dwarves.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Deepak Kumar Mishra <deepakkumar.mishra@arm.com>,
	dwarves@vger.kernel.org, Qais Yousef <qais.yousef@arm.com>,
	Jiri Olsa <jolsa@kernel.org>,
	siudin@fb.com, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] CMakeLists.txt: enable SHARED and STATIC lib creation
Date: Fri, 11 Jun 2021 23:20:55 +0100	[thread overview]
Message-ID: <49ebd74aac20b3896996c3b1fdcc14e35c7a05ec.camel@debian.org> (raw)
In-Reply-To: <9b4bcb2372f00c9ffa1b3d5d30a84755d8a3896c.camel@debian.org>

[-- Attachment #1: Type: text/plain, Size: 2708 bytes --]

On Fri, 2021-06-11 at 23:17 +0100, Luca Boccassi wrote:
> On Fri, 2021-06-11 at 13:08 -0700, Andrii Nakryiko wrote:
> On Fri, Jun 11, 2021 at 1:00 PM Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
> > 
> > Em Fri, Jun 11, 2021 at 12:34:13PM -0700, Andrii Nakryiko escreveu:
> > > On Thu, Jun 10, 2021 at 10:31 AM Arnaldo Carvalho de Melo
> > > <arnaldo.melo@gmail.com> wrote:
> > > > 
> > > > Em Tue, Jun 08, 2021 at 12:50:13AM +0530, Deepak Kumar Mishra
> > > > escreveu:
> > > > > CMakeLists.txt does not allow creation of static library and
> > > > > link applications
> > > > > accordingly.
> > > > > 
> > > > > Creation of SHARED and STATIC should be allowed using -
> > > > > DBUILD_SHARED_LIBS
> > > > > If -DBUILD_SHARED_LIBS option is not supplied, CMakeLists.txt
> > > > > sets it to ON.
> > > > > 
> > > > > Ex:
> > > > > cmake -D__LIB=lib -DBUILD_SHARED_LIBS=OFF ..
> > > > > cmake -D__LIB=lib -DBUILD_SHARED_LIBS=ON ..
> > > > 
> > > > Had to do some fixups due to a previous patch touching
> > > > CMakeLists.txt,
> > > > please check below.
> > > > 
> > > > I tested it and added some performance notes.
> > > 
> > > Hey Arnaldo, Deepak,
> > > 
> > > I think this commit actually breaks libbpf's CI (see [0]) and my
> > > local
> > > setup as well (see output below). It seems like now we are using
> > > system-wide libbpf headers, while still building local libbpf
> > > sources.
> > > This is pretty bad because system-wide headers might be too old
> > > or
> > > just missing.
> > 
> > I can't check this right now, but isn't this related to this one
> > instead?
> 
> Heh, I beat you by 5 minutes ;)
> 
> 
> Hi,
> 
> This should not be the case - the local paths are added to CMake and
> should win, unless something is going wrong - which is of course
> possible. A quick build of the current tip of the master branch would
> seem to confirm things are working - building with -
> DLIBBPF_EMBEDDED=off (which does force to use the system library, and
> defaults to on) the build fails, while building without any options
> on
> a new tree the build succeeds.
> 
> I'll fetch the script and try to reproduce, as it might be using
> other
> options - I assume it's this one, right?
> 
> https://github.com/libbpf/libbpf/blob/master/travis-ci/vmtest/build_pahole.sh

Right, so this script is using the CMake option "-D__LIB=lib", and the
issue is reproducible when that happens, on a clean tree without any
other options, which is indeed wrong. I was not aware of that so didn't
test with it, apologies.
I'll see if I can come up with a fix, if noone else beats me to it.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-06-11 22:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 19:20 [PATCH v2 0/2] dwarves: enable-SHARED-and-STATIC-lib-creation Deepak Kumar Mishra
2021-06-07 19:20 ` [PATCH v2 1/2] CMakeLists.txt: enable SHARED and STATIC lib creation Deepak Kumar Mishra
2021-06-10 17:31   ` Arnaldo Carvalho de Melo
2021-06-11 19:34     ` Andrii Nakryiko
2021-06-11 19:54       ` Andrii Nakryiko
2021-06-11 20:00       ` Arnaldo Carvalho de Melo
2021-06-11 20:08         ` Andrii Nakryiko
2021-06-11 22:17           ` Luca Boccassi
2021-06-11 22:20             ` Luca Boccassi [this message]
2021-06-11 22:45               ` Luca Boccassi
2021-06-11 22:53                 ` Dominique Martinet
2021-06-11 23:06                   ` Dominique Martinet
2021-06-11 23:07                   ` Luca Boccassi
2021-06-11 23:43                     ` Andrii Nakryiko
2021-06-07 19:20 ` [PATCH v2 2/2] README: add documentation for -DBUILD_SHARED_LIBS Deepak Kumar Mishra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49ebd74aac20b3896996c3b1fdcc14e35c7a05ec.camel@debian.org \
    --to=bluca@debian.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=deepakkumar.mishra@arm.com \
    --cc=dwarves@vger.kernel.org \
    --cc=jolsa@kernel.org \
    --cc=qais.yousef@arm.com \
    --cc=siudin@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).