From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 eAUuCVg5+WU5EgAA62LTzQ:P1 (envelope-from ) for ; Tue, 19 Mar 2024 08:06:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id eAUuCVg5+WU5EgAA62LTzQ (envelope-from ) for ; Tue, 19 Mar 2024 08:06:00 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=aartaka.me header.s=default header.b=ekcmEeer; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710831960; a=rsa-sha256; cv=none; b=dmh7Km/+rXGXHmdhXtwAUkAXoDK5E0mo3bI6l39hWyifQmbySVc/A4jnrO6DpqLiPYDmdB 9Kujd7hehgCdt8JpmKGJz6fYakpE8i+dBnhi5WXTOiSkxtFSLYVWWLjX/01FER4fkt7Lqk ZqZSTXMYGmqFKy280/KmnH2cweN+/IH/kU/GjdXUdHPG/pn4dxezu7ai+1ZnKpaZZZn40F RltEpeTy5sxtW6wwHsq2DjbJzMLJWNaa3X/fAttg9IPbtdloLud25A5B0pr7BCA9wE/JYE 1fLaiq0CO63fjToNWPk54C+cPOhZcuk0j+PXZ7fgARUHZN/8/OOnbYF859Qu6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=aartaka.me header.s=default header.b=ekcmEeer; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710831960; 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:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=eIQFszzN+lLdiNqOgzben+0b6OV0WJQVdw1py9f0eUA=; b=C6ZekBWu7FNUQSHi4umL6mMad0ASMkCqHfU334AgZEg4EUSUgEOFMd6XFS4DwgpOM/GGFX aqQb6BbVdzYR/UXi592zm/iAh33gRI44sc00dkWxNw0Z6dEydTydKSBlSz3Bk7j3tgwCQj ZuH5PhYbvW7h/DbHmYIqQcyF7EFrIUCbT9SVbu1S7+GaU5pnnIzH4bQN0LNMmwNR7K8o25 BmhZDv8WU2eLvlG73xp85/uQXSOGg710HG5ni1CFu2qEvsAmAnwo6HEaRK2gpRfmAC8YPr yVO+nSz8DpIKpxQXGKmmaNDIJzu+4cnGWBl06LOWiVG0UpmhTB2X+DOsyDOdzw== 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 CC3767341D for ; Tue, 19 Mar 2024 08:05:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmTCN-0006ha-Lf; Tue, 19 Mar 2024 02:43:47 -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 1rjoPc-0006fo-Cl for bug-guix@gnu.org; Mon, 11 Mar 2024 18:46:28 -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 1rjoPc-0003aA-4r for bug-guix@gnu.org; Mon, 11 Mar 2024 18:46:28 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rjoQ9-00032T-VY for bug-guix@gnu.org; Mon, 11 Mar 2024 18:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#69737: GSL cannot find CBLAS symbols Resent-From: Artyom Bologov Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 11 Mar 2024 22:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69737 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 69737@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171019720311644 (code B ref -1); Mon, 11 Mar 2024 22:47:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Mar 2024 22:46:43 +0000 Received: from localhost ([127.0.0.1]:41448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjoPq-00031i-RZ for submit@debbugs.gnu.org; Mon, 11 Mar 2024 18:46:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:52230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjoPn-00031X-23 for submit@debbugs.gnu.org; Mon, 11 Mar 2024 18:46:41 -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 1rjoPD-0006VX-44 for bug-guix@gnu.org; Mon, 11 Mar 2024 18:46:03 -0400 Received: from mta-09-4.privateemail.com ([198.54.127.118]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjoPA-00035V-DD for bug-guix@gnu.org; Mon, 11 Mar 2024 18:46:02 -0400 Received: from mta-09.privateemail.com (localhost [127.0.0.1]) by mta-09.privateemail.com (Postfix) with ESMTP id C885818000B6 for ; Mon, 11 Mar 2024 18:45:52 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aartaka.me; s=default; t=1710197152; bh=vtWPOSGGZuvtmkWg3gsIHTMBPClSVeECYNCSdJam5O4=; h=From:To:Subject:Date:From; b=ekcmEeertkkuMHvwbSxyZ1Dd+QQV+4kIqp7BGbJpMtuzo+SMPmiCgAwAJFw/cbTRc vrGhTyuNd7g3C+ITXjp6URWNTDaEnPcIu53Zxlp1/gFtd+2YR4IpDVYsvOlCtC+Xks JnGye4Y/8ODPKzWa7ec3h9swysa6Gt/yckueOF5NmoW5GXnBb36DIBtpPX/pgbOxT2 WdmGSy4Q01d0ycbbH0IwZTNgZ+hUlVeNI4TlyCz8w8Uxyer4T4oTqrURLgbcJ69mNc V9q68f8sf/jOnLdg38+y0b56zEnGKAT7LzUkNrYz/zspy0R1MWTgOVJpMHi3Uf42qx QnWkN+DXuWD+g== Received: from paranoidal (unknown [185.167.217.34]) by mta-09.privateemail.com (Postfix) with ESMTPA for ; Mon, 11 Mar 2024 18:45:51 -0400 (EDT) User-agent: mu4e 1.10.8; emacs 29.1 From: Artyom Bologov Date: Tue, 12 Mar 2024 02:06:28 +0400 Message-ID: <87edcgqtfw.fsf@aartaka.me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=198.54.127.118; envelope-from=mail@aartaka.me; helo=MTA-09-4.privateemail.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URI_NOVOWEL=0.5 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 19 Mar 2024 02:43:45 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.50 X-Spam-Score: -5.50 X-Migadu-Queue-Id: CC3767341D X-TUID: 9ERBOsKniQQ6 --=-=-= Content-Type: text/plain Hi y'all, I'm working on Guile bindings for GNU Scientific Library (GSL), and I encountered a bug: GSL cannot find CBLAS functions when invoked directly from Guile. I'm attaching a script, gslcblas.scm, ran (given that you replace the path to libgsl.so in it with a machine-specific one) with guile gslcblas.scm --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=gslcblas.scm Content-Description: Scheme file with buggy GSL behavior (use-modules (system foreign) (system foreign-library)) (define libgsl (load-foreign-library "/gnu/store/zfxs8xbh68nb8smvsdf9i6aj6hbzgix4-profile/lib/libgsl.so")) (define gsl-vector-alloc (foreign-library-function libgsl "gsl_vector_alloc" #:return-type '* #:arg-types (list size_t))) (define gsl-vector-set (foreign-library-function libgsl "gsl_vector_set" #:return-type void #:arg-types (list '* size_t double))) (define gsl-vector-get (foreign-library-function libgsl "gsl_vector_get" #:return-type double #:arg-types (list '* size_t))) (define gsl-blas-dscal (foreign-library-function libgsl "gsl_blas_dscal" #:return-type void #:arg-types (list double '*))) (let* ((n 3) (x (gsl-vector-alloc n))) (for-each (lambda (i) (gsl-vector-set x i i)) (iota n)) (gsl-blas-dscal 10 x)) --=-=-= Content-Type: text/plain It errors out with guile: symbol lookup error: [...]/libgsl.so: undefined symbol: cblas_dscal Loading libgslcblas.so into the Scheme image doesn't help, it errors out the same. That's why I'm thinking it's not a Guile Scheme problem, but a library one: GSL C code breaks with no knowledge of CBLAS. The suggested fix is to link libgsl.so against libgslcblas.so (or any other CBLAS library?), so that the functions from the latter are available in the former. that seems to be what Arch package does (https://archlinux.org/packages/extra/x86_64/gsl/), at least. Although I admit this is a strange circular behavior, it makes sense too: CBLAS is an implementation detail for BLAS support in GSL, and should be linked as such. I'm not knowledgeable enough in the ways of building GSL (or any complex C software really), so I cannot come up with a proper patch. Hopefully that's enough info for someone to act on. Acknowledgements: Huge thanks to Arun Isaac who helped me debug this problem! Thanks, -- Artyom Bologov. --=-=-=--