linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Zhengyuan Liu <liuzhengyuan@kylinos.cn>, mingo <mingo@kernel.org>,
	"alexander.levin" <alexander.levin@microsoft.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: Compilation error for target liblockdep
Date: Mon, 18 Nov 2019 15:14:05 -0800	[thread overview]
Message-ID: <e3ae190e-0888-3d4a-e969-9604d4ab8695@acm.org> (raw)
In-Reply-To: <tencent_221B7250536E082573770ABA@qq.com>

On 11/18/19 1:20 AM, Zhengyuan Liu wrote:
> I got a compilation error while building target liblockdep and I think I'd
> better report it to you. The error info showed as bellow:
> 
>          # cd SRC/tools
>          # make liblockdep
>            DESCEND  lib/lockdep
>            CC       lockdep.o
>          In file included from lockdep.c:33:0:
>          ../../../kernel/locking/lockdep.c:53:28: fatal error: linux/rcupdate.h: No such file or directory
>          compilation terminated.
>          mv: cannot stat './.lockdep.o.tmp': No such file or directory
>          /home/lzy/kernel-upstream/linux-linus-ubuntu/tools/build/Makefile.build:96: recipe for target 'lockdep.o' failed
>          make[2]: *** [lockdep.o] Error 1
>          Makefile:121: recipe for target 'liblockdep-in.o' failed
>          make[1]: *** [liblockdep-in.o] Error 2
>          Makefile:68: recipe for target 'liblockdep' failed
>          make: *** [liblockdep] Error 2
> 
> BTW, It was introduced by commit a0b0fd53e1e ("locking/lockdep: Free lock classes that are no longer in use").

(+Peter)

Hi Zhengyuan Liu,

The approach of liblockdep is fragile. Every time an additional kernel 
header is included from the lockdep code or a change is made in one of 
the kernel headers used by lockdep, that change has to be ported to the 
include files in the tools/lib/lockdep/include/liblockdep/ directory. I 
think there are two possible solutions:
- Making the changes necessary to make liblockdep build again.
- Removing the code under tools/lib/lockdep and porting this code to the
   new KUnit framework. If I understood the KUnit framework correctly it
   is based on UML and hence does not require kernel headers to be
   duplicated.

I'm not sure what the best approach is.

Thanks,

Bart.

  reply	other threads:[~2019-11-18 23:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18  9:20 Compilation error for target liblockdep Zhengyuan Liu
2019-11-18 23:14 ` Bart Van Assche [this message]
     [not found] ` <SN4PR0401MB359876ED2A2D503638658A679B1A0@SN4PR0401MB3598.namprd04.prod.outlook.com>
2020-02-14  5:57   ` Bart Van Assche
     [not found]     ` <SN4PR0401MB35983B3ACED57F66634CF90E9BDA0@SN4PR0401MB3598.namprd04.prod.outlook.com>
2020-04-15  2:09       ` Bart Van Assche

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=e3ae190e-0888-3d4a-e969-9604d4ab8695@acm.org \
    --to=bvanassche@acm.org \
    --cc=alexander.levin@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuzhengyuan@kylinos.cn \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    /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).