From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0GBRMqFnX2XZEQAAG6o9tA:P1 (envelope-from ) for ; Thu, 23 Nov 2023 15:54:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0GBRMqFnX2XZEQAAG6o9tA (envelope-from ) for ; Thu, 23 Nov 2023 15:54:25 +0100 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 86F535DF17 for ; Thu, 23 Nov 2023 15:54:25 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700751265; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=ApMlyxtvTVz1lL+hgAoAqzBBr13pj6eXhlK06PApjPs=; b=HarYOVXIzleLYx27TiBMEgRdJacAm1B/RsZabLTpjmUcn8TKbWE+AsfocYkKjL8SPSgjGQ 5UjcHB4BIVEzxtjSa0Jwn7uGfXYWx9vxq9Sr4YeIboA2yb0MVD/Kc7AeZOv/rX0JDlQFAS Y5AU3A8+Tf+yliUC6x9DTVndWasFJ4ojH7nNKhz2HXDIeAe93ww1J9RTJkOLI3wyqtsa5S /u3GHKrX0UaycRvNHienndiuCem4LT3qiIEHCXnsiCKbqodSGvoSz9q2fnyGT4NTJgNEbi nmIaeeOD2i11mO60A8kxl1nm7hubNmsSk/qg0UPJESuV4QHMXIMBxUOYjTd9hg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1700751265; a=rsa-sha256; cv=none; b=kplxmkIiRqBTx2QL12+0snDI9mHMWuDEGcqlHhNaUB0EDCUJjtqadfxPAlpwdu+JBTWDiF 69sfEM2iytUFnuNrAvXKlYGPFyxOlvD2Jg8o2QRjNpPaak1kX2PQDZM3D/d9++nI57qJSX jSmLE/ESkLST/AXZ2vthMCb1eUnRukuBifpb7V2NHoCic6OnS/C7BoYVxmaDpK5/johfVL +Bk4uBczLWvvOgkkZz7N/3ASElYuckUZIoNotwbjxlRiVhdwdWIm6KvUHQ6l6bMOH6pPLY hS4X3Q43ZyJDhXBy596rYwo+gbM/gkQBJFGQHa1SyUBjMQg8y6Y39cntuFO1DA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6B5g-0006bm-H2; Thu, 23 Nov 2023 09:54:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6B5e-0006aZ-Nb for guix-patches@gnu.org; Thu, 23 Nov 2023 09:54:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6B5e-0001dw-FY for guix-patches@gnu.org; Thu, 23 Nov 2023 09:54:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6B5h-0007Bg-AZ for guix-patches@gnu.org; Thu, 23 Nov 2023 09:54:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67399] [PATCH v2 3/3] gnu: aflplusplus: Build afl-gcc/g++-fast Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Thu, 23 Nov 2023 14:54:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67399 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67399@debbugs.gnu.org Cc: Denis 'GNUtoo' Carikli , ( , Christopher Baines , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Raghav Gururajan , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice , jgart X-Debbugs-Original-Xcc: ( , Christopher Baines , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Raghav Gururajan , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice , jgart Received: via spool by 67399-submit@debbugs.gnu.org id=B67399.170075122127553 (code B ref 67399); Thu, 23 Nov 2023 14:54:05 +0000 Received: (at 67399) by debbugs.gnu.org; 23 Nov 2023 14:53:41 +0000 Received: from localhost ([127.0.0.1]:33026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6B5J-0007AG-Bw for submit@debbugs.gnu.org; Thu, 23 Nov 2023 09:53:41 -0500 Received: from [2001:910:1314:ffff::1] (port=49176 helo=gnutoo.cyberdimension.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6B5E-00078m-2V for 67399@debbugs.gnu.org; Thu, 23 Nov 2023 09:53:37 -0500 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id e7a37a2d; Thu, 23 Nov 2023 14:53:28 +0000 (UTC) Received: from localhost.localdomain (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 139e7658; Thu, 23 Nov 2023 14:53:27 +0000 (UTC) From: Denis 'GNUtoo' Carikli Date: Thu, 23 Nov 2023 15:52:52 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <08dda007d354a5857a348d8d001c06216c940893.1694747596.git.GNUtoo@cyberdimension.org> References: <08dda007d354a5857a348d8d001c06216c940893.1694747596.git.GNUtoo@cyberdimension.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.62 X-Spam-Score: -4.62 X-Migadu-Queue-Id: 86F535DF17 X-Migadu-Scanner: mx13.migadu.com X-TUID: 3/KbdQpNpTOQ * gnu/packages/debug.scm (aflplusplus): [inputs]: Add gcc, gmp. --- gnu/packages/debug.scm | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm index 04458d0220..c9fdca8c8b 100644 --- a/gnu/packages/debug.scm +++ b/gnu/packages/debug.scm @@ -50,6 +50,7 @@ (define-module (gnu packages debug) #:use-module (gnu packages code) #:use-module (gnu packages compression) #:use-module (gnu packages flex) + #:use-module (gnu packages gcc) #:use-module (gnu packages gdb) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) @@ -59,6 +60,7 @@ (define-module (gnu packages debug) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) + #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages ninja) #:use-module (gnu packages perl) @@ -473,7 +475,35 @@ (define-public aflplusplus (sha256 (base32 "01hxj65if6rkjrj1fqcgq0jl95dirhkn00mi2k65mff6bckaamxg")))) - (inputs (list python qemu)) + (arguments + (substitute-keyword-arguments (package-arguments american-fuzzy-lop) + ((#:phases phases) + `(modify-phases ,phases + ;; TODO: Enable to cross compile aflplusplus by also enabling qemu + ;; to be cross compiled and by fixing the use-build-gcc phase below. + (add-before 'build 'use-build-gcc + (lambda _ + ;; We need to patch it to select the build-time gcc else we get + ;; something like that: + ;; $ afl-gcc-fast main.c + ;; afl-cc++4.08c by [...] - mode: GCC_PLUGIN-DEFAULT + ;; cc1: error: cannot load plugin + ;; /gnu/[...]-aflplusplus-4.08c/bin/../lib/afl//afl-gcc-pass.so: + ;; /gnu/[...]-aflplusplus-4.08c/bin/../lib/afl//afl-gcc-pass.so: + ;; undefined symbol: + ;; _Z30gimple_build_call_internal_vec11internal_fn3vecIP9tree_node7va_heap6vl_ptrE + (substitute* "src/afl-cc.c" + (("alt_cc = \"gcc\";") + (string-append "alt_cc = \"" + (which "gcc") "\";")) + (("alt_cxx = \"g\\+\\+\";") + (string-append "alt_cxx = \"" + (which "g++") "\";"))))))))) + ;; afl-gcc and g++-fast require gcc and gmp. The gcc-11 input is used + ;; instead of gcc because in the Dockerfile inside aflplusplus source code + ;; has the following comment: "GCC 12 is producing compile errors for some + ;; targets so we stay at GCC 11". + (inputs (list gcc-11 gmp python qemu)) (home-page "https://aflplus.plus") (description "AFLplusplus is a security-oriented fuzzer that employs a novel type of -- 2.41.0