From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0L8FAUZ4y2XAdwAAqHPOHw:P1 (envelope-from ) for ; Tue, 13 Feb 2024 15:10:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 0L8FAUZ4y2XAdwAAqHPOHw (envelope-from ) for ; Tue, 13 Feb 2024 15:10:14 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=ejQ03dDI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707833413; a=rsa-sha256; cv=none; b=hj5loe98XOtRjDvTsZiFuSjbb1eDz2Jtmx9RjKTnHvEWyfHE0GkBzbaB8LM20iPONmqZ+B +QcElZEva30IOFXyzflVywnkL14t4YCDgS6RAVnXxr1G06vaK9NT4S9spp3oY2U00nAWuh cBzgh0I/061BfszMCvRf8xgK4G1jBKgkmdY41EJJCWbIrwr8WLnbCRhL8S8OeWZFrcJB0C u6ahsvtuIMnaoDr5DJ2LR3XBQwZ7O6rUsQqj4i/4qmfKmThitCQHJdDjAl09maOu8sIUyR dx7Woc4IO0U6hJsQT0QsCSZJ0q8eJFttbDzbRi9+T45qpttog27IJ9n+sDOW0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=ejQ03dDI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707833413; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: 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:dkim-signature; bh=s+Zcw+nby1aInz+nDLp8nf3nHVoh4UpSj1DjLvNjJiE=; b=LAjuPDps01Ag9EsLOv1I/4PM7dpvUlUEVYmRC0KjLghL1YxkBf3aq/RQqkHURDKjCGPby8 gP3utnDVBsBTBczP54V1wrB3zL9krdoL4n/gX/aXunWi6qiUZhSepsMDcMYmumzRsnv2HQ L/x6Ljkeh6/ZwrbXtr2t504VcRSObYeFOFTbizvlDUgQkdg3MqTx6zpiFbM37u4am+Mw9k oAtzANQtT+lyZHhfwjybHY6lJ1n6bNtq6rC3wUhLi8CkWGcMtKfQZGCO5xw3S1fq9p+RCk AET9eoLa+cZYocCvd1P8rsTCS8ohEWakIqwgCbT8p5O+250Bc7TBJcWd6W6ZxA== 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 977906C08A for ; Tue, 13 Feb 2024 15:10:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZtTm-0007Le-Gx; Tue, 13 Feb 2024 09:09:46 -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 1rZtTl-0007LP-EG for guix-patches@gnu.org; Tue, 13 Feb 2024 09:09:45 -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 1rZtTl-0002Vs-5u for guix-patches@gnu.org; Tue, 13 Feb 2024 09:09:45 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZtU2-0007Wy-Jc for guix-patches@gnu.org; Tue, 13 Feb 2024 09:10:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68296] [PATCH v2 2/2] gnu: Add klee. Resent-From: soeren@soeren-tempel.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Feb 2024 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68296 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68296@debbugs.gnu.org Received: via spool by 68296-submit@debbugs.gnu.org id=B68296.170783337628878 (code B ref 68296); Tue, 13 Feb 2024 14:10:02 +0000 Received: (at 68296) by debbugs.gnu.org; 13 Feb 2024 14:09:36 +0000 Received: from localhost ([127.0.0.1]:43415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZtTc-0007Vi-4V for submit@debbugs.gnu.org; Tue, 13 Feb 2024 09:09:36 -0500 Received: from magnesium.8pit.net ([45.76.88.171]:1987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZtTZ-0007VS-WD; Tue, 13 Feb 2024 09:09:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=opensmtpd; bh=rOG/zgRWk/ DZoyG+E2MHrbdVWrSre/kTQKEtmB+4TUg=; h=references:in-reply-to:date: subject:to:from; d=soeren-tempel.net; b=ejQ03dDIY6ztY0aJiCM8dlMTUXklgS SWpd62QiyG6QkVyN0Tx8mKTfXq0XPtvHPoieWxFfq4ILobrGlSqA7AM/P0gs6zrtDEnd7j MNOAecE05ayQieN1keHlOEV99nPSLO8WLkfZNWWJAqYuNGCgcdmaChdqNkiYjgqYwpxcey 8= Received: from localhost (dynamic-2a02-3102-49da-001b-df49-33b7-2af2-ff52.310.pool.telefonica.de [2a02:3102:49da:1b:df49:33b7:2af2:ff52]) by magnesium.8pit.net (OpenSMTPD) with ESMTPSA id f5096164 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:YES); Tue, 13 Feb 2024 15:09:12 +0100 (CET) From: soeren@soeren-tempel.net Date: Tue, 13 Feb 2024 15:08:52 +0100 Message-ID: X-Mailer: git-send-email 2.43.1 In-Reply-To: <168e4aa2bfe10a6b15190c93bd3453d665cebd33.1707833332.git.soeren@soeren-tempel.net> References: <168e4aa2bfe10a6b15190c93bd3453d665cebd33.1707833332.git.soeren@soeren-tempel.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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-Scanner: mx10.migadu.com X-Spam-Score: -4.38 X-Migadu-Queue-Id: 977906C08A X-Migadu-Spam-Score: -4.38 X-TUID: +5MSaL2SYwXF From: Sören Tempel * gnu/packages/check.scm (klee): New variable. Signed-off-by: Sören Tempel --- gnu/packages/check.scm | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index ecf48ab121..82c40b63b1 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -73,6 +73,7 @@ (define-module (gnu packages check) #:use-module (gnu packages bash) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) #:use-module (gnu packages glib) @@ -81,6 +82,7 @@ (define-module (gnu packages check) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages maths) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -90,6 +92,7 @@ (define-module (gnu packages check) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages python-science) + #:use-module (gnu packages sqlite) #:use-module (gnu packages texinfo) #:use-module (gnu packages time) #:use-module (gnu packages xml) @@ -3672,3 +3675,52 @@ (define-public klee-uclibc with the @code{klee} package.") (home-page "https://klee.github.io/") (license license:lgpl2.1)))) + +(define-public klee + (package + (name "klee") + (version "3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/klee/klee") + (commit (string-append "v" version)))) + (sha256 + (base32 "0dj20nazkcq84ryr87dihvjznapsbl1n21sa8dhhnb0wsad5d6fb")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + ;; Only x86_64 is presently supported by KLEE upstream. + (supported-systems '("x86_64-linux")) + (arguments + `(#:test-target "systemtests" + #:strip-directories '("bin") + #:configure-flags ,#~(list "-DENABLE_KLEE_ASSERTS=OFF" + "-DENABLE_TCMALLOC=ON" + "-DENABLE_POSIX_RUNTIME=ON" + (string-append "-DKLEE_UCLIBC_PATH=" + #$klee-uclibc)) + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-lit-config + (lambda _ + ;; Make sure that we retain the value of the GUIX_PYTHONPATH + ;; environment variable in the test environmented created by + ;; python-lit. Otherwise, the test scripts won't be able to + ;; find the python-tabulate dependency, causing test failures. + (substitute* "test/lit.cfg" + (("addEnv\\('PWD'\\)" env) + (string-append env "\n" "addEnv('GUIX_PYTHONPATH')")))))))) + ;; KLEE operates on LLVM IR generated by a specific toolchain version. + ;; Propergate the toolchain to allow users to transform code to this version. + (propagated-inputs (list clang-toolchain-13 llvm-13 python python-tabulate)) + (inputs (list z3 gperftools sqlite)) + (native-inputs (list python-lit)) + (synopsis + "Symbolic execution engine built on top of the LLVM compiler infastructure") + (description + "Dynamic symbolic execution engine built on top of +LLVM. Symbolic execution is an automated software testing technique, +KLEE leverage this technique to automatically generate test cases for +software compiled to LLVM IR.") + (home-page "https://klee.github.io/") + (license (list license:expat license:bsd-4))))