From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kKJFGXvDBWZu5gAAqHPOHw:P1 (envelope-from ) for ; Thu, 28 Mar 2024 20:22:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kKJFGXvDBWZu5gAAqHPOHw (envelope-from ) for ; Thu, 28 Mar 2024 20:22:35 +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=vNsZk1PW; 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=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711653755; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=lDJEY/6A/R/B2hU2deaRrysHaPiLkwJLkvnWLxmFJnw=; b=dTrVLSGvqZIwo3b7AlPr7hTdJ1itdMhQj0MsnwcVEQpOc+i8HrpVGpfUJkeowAeFX/2nnu fDAJuFt34w87oyEPv3nVDD6j38xdakjVaK3wPzhV+Fww8IrIjCWmZP33BRKSDKdM6asAlc UlkJka9hM0sbyH378IGyxc3GE7se//cyTBeymDIs46PMlPJ9QFuT5HNfQYGF/CucSqRNEu 2Q1hlaM5o5k8Yxay7cBud4a3orp9PrcvsJ9LSxkHOUGwHqcXG0NBC04IzZ1vPkLIbKFqG3 lHJFfmPRnEup0XpAzNfEf9wzvDvCcVYRtq7czYyHkOgf0QZ5fbh2edG96om6JA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=vNsZk1PW; 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=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711653755; a=rsa-sha256; cv=none; b=Ra2S30qlLZ3J1YIju3ys3CJilejVOITfnY9YX7iyg4ovNJmUX3r5Aun0svPYzvbL4HqItJ aD/otmXpa+99zMTVydsi1jKIkNePTbJJYqrdof07I3pck1mBsCcJ+amuPfwM7H9jMdPg58 BfBeOBbY0WInqPld7krNKEFJhktvIXsl+7rpuX4DSMv1/9Jq22hv4BSvPdG68GE4cCjNqq U5z+Yp5HfLgiumZYNcHlKhGxUYS5lpix1ov5oCGgQKfzmM4BIuv3nutmKZBL1ymCJ/zpr4 RTAJLmMdXqbXdC0oZRNxs6fi4vadREOH+S//rPVUzfgXLnNOzdZVp2Jh5HEj+Q== 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 071DC5AA0E for ; Thu, 28 Mar 2024 20:22:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpvK8-0007mD-0G; Thu, 28 Mar 2024 15:22:04 -0400 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 1rpvK6-0007lY-4j for guix-patches@gnu.org; Thu, 28 Mar 2024 15:22:02 -0400 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 1rpvK5-0000x0-Sz for guix-patches@gnu.org; Thu, 28 Mar 2024 15:22:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpvK6-00082r-N6 for guix-patches@gnu.org; Thu, 28 Mar 2024 15:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#68296] [PATCH v4 2/2] gnu: Add klee. Resent-From: soeren@soeren-tempel.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Mar 2024 19:22: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 Cc: julien@lepiller.eu Received: via spool by 68296-submit@debbugs.gnu.org id=B68296.171165366630786 (code B ref 68296); Thu, 28 Mar 2024 19:22:02 +0000 Received: (at 68296) by debbugs.gnu.org; 28 Mar 2024 19:21:06 +0000 Received: from localhost ([127.0.0.1]:41178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpvJB-00080T-J4 for submit@debbugs.gnu.org; Thu, 28 Mar 2024 15:21:06 -0400 Received: from magnesium.8pit.net ([45.76.88.171]:35282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpvJ6-0007zL-Cx; Thu, 28 Mar 2024 15:21:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=opensmtpd; bh=lDJEY/6A /R/B2hU2deaRrysHaPiLkwJLkvnWLxmFJnw=; h=references:in-reply-to:date: subject:cc:to:from; d=soeren-tempel.net; b=vNsZk1PWa7pTolUgmy8wT8sQD4/ 7qj7ir5F1nOn5x8DU+2TNsLUQ8CSWjiNNxVd2IB9PxEO14WQEZTFIgPfzGE5B9LSOha+Zp ErqeX8J673tKn+3g14M3c+zEUcOjW/6zLkE0SEc799f8e3SMx4hw5uG7cQekOe42O62Uip ++l8= Received: from localhost (dynamic-2a02-3102-49da-001b-e01a-5b4b-a2ca-2e2f.310.pool.telefonica.de [2a02:3102:49da:1b:e01a:5b4b:a2ca:2e2f]) by magnesium.8pit.net (OpenSMTPD) with ESMTPSA id 66014ca0 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:YES); Thu, 28 Mar 2024 20:20:58 +0100 (CET) From: soeren@soeren-tempel.net Date: Thu, 28 Mar 2024 20:20:19 +0100 Message-ID: <375eabc4693b9416e53c58fead36e0b8d4dde25d.1711653619.git.soeren@soeren-tempel.net> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: 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-Queue-Id: 071DC5AA0E X-Spam-Score: -4.25 X-Migadu-Spam-Score: -4.25 X-Migadu-Scanner: mx11.migadu.com X-TUID: g+60VsR6q3YC From: Sören Tempel * gnu/packages/check.scm (klee): New variable. Signed-off-by: Sören Tempel --- Change since v3: Update KLEE website. gnu/packages/check.scm | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 9beba88788..f936bb12c1 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -76,6 +76,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) @@ -85,6 +86,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) @@ -94,6 +96,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) @@ -3767,3 +3770,55 @@ (define-public klee-uclibc with the @code{klee} package.") (home-page "https://klee-se.org/") (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" + ;; Default build type (RelWithDebInfo) causes an internal error + ;; in clang while compiling KLEE, hence use a different build type. + #:build-type "Release" + #: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-se.org/") + (license (list license:expat license:bsd-4))))