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 ms13.migadu.com with LMTPS id uGiwKY3dcmdgbgAA62LTzQ:P1 (envelope-from ) for ; Mon, 30 Dec 2024 17:51:09 +0000 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 uGiwKY3dcmdgbgAA62LTzQ (envelope-from ) for ; Mon, 30 Dec 2024 18:51:09 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=posteo.de header.s=2017 header.b=hgnjIwrq; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735581069; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=KaKVwvJEJgTuKrPxEiW9W9uaT8b3b8JPKhq2KHKVN24=; b=sU0NH5EGW56FRNaYVGyY/PPgT6l9KsgH8JfqBD3foeqrq5J6Vi/ClgVYtx1Qrcz5AuKJk3 1kQMJbwZ4vbu5GxTXP+1yLz8YsTVAZd8jpoK8UK6aswkNmTFvDoQV8F4sjZGBdAslNsqo3 /AmuA0lgDVO//6MicmyYnSrSS2glpC/Cx634R4AVGXACCq2T8EiAf9auuGXWr6kuvCJI8U YI0/TbObnoyCyKsBaWs2WPl+lHHrHyfQ1oUYAXbvLlaA4FOThodGX0iLpHO9F+cku8s6K3 3zcafYr2p7N0JWpNKKZNXGZKEa5RK+H3yDEjGqv/GF/eCiv2dXJ20xDCuQ+Lcg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=posteo.de header.s=2017 header.b=hgnjIwrq; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735581069; a=rsa-sha256; cv=none; b=VaXrZUPp7k6nmD5yA+nK7ga3nCqY4WK1/BVsL0sRSRpC4rE6F90eit62dBXMLaXuWQMz2x VPJ1iXq5tcgeY4uGzdUMzJM8Pd2rnXMIB8DDNcy1dYcxngbyym2z1FemmIVupSsvI1Oac5 gjalrJzr/6v4aBTxAMcC5QrJ+DwYi/TIvQGfNz4ggp+KtVLmLNqfLDJDl9pO+CmXzGpEBV 5tnPnx8hQgW52NhMooq68TgD26RfNvmCxHXpvotGkpO8BdnZZuVxk54rcgEd0/y60cN9R8 c8fBjZGYKAFwDzLZSUBWo2RYp2YtZkeQM/nlX1PAVo45T1mWTI2jlAFOSMM9PA== 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 7EE279AB0B for ; Mon, 30 Dec 2024 18:51:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSJum-0003PB-PE; Mon, 30 Dec 2024 12:50:52 -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 1tSJuk-0003Ow-5L for help-guix@gnu.org; Mon, 30 Dec 2024 12:50:50 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSJuh-0008Dv-8m for help-guix@gnu.org; Mon, 30 Dec 2024 12:50:49 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7962E240101 for ; Mon, 30 Dec 2024 18:50:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1735581037; bh=7NazzkqUAtQJ/b6PzdnhPkg/xqhwoqlduIesTyMbCxY=; h=Content-Type:Message-ID:Date:MIME-Version:From:To:Subject:From; b=hgnjIwrqbhc4UnvXbrozp96aifhi+BBC5b3vf7yhg4BsLPi5LiwnH23gfRZaVwrrn jtLjyOitK+oJOw1SjEft//+RL35QKTudAPndfmZjhjwglJKTS8tYSUEEVIdDcRXj9y Sz5T+VklypkSpkZ8xJj8p6FSzB3ziYjVmR/FExSgCjp6BBCRve4gf2Xkt9MrP7dz7D YCskKbsiIDG+tmDjrcI+oqOSyo9uvKbXsazPLW/RLyQqwM0fhJjnXj4BBX6XySWuQE e1+ejAczCEpBAFDBqSaLqVoJKnoSuqmOjBQolprkXtS9kwrrdrqRgTp+MBGw41B37W HrjtBD171sC9Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YMNtN6RxWz9rxL for ; Mon, 30 Dec 2024 18:50:36 +0100 (CET) Message-ID: <62213a9d-3bab-4f0f-bd7b-9a98b880ae0d@posteo.de> Date: Mon, 30 Dec 2024 17:50:36 +0000 MIME-Version: 1.0 From: Zelphir Kaltstahl Content-Language: en-US To: help-guix Subject: OCaml package `ocaml-zarith` not working / Guix installed `ocamlc` not picking up installed libraries Received-SPF: pass client-ip=185.67.36.66; envelope-from=zelphirkaltstahl@posteo.de; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 2.60 X-Spam-Score: 2.60 X-Migadu-Queue-Id: 7EE279AB0B X-Migadu-Scanner: mx10.migadu.com X-TUID: L4+trlbjHQdA Hello Guix users, I am facing a problem trying to use Guix to install Ocaml packages. I was implementing a simple recursive factorial function, as part of learning the language, and tested what would happen, if I calculated factorial of 100 ... Result: 0. "Ah!" I thought, "all I need to do is get that Zarith package I have been reading about before, and import that in my code!". So I added it to my manifest.scm file, which I use for a `guix shell`, and expected the Ocaml compiler to naturally pick up packages installed via guix, since the Ocaml compiler ocamlc is also installed using guix. However, it seems this is dysfunctional currently and ocamlc does not realize that the library is in fact installed. I am not sure where it is looking for libraries. Here is how to reproduce: ~~~~guix-env/channels.scm~~~~ (list (channel (name 'guix) (url"https://git.savannah.gnu.org/git/guix.git") (branch "master") (commit "4473f8ae902c2192cab6919363a9101ce9861e45") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))) ~~~~ ~~~~guix-env/manifest.scm~~~~ (specifications->manifest '("ocaml" "ocaml-utop" "dune" ;; "opam" ; using guix to install packages, should not need opam "bash" "ocaml-zarith")) ~~~~ ~~~~main.ml~~~~ open Z let factorial n = let rec iter n = if n < (of_int 2) then of_int 1 else mul n (iter (sub n (of_int 1))) in iter (of_int n) let _ = 5 |> factorial |> to_string |> print_endline let _ = 100 |> factorial |> to_string |> print_endline ~~~~ ~~~~command~~~~ guix time-machine --channels=guix-env/channels.scm -- shell --check --manifest=guix-env/manifest.scm -- bash -c 'ocamlc -c main.ml -o main.byte' guix shell: checking the environment variables visible from shell '/bin/bash'... guix shell: All is good! The shell gets correct environment variables. File "main.ml", line 1, characters 5-6: 1 | open Z ^ Error: Unbound module Z ~~~~ If ocamlc does not check locations, where guix installs ocaml libraries, then it is completely useless to install Ocaml libraries using Guix. Of course a programming language without any libraries would also be unpleasant to use for many things. How can I make ocamlc realize, that the library is in fact installed, that it just needs to look in the right places? Is this something that can be properly fixed in some dynamically created configuration of ocamlc, so that it automatically will look in the correct directories, depending on which guix shell or which guix profile it is installed in? Is this perhaps even a defect of ocamlc itself, having hardcoded locations where it looks for libraries? Do I have to tell ocamlc somehow where it is supposed to be looking? (In that case I guess it cannot be used with `guix shell`, as the directories are not predictable, and I would have to use a Guix profile.) Best regards, Zelphir -- repositories:https://notabug.org/ZelphirKaltstahl,https://codeberg.org/ZelphirKaltstahl