From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oHIgLEA+5l7ZPQAA0tVLHw (envelope-from ) for ; Sun, 14 Jun 2020 15:12:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CJr+J0A+5l5vGAAAB5/wlQ (envelope-from ) for ; Sun, 14 Jun 2020 15:12:00 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 13C579408E9 for ; Sun, 14 Jun 2020 15:11:59 +0000 (UTC) Received: from localhost ([::1]:57738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkUIf-0005Fp-MA for larch@yhetil.org; Sun, 14 Jun 2020 11:11:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkUIX-0005Er-BW for help-guix@gnu.org; Sun, 14 Jun 2020 11:11:49 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:36364) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jkUIV-0005BT-0z for help-guix@gnu.org; Sun, 14 Jun 2020 11:11:48 -0400 Received: by mail-pl1-x642.google.com with SMTP id j4so2486307plk.3 for ; Sun, 14 Jun 2020 08:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=EP5u6ofKsSe3PFXPZ7VIeyE5oDzEiZrlL94JvjDfgqQ=; b=WGxgAnkaGCtze/hOKZIQbjcvK9O3EbrN3hNEWz34+6XMtQ01h35fRCw4AImj3eYR0G AHdZks+zak0JistYrf8YJF2Q+VfdpscOBBGYjQWYA7vPcftOki4+gZ40caIw8zVlb0+C Q+MGKky5c1diAjuk2G2pLA6astXyUf1rkkZKt5WWWRqzGo5BI3Zkp9YK/ae57VkzEHRv 1r4+cJytNHWsu8TLgQuYLHA7cb+rk5Juug+XMIieikhg3fhkCeqRbadQELty4MC2wqIP Tmf/PJrXvKRYe0wYO4oS0O4OiZHzzhxe92HNL4Oaf1JqzsyynTKMKSTximdSGnvoZAbn BV+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=EP5u6ofKsSe3PFXPZ7VIeyE5oDzEiZrlL94JvjDfgqQ=; b=HvpB6v6EaD+ylnuAaS9ZnL75w0IXU7btRgdO1QhryZ5zL88qqOofP9YrdjGydcrRK/ LZG0f+VVrd+c4Fodzy070gHpZhYqKkQLqrCTK81ALIePPYY1nUGW5wO60K2Udx4+qJpO HvFstJAUEUBJG5AmIjkTlwHIoEkTnzoWCs8CYh5iAcFHEOhARjh/Ud1QMoUjHWXIO3Ff r7A60Ll8fCDclC/Co94ZXEBPexG6M3rYw2oz4wIM94H42H8rJG7DRYhWHiLJR3isk7Z0 eYW5AxwUFCHc0lig6aWPBHXDiyXCtJfhrUb4DhLT0ZcHf8BjRedFJJZvx2qntjYZSY5W ddHA== X-Gm-Message-State: AOAM532rqeALXfFPInYHQPRGFUWQ8Ewltebr4peTOCize0xyPMKCpMT1 VMhhu4K1Pz28Y65kglVxjayaZc9avOU= X-Google-Smtp-Source: ABdhPJwIMJrbAYyJQuO4dR9tiET8oZ9YPPDV0YC2b7jYndAIjyeF70pF/7AhxpOvBWZxiNsVs/TFfg== X-Received: by 2002:a17:902:fe02:: with SMTP id g2mr18222103plj.204.1592147504708; Sun, 14 Jun 2020 08:11:44 -0700 (PDT) Received: from ecenter ([2600:1700:83b0:8bd0::6a0]) by smtp.gmail.com with ESMTPSA id x14sm11587635pfq.80.2020.06.14.08.11.43 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Jun 2020 08:11:44 -0700 (PDT) From: John Soo To: Mathieu Othacehe Subject: Re: BPF in linux-libre References: <44046537-51AD-4BD7-8442-41738C4D8C98@asu.edu> <87lfkqknla.fsf@gnu.org> Date: Sun, 14 Jun 2020 08:11:39 -0700 In-Reply-To: <87lfkqknla.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 14 Jun 2020 11:23:29 +0200") Message-ID: <87h7vdd6ms.fsf@asu.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=jsoo1@asu.edu; helo=mail-pl1-x642.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Help Guix Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=asu-edu.20150623.gappssmtp.com header.s=20150623 header.b=WGxgAnka; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=asu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: 0.39 X-TUID: GWqp54SAFPxy Hi Mathieu, Mathieu Othacehe writes: > Now, it's just a matter of packaging "bcc" and "bpftrace" I guess. I was working on these yesterday. I keep getting errors that seem to indicate the linux-libre-headers we have might not be compatible: Here's my definition: (define-public bcc (let* ((ver "0.14.0") (commit (string-append "v" ver))) (package (name "bcc") (version ver) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/iovisor/bcc") (commit commit))) (file-name (git-file-name name ver)) (sha256 (base32 "08m21avzamr48qwshd4r5hlcckk1kvgrb1i6qw373b7la89jf5an")))) (build-system cmake-build-system) (inputs `(("bison" ,bison) ("clang-toolchain" ,clang-toolchain) ("flex" ,flex) ("libbpf" ,libbpf) ("libelf" ,libelf) ("linux-libre-headers" ,linux-libre-headers) ("python-wrapper" ,python-wrapper))) (arguments `(#:parallel-build? #f #:configure-flags (list (string-append "-DLIBBPF_INCLUDE_DIR=3D" (assoc-ref %build-inputs "libbpf") "/i= nclude")))) (home-page "https://github.com/iovisor/bcc") (synopsis "Tools for BPF on Linux") (description "BCC is a toolkit for creating efficient kernel tracing and manipulation programs, and includes several useful tools and examples. It makes use of extended BPF (Berkeley Packet Filters), formally known as eBPF= , a new feature that was first added to Linux 3.15. Much of what BCC uses requ= ires Linux 4.1 and above.") (license license:asl2.0)))) I get a lot of errors that certain things are undefined. I am guessing the names should be available in the linux headers? /tmp/guix-build-bcc-0.14.0.drv-0/source/src/cc/libbpf.c:694:58: error: =E2= =80=98BPF_PROG_TYPE_EXT=E2=80=99 undeclared (first use in this function); d= id you mean =E2=80=98BPF_PROG_TYPE_XDP=E2=80=99? if (prog_type !=3D BPF_PROG_TYPE_TRACING && prog_type !=3D BPF_PROG_TYPE= _EXT) ^~~~~~~~~~~~~~~~~ BPF_PROG_TYPE_XDP The bcc github releases seem to indicate that bcc supports kernels up to 5.6. I also defined libbpf (included as a submodule) like this: (define-public libbpf (let* ((commit "6a1615c263b679c17ecb292fa897f159e826dc10")) (package (name "libbpf") (version "0.0.8") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/libbpf/libbpf") (commit commit))) (sha256 (base32 "02vbpg9v5sjcw7ihximy63cjmz82q5izkp91i44m1qp6qj5qn4sr")))) (build-system gnu-build-system) (inputs `(("libelf" ,libelf) ("pkg-config" ,pkg-config) ("zlib" ,zlib))) (arguments `(#:tests? #f ; No tests #:make-flags (list (string-append "PREFIX=3D''") (string-append "DESTDIR=3D" (assoc-ref %outputs "out")) (string-append "CC=3D" (assoc-ref %build-inputs "gcc") "/bin/gcc")) #:phases (modify-phases %standard-phases (delete 'configure) (add-before 'build 'pre-build (lambda* (#:key inputs #:allow-other-keys) (substitute* "scripts/check-reallocarray.sh" (("/bin/rm" rm) (string-append (assoc-ref inputs "coreutils") rm))) (chdir "src") #t))))) (home-page "https://github.com/libbpf/libbpf") (synopsis "BPF CO-RE (Compile Once =E2=80=93 Run Everywhere)") (description "Libbpf supports building BPF CO-RE-enabled applications, which, in contrast to BCC, do not require Clang/LLVM runtime being deployed to target servers and does not rely on kernel-devel headers being available.") (license `(,license:lgpl2.1 ,license:bsd-2))))) I'm not sure where to go from here. Thanks for the help! - John