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 wM2YKfod6l5OTgAA0tVLHw (envelope-from ) for ; Wed, 17 Jun 2020 13:43:22 +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 6FeLJfod6l5wHwAAB5/wlQ (envelope-from ) for ; Wed, 17 Jun 2020 13:43:22 +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 8823D94051D for ; Wed, 17 Jun 2020 13:43:21 +0000 (UTC) Received: from localhost ([::1]:46618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlYLY-0004OB-0y for larch@yhetil.org; Wed, 17 Jun 2020 09:43:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlYLP-0004Nu-8c for help-guix@gnu.org; Wed, 17 Jun 2020 09:43:11 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:40080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlYLL-0006Yw-3H for help-guix@gnu.org; Wed, 17 Jun 2020 09:43:10 -0400 Received: by mail-pf1-x430.google.com with SMTP id s23so1150804pfh.7 for ; Wed, 17 Jun 2020 06:43:05 -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; bh=cKnUcJsHyFLbMkLAs9JeIvu0kBM7tuQ3VqWh1bQRs78=; b=W0xuOXABr+5E1adlOPLWS4Qbep2QxVwbXxmtPJzB8KKMzx2X93VNlUd4iKkROuSkP3 JKJ4P/X+3kqD7QWMDr70wL7i/EYvw5AhG2m0mD5W8bybtVTSitPm9COqKeYLoQpQN3Tl 7SCEUOc7D1y4gwsIx+RZZZGko+2gQ8k6hqeDNxfdWNyijdvDJKSKq6PG5sIlcbvuxC9t c5L5q1mgikIPlYLkfxT+ILRbioaD6AW4E4nZcwo/aBnSYBhOZRB2udHAS/u9GRQ+7VWw vBJPgilF1WF9cz+0XHB9nNsKSxKRGbXsMld7Jop8GLqRwqVR9k/4FLPfhT500E68Fjk/ +v6A== 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; bh=cKnUcJsHyFLbMkLAs9JeIvu0kBM7tuQ3VqWh1bQRs78=; b=hYP1blccyimod+jgoCR3arld/zKyE+AMezzdnMAp76S1MF9X3xVLpP8WP1jms6jHy1 hVXf//YxM/6yT58A2SU7zbkpz9vZj68Ckl2l5SZr95WfB6VxVe4OsqlQUxm7xuctj0iE ZE4UcKyZay+YuYg+j0RyRRqefi6rSJIeShffd6FTIDwhrxiHWCVAB/N+DpC/I+VmqsVp YSPiaq8SmAEDwpJNqMa7Q+etMS03Ar7P/dxSSXLjtDi5OpHn6QsWgh3uCtE036eX3Tet AJNOEA8MPcS8dbBH244MDWve7xMIJLNteLETH4hjheJKnYY5c1pBHtAyttUKW1qaK5Bi GloQ== X-Gm-Message-State: AOAM533rSs057p7UoR4x7H+j45i66N484bZxopYoeYRGWz3kBOWUpxLy KwNEHHY7zQ4LnWkokrWb2HqwiYMjfuo= X-Google-Smtp-Source: ABdhPJzROiQdVyvZcBmsWq45IlPuHkQpMpWQv2YGRyh7VbC69JJtBZ7I9YVn7GC5/UCqSWOC2Q4l2Q== X-Received: by 2002:a63:2043:: with SMTP id r3mr5952648pgm.299.1592401384459; Wed, 17 Jun 2020 06:43:04 -0700 (PDT) Received: from ecenter ([2600:1700:83b0:8bd0::6a0]) by smtp.gmail.com with ESMTPSA id b7sm8128pfo.202.2020.06.17.06.43.02 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 06:43:03 -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> <87h7vdd6ms.fsf@asu.edu> <87wo46uhdr.fsf@gnu.org> Date: Wed, 17 Jun 2020 06:42:57 -0700 In-Reply-To: <87wo46uhdr.fsf@gnu.org> (Mathieu Othacehe's message of "Wed, 17 Jun 2020 12:16:32 +0200") Message-ID: <87a711reou.fsf@asu.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=jsoo1@asu.edu; helo=mail-pf1-x430.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, URIBL_BLOCKED=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=W0xuOXAB; 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: -1.11 X-TUID: Hs4ors3U+8p3 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Mathieu, Mathieu Othacehe writes: > Yes the issue here is that linux-libre-headers is in fact > linux-libre-headers-5.4.20 which is too old. > > I tried to add linux-libre-headers-5.7 to the inputs. Even though it > comes first in CPLUS_INCLUDE_PATH, GCC is picking the old headers. I found out that if LIBBPF_INCLUDE_DIR was specified instead of present as a submodule, the error about missing macros would occur. There is an open issue upstream regarding it so now bcc builds ok. It was definitely confusing because kernels since about 4.16 support bpf. Now there is a new problem building bpftrace: cd /tmp/guix-build-bpftrace-0.10.0-1.v0.10.0.drv-0/build/src && /gnu/store/= 89rj5fqcg48afgk99639ds602pgf92k4-cmake-minimal-3.16.5/bin/cmake -E cmake_li= nk_script CMakeFiles/bpftrace.dir/link.txt --verbose=3D1 /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/bin/c++ -O2 -g -DNDE= BUG -rdynamic CMakeFiles/bpftrace.dir/attached_probe.cpp.o CMakeFiles/bpft= race.dir/bpffeature.cpp.o CMakeFiles/bpftrace.dir/bpftrace.cpp.o CMakeFiles= /bpftrace.dir/btf.cpp.o CMakeFiles/bpftrace.dir/clang_parser.cpp.o CMakeFil= es/bpftrace.dir/disasm.cpp.o CMakeFiles/bpftrace.dir/driver.cpp.o CMakeFile= s/bpftrace.dir/fake_map.cpp.o CMakeFiles/bpftrace.dir/list.cpp.o CMakeFiles= /bpftrace.dir/lockdown.cpp.o CMakeFiles/bpftrace.dir/main.cpp.o CMakeFiles/= bpftrace.dir/map.cpp.o CMakeFiles/bpftrace.dir/mapkey.cpp.o CMakeFiles/bpft= race.dir/output.cpp.o CMakeFiles/bpftrace.dir/printf.cpp.o CMakeFiles/bpftr= ace.dir/resolve_cgroupid.cpp.o CMakeFiles/bpftrace.dir/signal.cpp.o CMakeFi= les/bpftrace.dir/struct.cpp.o CMakeFiles/bpftrace.dir/tracepoint_format_par= ser.cpp.o CMakeFiles/bpftrace.dir/types.cpp.o CMakeFiles/bpftrace.dir/utils= .cpp.o CMakeFiles/bpftrace.dir/bfd-disasm.cpp.o -o bpftrace -Wl,-rpath,::= ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -Wl= ,-Bstatic -lbfd -lopcodes arch/libarch.a ast/libast.a ../libparser.a ../res= ources/libresources.a -Wl,-Bdynamic -lbcc -lelf arch/libarch.a /gnu/store/8= 0y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMOrcJIT.so.= 9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/lib= LLVMJITLink.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchai= n-9.0.1/lib/libLLVMMCJIT.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-c= lang-toolchain-9.0.1/lib/libLLVMExecutionEngine.so.9 /gnu/store/80y2wbx9lrh= vwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMRuntimeDyld.so.9 /gn= u/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libclang= .so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib= /libLLVMXCoreDisassembler.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-= clang-toolchain-9.0.1/lib/libLLVMXCoreCodeGen.so.9 /gnu/store/80y2wbx9lrhvw= p41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMXCoreDesc.so.9 /gnu/st= ore/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMXCore= Info.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1= /lib/libLLVMX86Disassembler.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8av= n-clang-toolchain-9.0.1/lib/libLLVMX86AsmParser.so.9 /gnu/store/80y2wbx9lrh= vwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMX86CodeGen.so.9 /gnu= /store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMX8= 6Desc.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.= 1/lib/libLLVMX86Utils.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clan= g-toolchain-9.0.1/lib/libLLVMX86Info.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjs= b4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMWebAssemblyDisassembler.so.9 /g= nu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVM= WebAssemblyAsmParser.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang= -toolchain-9.0.1/lib/libLLVMWebAssemblyCodeGen.so.9 /gnu/store/80y2wbx9lrhv= wp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMWebAssemblyDesc.so.9 = /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLL= VMWebAssemblyInfo.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-to= olchain-9.0.1/lib/libLLVMSystemZDisassembler.so.9 /gnu/store/80y2wbx9lrhvwp= 41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMSystemZAsmParser.so.9 /= gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLV= MSystemZCodeGen.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-tool= chain-9.0.1/lib/libLLVMSystemZDesc.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4= g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMSystemZInfo.so.9 /gnu/store/80y2w= bx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMSparcDisassemb= ler.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/= lib/libLLVMSparcAsmParser.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-= clang-toolchain-9.0.1/lib/libLLVMSparcCodeGen.so.9 /gnu/store/80y2wbx9lrhvw= p41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMSparcDesc.so.9 /gnu/st= ore/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMSparc= Info.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1= /lib/libLLVMRISCVDisassembler.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8= avn-clang-toolchain-9.0.1/lib/libLLVMRISCVAsmParser.so.9 /gnu/store/80y2wbx= 9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMRISCVCodeGen.so.= 9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/lib= LLVMRISCVDesc.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolch= ain-9.0.1/lib/libLLVMRISCVUtils.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9f= f8avn-clang-toolchain-9.0.1/lib/libLLVMRISCVInfo.so.9 /gnu/store/80y2wbx9lr= hvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMPowerPCDisassembler= .so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib= /libLLVMPowerPCAsmParser.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-c= lang-toolchain-9.0.1/lib/libLLVMPowerPCCodeGen.so.9 /gnu/store/80y2wbx9lrhv= wp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMPowerPCDesc.so.9 /gnu= /store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMPo= werPCInfo.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-= 9.0.1/lib/libLLVMNVPTXCodeGen.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8= avn-clang-toolchain-9.0.1/lib/libLLVMNVPTXDesc.so.9 /gnu/store/80y2wbx9lrhv= wp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMNVPTXInfo.so.9 /gnu/s= tore/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMMSP4= 30Disassembler.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolc= hain-9.0.1/lib/libLLVMMSP430AsmParser.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjj= sb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMMSP430CodeGen.so.9 /gnu/store/= 80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMMSP430Des= c.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/li= b/libLLVMMSP430Info.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-= toolchain-9.0.1/lib/libLLVMMipsDisassembler.so.9 /gnu/store/80y2wbx9lrhvwp4= 1nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMMipsAsmParser.so.9 /gnu/= store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMMip= sCodeGen.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9= .0.1/lib/libLLVMMipsDesc.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-c= lang-toolchain-9.0.1/lib/libLLVMMipsInfo.so.9 /gnu/store/80y2wbx9lrhvwp41nn= yjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMLanaiDisassembler.so.9 /gnu= /store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMLa= naiCodeGen.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain= -9.0.1/lib/libLLVMLanaiAsmParser.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9= ff8avn-clang-toolchain-9.0.1/lib/libLLVMLanaiDesc.so.9 /gnu/store/80y2wbx9l= rhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMLanaiInfo.so.9 /gn= u/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMH= exagonDisassembler.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-t= oolchain-9.0.1/lib/libLLVMHexagonCodeGen.so.9 /gnu/store/80y2wbx9lrhvwp41nn= yjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMHexagonAsmParser.so.9 /gnu/= store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMHex= agonDesc.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9= .0.1/lib/libLLVMHexagonInfo.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8av= n-clang-toolchain-9.0.1/lib/libLLVMBPFDisassembler.so.9 /gnu/store/80y2wbx9= lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMBPFAsmParser.so.9= /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libL= LVMARMDisassembler.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-t= oolchain-9.0.1/lib/libLLVMARMAsmParser.so.9 /gnu/store/80y2wbx9lrhvwp41nnyj= jsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMARMCodeGen.so.9 /gnu/store/80= y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMARMDesc.so.= 9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/lib= LLVMARMUtils.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolcha= in-9.0.1/lib/libLLVMARMInfo.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8av= n-clang-toolchain-9.0.1/lib/libLLVMAMDGPUDisassembler.so.9 /gnu/store/80y2w= bx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMAMDGPUAsmParse= r.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/li= b/libLLVMAMDGPUCodeGen.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-cla= ng-toolchain-9.0.1/lib/libLLVMMIRParser.so.9 /gnu/store/80y2wbx9lrhvwp41nny= jjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMipo.so.9 /gnu/store/80y2wbx9= lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMLinker.so.9 /gnu/= store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMIns= trumentation.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolcha= in-9.0.1/lib/libLLVMIRReader.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8a= vn-clang-toolchain-9.0.1/lib/libLLVMAsmParser.so.9 /gnu/store/80y2wbx9lrhvw= p41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMVectorize.so.9 /gnu/st= ore/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMAMDGP= UDesc.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.= 1/lib/libLLVMAMDGPUUtils.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-c= lang-toolchain-9.0.1/lib/libLLVMAMDGPUInfo.so.9 /gnu/store/80y2wbx9lrhvwp41= nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMAArch64Disassembler.so.9 = /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLL= VMMCDisassembler.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-too= lchain-9.0.1/lib/libLLVMAArch64AsmParser.so.9 /gnu/store/80y2wbx9lrhvwp41nn= yjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMAArch64CodeGen.so.9 /gnu/st= ore/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMGloba= lISel.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.= 1/lib/libLLVMAArch64Desc.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-c= lang-toolchain-9.0.1/lib/libLLVMAArch64Utils.so.9 /gnu/store/80y2wbx9lrhvwp= 41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMAArch64Info.so.9 /gnu/s= tore/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMBPFC= odeGen.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0= .1/lib/libLLVMSelectionDAG.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn= -clang-toolchain-9.0.1/lib/libLLVMAsmPrinter.so.9 /gnu/store/80y2wbx9lrhvwp= 41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMDebugInfoDWARF.so.9 /gn= u/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMC= odeGen.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0= .1/lib/libLLVMScalarOpts.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-c= lang-toolchain-9.0.1/lib/libLLVMInstCombine.so.9 /gnu/store/80y2wbx9lrhvwp4= 1nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMAggressiveInstCombine.so= .9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/li= bLLVMTransformUtils.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-= toolchain-9.0.1/lib/libLLVMBitWriter.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjs= b4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMTarget.so.9 /gnu/store/80y2wbx9= lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMAnalysis.so.9 /gn= u/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMP= rofileData.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain= -9.0.1/lib/libLLVMObject.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-c= lang-toolchain-9.0.1/lib/libLLVMMCParser.so.9 /gnu/store/80y2wbx9lrhvwp41nn= yjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMBitReader.so.9 /gnu/store/8= 0y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMBitstreamR= eader.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.= 1/lib/libLLVMBPFDesc.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang= -toolchain-9.0.1/lib/libLLVMMC.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff= 8avn-clang-toolchain-9.0.1/lib/libLLVMDebugInfoCodeView.so.9 /gnu/store/80y= 2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMDebugInfoMSF= .so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib= /libLLVMBPFInfo.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-tool= chain-9.0.1/lib/libLLVMCore.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8av= n-clang-toolchain-9.0.1/lib/libLLVMRemarks.so.9 /gnu/store/80y2wbx9lrhvwp41= nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMBinaryFormat.so.9 /gnu/st= ore/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libLLVMSuppo= rt.so.9 /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/l= ib/libLLVMDemangle.so.9=20 ld: /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/l= ibbfd.a(compress.o): undefined reference to symbol 'inflateEnd' ld: /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/l= ibz.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [src/CMakeFiles/bpftrace.dir/build.make:532: src/bpftrace] Err= or 1 make[2]: Leaving directory '/tmp/guix-build-bpftrace-0.10.0-1.v0.10.0.drv-0= /build' make[1]: *** [CMakeFiles/Makefile2:363: src/CMakeFiles/bpftrace.dir/all] Er= ror 2 make[1]: Leaving directory '/tmp/guix-build-bpftrace-0.10.0-1.v0.10.0.drv-0= /build' make: *** [Makefile:133: all] Error 2 Updated patches attached. Thanks! - John --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-libbpf.patch Content-Transfer-Encoding: quoted-printable >From 1fd0e237ec93c953b49fcafa819dcfc1198b8644 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 13 Jun 2020 14:53:50 -0700 Subject: [PATCH 1/5] gnu: Add libbpf. * gnu/packages/linux.scm (libbpf): New variable. --- gnu/packages/linux.scm | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index f2b35e33c5..cd4b712786 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -45,6 +45,7 @@ ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2020 Brice Waegeneire ;;; Copyright =C2=A9 2020 Morgan Smith +;;; Copyright =C2=A9 2020 John Soo ;;; ;;; This file is part of GNU Guix. ;;; @@ -7127,3 +7128,48 @@ cache data store that is used by network file system= s such as @code{AFS} and @code{NFS} to cache data locally on disk. The content of the cache is persistent over reboots.") (license license:gpl2+))) + +(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))))) --=20 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-Add-bpf-extra-linux-options.patch >From f0eff687adee1494c3d642379292dae7cd2a85e6 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 13 Jun 2020 22:52:55 -0700 Subject: [PATCH 2/5] gnu: Add %bpf-extra-linux-options. * gnu/packages/linux (%bpf-extra-linux-options): New variable. --- gnu/packages/linux.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index cd4b712786..bb4f7af81f 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -619,6 +619,22 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." ("CONFIG_CIFS" . m) ("CONFIG_9P_FS" . m))) +;; See https://github.com/iovisor/bcc/blob/master/INSTALL.md#kernel-configuration +(define %bpf-extra-linux-options + `(("CONFIG_BPF" . #t) + ("CONFIG_BPF_SYSCALL" . #t) + ;; optional, for tc filters + ("CONFIG_NET_CLS_BPF" . m) + ;; optional, for tc actions + ("CONFIG_NET_ACT_BPF" . m) + ("CONFIG_BPF_JIT" . #t) + ;; for Linux kernel versions 4.1 through 4.6 + ;; ("CONFIG_HAVE_BPF_JIT" . y) + ;; for Linux kernel versions 4.7 and later + ("CONFIG_HAVE_EBPF_JIT" . #t) + ;; optional, for kprobes + ("CONFIG_BPF_EVENTS" . #t))) + (define (config->string options) (string-join (map (match-lambda ((option . 'm) -- 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-Add-linux-libre-with-bpf.patch >From bf93994a7c1eb3e910061d5c6de8a86d0bc8f331 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 13 Jun 2020 22:54:24 -0700 Subject: [PATCH 3/5] gnu: Add linux-libre-with-bpf. * gnu/packages/linux.scm (linux-libre-with-bpf): New variable. --- gnu/packages/linux.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index bb4f7af81f..5c379e7cd3 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -7145,6 +7145,16 @@ cache data store that is used by network file systems such as @code{AFS} and persistent over reboots.") (license license:gpl2+))) +(define-public linux-libre-with-bpf + (make-linux-libre* linux-libre-5.4-version + linux-libre-5.4-source + '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux") + #:extra-version "bpf" + #:configuration-file kernel-config + #:extra-options + (append %bpf-extra-linux-options + %default-extra-linux-options))) + (define-public libbpf (let* ((commit "6a1615c263b679c17ecb292fa897f159e826dc10")) (package -- 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-Add-bcc.patch >From a4a3836ab1cb781ba7138d4ddc213ac18fe17db4 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 13 Jun 2020 23:16:11 -0700 Subject: [PATCH 4/5] gnu: Add bcc. * gnu/packages/linux.scm (bcc): New variable. --- gnu/packages/linux.scm | 65 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 5c379e7cd3..362e041ba9 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -97,6 +97,8 @@ #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages libunwind) #:use-module (gnu packages libusb) + #:use-module (gnu packages llvm) + #:use-module (gnu packages lua) #:use-module (gnu packages man) #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) @@ -131,6 +133,7 @@ #:use-module (gnu packages rsync) #:use-module (gnu packages selinux) #:use-module (gnu packages swig) + #:use-module (gnu packages version-control) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system go) @@ -7199,3 +7202,65 @@ persistent over reboots.") 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))))) + +(define-public bcc + (let* ((ver "0.14.0") + (commit (string-append "v" ver)) + (revision "1")) + (package + (name "bcc") + (version (git-version ver revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/iovisor/bcc") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08m21avzamr48qwshd4r5hlcckk1kvgrb1i6qw373b7la89jf5an")))) + (build-system cmake-build-system) + (inputs + `(;; TODO: package optional integrations + ;; ("arping" ,argping) + ;; ("netperf" ,netperf) + ;; ("iperf" ,iperf) or ("iperf3" ,iperf3) + ("bison" ,bison) + ("clang-toolchain" ,clang-toolchain) + ("flex" ,flex) + ;; FIXME: Timestamp some other way. + ("git" ,git) + ("libbpf" ,(package-source libbpf)) + ;; LibElf required but libelf does not contain + ;; archives, only object files. + ;; https://github.com/iovisor/bcc/issues/504 + ("elfutils" ,elfutils) + ("linux-libre-headers" ,linux-libre-headers) + ("luajit" ,luajit) + ("python-wrapper" ,python-wrapper))) + (arguments + `(;; Tests all require sudo and a "standard" file heirarchy + #:tests? #f + ;; LIBBPF_INCLUDE_DIR should work with the output of libbpf - + ;; i.e. ,libbpf instead of ,(package-source libbpf) in inputs + ;; but it seems there could be a bug + ;; #:configure-flags + ;; (list + ;; (string-append + ;; "-DLIBBPF_INCLUDE_DIR=" (assoc-ref %build-inputs "libbpf") "/include")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'copy-libbpf + (lambda* (#:key inputs #:allow-other-keys) + (delete-file-recursively "src/cc/libbpf") + (copy-recursively (assoc-ref inputs "libbpf") "src/cc/libbpf")))))) + (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 requires +Linux 4.1 and above.") + (license license:asl2.0)))) -- 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-WIP-gnu-Add-bpftrace.patch >From b8b02baf0b2bfa42e0b2d19a47bb5895e0004f93 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 13 Jun 2020 23:16:56 -0700 Subject: [PATCH 5/5] [WIP] gnu: Add bpftrace. * gnu/packages/linux.scm (bpftrace): New variable. --- gnu/packages/linux.scm | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 362e041ba9..b7956f3d61 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -7264,3 +7264,48 @@ 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 requires Linux 4.1 and above.") (license license:asl2.0)))) + +(define-public bpftrace + (let* ((ver "0.10.0") + (commit (string-append "v" ver)) + (revision "1")) + (package + (name "bpftrace") + (version (git-version ver revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/iovisor/bpftrace") + (commit commit))) + (file-name (git-file-name name ver)) + (sha256 + (base32 + "023ardywbw5w8815j2ny9rrp2xlpxndqaa7v2njjm8109p7ilsdn")))) + (build-system cmake-build-system) + (inputs + `(("bcc" ,bcc) + ("bison" ,bison) + ("clang-toolchain" ,clang-toolchain) + ("elfutils" ,elfutils) + ("flex" ,flex) + ;; FIXME: Tests require googletest but not from system + ;; ("googletest" ,googletest) + ("linux-libre-headers" ,linux-libre-headers))) + (arguments + `(#:configure-flags + '(;; FIXME: Make tests not clone the googletest repository + "-DBUILD_TESTING=OFF" + "-DLIBBFD_DISASM_FOUR_ARGS_SIGNATURE=ON"))) + (home-page "https://github.com/iovisor/bpftrace") + (synopsis "High-level tracing language for Linux eBPF") + (description + "bpftrace is a high-level tracing language for Linux enhanced Berkeley +Packet Filter (eBPF) available in recent Linux kernels (4.x). bpftrace uses +LLVM as a backend to compile scripts to BPF-bytecode and makes use of BCC for +interacting with the Linux BPF system, as well as existing Linux tracing +capabilities: kernel dynamic tracing (kprobes), user-level dynamic +tracing (uprobes), and tracepoints. The bpftrace language is inspired by awk +and C, and predecessor tracers such as DTrace and SystemTap. bpftrace was +created by Alastair Robertson.") + (license license:asl2.0)))) -- 2.26.2 --=-=-=--