Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: shuah <shuah@kernel.org>
To: Dmitry Vyukov <dvyukov@google.com>, linux-kselftest@vger.kernel.org
Cc: shuah <shuah@kernel.org>
Subject: Re: kselftest build broken?
Date: Tue, 11 Jun 2019 09:16:07 -0600	[thread overview]
Message-ID: <54bc80f8-71aa-1c04-5908-01923247832e@kernel.org> (raw)
In-Reply-To: <CACT4Y+Z4naaxx4N2B2t1hn4A99dfk=6yTY2yAZM=aJ05VCPLFQ@mail.gmail.com>

Hi Dmitry,

On 6/11/19 4:30 AM, Dmitry Vyukov wrote:
> Hi,
> 
> I've tried to build kselftests for several years now, but I always
> find the build broken. Which makes me wonder if the instructions are
> broken or something. I follow the instructions in
> Documentation/dev-tools/kselftest.rst and start with "make -C
> tools/testing/selftests". Here is the errors I get on the upstream
> commit 16d72dd4891fecc1e1bf7ca193bb7d5b9804c038:
> > error: unable to create target: 'No available targets are compatible
> with triple "bpf"'
> 1 error generated.
> Makefile:259: recipe for target 'elfdep' failed
> Makefile:156: recipe for target 'all' failed
> Makefile:106: recipe for target
> '/linux/tools/testing/selftests/bpf/libbpf.a' failed
> test_execve.c:4:10: fatal error: cap-ng.h: No such file or directory

These errors are due to missing dependencies. You will need

libmount-dev
libcap-ng-dev
libelf-dev

for bpf to build and also clang

> ../lib.mk:138: recipe for target
> '/linux/tools/testing/selftests/capabilities/test_execve' failed
> gpio-mockup-chardev.c:20:10: fatal error: libmount.h: No such file or directory > <builtin>: recipe for target 'gpio-mockup-chardev' failed
> fuse_mnt.c:17:10: fatal error: fuse.h: No such file or directory

libfuse-dev is missing.

> ../lib.mk:138: recipe for target
> '/linux/tools/testing/selftests/memfd/fuse_mnt' failed
> collect2: error: ld returned 1 exit status
> ../lib.mk:138: recipe for target
> '/linux/tools/testing/selftests/mqueue/mq_open_tests' failed

Needs libpopt-dev

> reuseport_bpf_numa.c:24:10: fatal error: numa.h: No such file or directory

Needs libnuma-dev

> ../lib.mk:138: recipe for target
> '/linux/tools/testing/selftests/net/reuseport_bpf_numa' failed
> mlock-random-test.c:8:10: fatal error: sys/capability.h: No such file
> or directory > ../lib.mk:138: recipe for target
> '/linux/tools/testing/selftests/vm/mlock-random-test' failed
> 
> Here is full log:
> 
> https://gist.githubusercontent.com/dvyukov/47430636e160f297b657df5ba2efa82b/raw/7babc4db228b88f341a376c15e8bc9c4c3b02160/gistfile1.txt
> 
> I have libelf-dev installed. Do I need to install something else? Or
> run some other command?

ii  libelf-dev:amd 0.170-0.4ubu amd64        libelf1 development 
libraries and
ii  libelf1:amd64  0.170-0.4ubu amd64        library to read and write 
ELF fil


All of the above built for me on Linux 5.2-rc4. Try installing all of
these and let me know if you still see problems.
thanks,
-- Shuah

  reply	other threads:[~2019-06-11 15:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 10:30 kselftest build broken? Dmitry Vyukov
2019-06-11 15:16 ` shuah [this message]
2019-06-11 16:03   ` Dmitry Vyukov
2019-06-11 19:20     ` shuah
2019-06-12  8:51       ` Dmitry Vyukov
2019-06-12  9:09         ` Dmitry Vyukov
2019-06-12  9:13           ` Dmitry Vyukov
2019-06-12  9:19             ` Dmitry Vyukov
2019-06-12 11:05               ` Dmitry Vyukov
2019-06-12 11:35                 ` Dmitry Vyukov
2019-06-12 16:44                   ` shuah
2019-06-12 18:29                     ` Dmitry Vyukov
2019-06-12 19:32                       ` shuah
2019-06-12 21:12                         ` Daniel Díaz
2019-06-13  8:55                           ` Naresh Kamboju
2019-06-13 14:10                           ` shuah
2019-06-13 14:21                           ` Dmitry Vyukov
2019-06-13 14:58                             ` Daniel Díaz
2019-06-13 16:37                               ` Dmitry Vyukov
2019-06-13 14:03                         ` Dmitry Vyukov

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=54bc80f8-71aa-1c04-5908-01923247832e@kernel.org \
    --to=shuah@kernel.org \
    --cc=dvyukov@google.com \
    --cc=linux-kselftest@vger.kernel.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