From patchwork Fri Aug 5 07:58:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 41296 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 73A9927BBEB; Fri, 5 Aug 2022 09:01:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0588B27BBEA for ; Fri, 5 Aug 2022 09:01:18 +0100 (BST) Received: from localhost ([::1]:51000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJsGj-0005LU-0b for patchwork@mira.cbaines.net; Fri, 05 Aug 2022 04:01:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJsFW-0005Je-Rd for guix-patches@gnu.org; Fri, 05 Aug 2022 04:00:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJsFW-00027E-Ir for guix-patches@gnu.org; Fri, 05 Aug 2022 04:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJsFW-0005F9-Fh for guix-patches@gnu.org; Fri, 05 Aug 2022 04:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56505] [PATCHES] Mingw configuration for openssl Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 Aug 2022 08:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56505 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 56505-done@debbugs.gnu.org Received: via spool by 56505-done@debbugs.gnu.org id=D56505.165968636120077 (code D ref 56505); Fri, 05 Aug 2022 08:00:02 +0000 Received: (at 56505-done) by debbugs.gnu.org; 5 Aug 2022 07:59:21 +0000 Received: from localhost ([127.0.0.1]:56050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJsEq-0005Dk-Q8 for submit@debbugs.gnu.org; Fri, 05 Aug 2022 03:59:21 -0400 Received: from planete-kraus.eu ([89.234.140.182]:34600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJsEm-0005DZ-6y for 56505-done@debbugs.gnu.org; Fri, 05 Aug 2022 03:59:18 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 75258a38; Fri, 5 Aug 2022 07:59:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; s=dkim; bh=O7pJqpkqJZVMeGT4B7aPHQHAm eg=; b=K5sjS3zPCcQqTj8XNStlDavv9Qlx0V/FFH6LmfupHp7z9Fme1fEmSlUrs 7U++k2M7bQp94p+J3a3zXN5ndH6YGHbJ/0fWezB7Yn3p/LrQlwzd5LdI1gereD0F 5qL7FBJrMdmt5JXZTgrxRcwmpsWLoEOr0ALJ9AvM/ORH3vNyaQ= Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 6bb800b1 (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Fri, 5 Aug 2022 07:59:10 +0000 (UTC) Message-ID: <07478ef69ed48a60979eb06923fd4ecafddcce42.camel@planete-kraus.eu> Date: Fri, 05 Aug 2022 09:58:56 +0200 In-Reply-To: <87edxvk66j.fsf_-_@gnu.org> References: <660bab87fb7ccee6177be413b72bea7e40463354.camel@planete-kraus.eu> <70b76f171502fc7122dbfd120093660616632980.camel@planete-kraus.eu> <87edxvk66j.fsf_-_@gnu.org> User-Agent: Evolution 3.42.1 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus X-getmail-retrieved-from-mailbox: Patches Hi, Le vendredi 05 août 2022 à 00:14 +0200, Ludovic Courtès a écrit : > ‘guix build openssl --target=x86_64-w64-mingw32’ works and the funny > part is that .dll files end up in bin/, but I think that’s intended > on > Windows? That’s right. Windows does not have shared objects, and DLLs are not. You cannot use the compiler to link to a DLL as far as I understand, so you wouldn’t put them in lib. What you have in lib are the so-called "import libraries" (.dll.a). These are static libraries that pretend to provide the functionality, but in fact open the DLL at run-time to fetch the library implementation from the DLL. So DLLs are kind of resources. Anyway, you see that in lib/ you have all the .dll.a files… Oops… I may have forgotten to check this… This is not a huge problem, because all outputs would be available when building a dependent package, but it’s still not right I think. Now, the .dll.a files are smaller than the static libraries, but not that small. I don’t know why exactly. Should I open a new issue with this patch, or is it somehow possible to continue the discussion here? Best regards, Vivien From 1ee8daf446ca874ff4e5daa65d6f4034df51838e Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Fri, 5 Aug 2022 09:52:21 +0200 Subject: [PATCH] gnu: openssl: Keep .dll.a files in main output. * gnu/packages/tls.scm (openssl) [phase move-static-libraries]: Do not move .dll.a files to the static output when targetting mingw. --- gnu/packages/tls.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 1e527ecce2..4ee75ace3d 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -507,7 +507,13 @@ (define-public openssl (for-each (lambda (file) (install-file file slib) (delete-file file)) - (find-files lib "\\.a$"))))) + (find-files + lib + #$(if (target-mingw?) + '(lambda (filename _) + (and (string-suffix? ".a" filename) + (not (string-suffix? ".dll.a" filename)))) + "\\.a$")))))) (add-after 'install 'move-extra-documentation (lambda _ ;; Move man pages and full HTML documentation to "doc". base-commit: cc4c02e346a71ccef897e2d9f04fa2df2529a269 -- 2.37.1