all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* guix package path
       [not found] <87wn6nzx2g.fsf.ref@yahoo.com.br>
@ 2022-12-19  7:12 ` Antonio Carlos Padoan Junior
  2022-12-19 10:47   ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Antonio Carlos Padoan Junior @ 2022-12-19  7:12 UTC (permalink / raw)
  To: guix-devel

Hi,

I need help to understand why my GUIX_PACKAGE_PATH env variable is not
working as expected.


AFAIU, the variable is correctly set (to my local package channel):

------------
~$ guix describe
Generation 75   Dec 18 2022 20:53:08    (current)
  nonguix e95e2b5
    repository URL: https://gitlab.com/nonguix/nonguix
    branch: master
    commit: e95e2b573cbc4b96bdca2c11540e90d23e6428fc
  guix 0ce1f82
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 0ce1f82e5aaac951b21d579eb46bf75cfe6713c0

GUIX_PACKAGE_PATH="/home/antonio/git/my-guix/"
------------

This channel is also available here
https://gitlab.com/acpadoanjr/my-guix.git/
But I want to use it from my local machine while I'm developing.

Using the GUIX_PACKAGE_PATH, I have a local package (sbcl-lispiec) that seems
correctly loaded:

------------
~$ guix search sbcl-lispiec
name: sbcl-lispiec
version: 1.0.2
outputs:
+ out: everything
systems: x86_64-linux i686-linux
dependencies: libiec61850@v1.5.0 sbcl-alexandria@1.4 sbcl-bordeaux-threads@0.8.8 sbcl-cffi-c-ref@1.0-0.8123cbb sbcl-cffi@0.24.1 sbcl-cl-csv@1.0.6-2.68ecb5d sbcl-cl-ppcre@2.1.1 sbcl-cl-utilities@0.0.0-1.dce2d2f
+ sbcl-croatoan@0.0.1-5.5d0949d sbcl-deeds@1.1.1-1.f5df54e sbcl-iterate@1.5.3 sbcl-slynk@1.0.43-6.4513c38
location: /home/antonio/git/my-guix/my-packages/extra.scm:217:4
homepage: https://gitlab.com/acpadoanjr/lispiec.git
license: GPL 3+
synopsis: IEC-61850 common-lisp library.  
description: IEC-61850 common-lisp library for simulation based on cffi and libiec61850.
relevance: 20
------------

But I cannot build it or install it:

------------
~$ guix build sbcl-lispiec
guix build: error: sbcl-lispiec: unknown package
------------

Why? What am I missing?

Best regards,
-- 
Antonio Carlos PADOAN JUNIOR
GPG fingerprint:
243F 237F 2DD3 4DCA 4EA3  1341 2481 90F9 B421 A6C9


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guix package path
  2022-12-19  7:12 ` guix package path Antonio Carlos Padoan Junior
@ 2022-12-19 10:47   ` zimoun
  2022-12-19 12:06     ` Antonio Carlos Padoan Junior
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2022-12-19 10:47 UTC (permalink / raw)
  To: Antonio Carlos Padoan Junior, guix-devel

Hi,

On Mon, 19 Dec 2022 at 08:12, Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> wrote:

> This channel is also available here
> https://gitlab.com/acpadoanjr/my-guix.git/
> But I want to use it from my local machine while I'm developing.
>
> Using the GUIX_PACKAGE_PATH, I have a local package (sbcl-lispiec) that seems
> correctly loaded:
>
> ------------
> ~$ guix search sbcl-lispiec

[...]

> location: /home/antonio/git/my-guix/my-packages/extra.scm:217:4

[...]

> ------------
>
> But I cannot build it or install it:
>
> ------------
> ~$ guix build sbcl-lispiec
> guix build: error: sbcl-lispiec: unknown package
> ------------

This package sbcl-lispiec is indeed not in:

    https://gitlab.com/acpadoanjr/my-guix.git/

and there no line 217 inside the file:

https://gitlab.com/acpadoanjr/my-guix/-/blob/main/my-packages/extra.scm

Therefore, I guess something is twisted somewhere.

Could you try:

    guix show -L /home/antonio/git/my-guix sbcl-lispiec
    guix build -L /home/antonio/git/my-guix sbcl-lispiec


Cheers,
simon


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guix package path
  2022-12-19 10:47   ` zimoun
@ 2022-12-19 12:06     ` Antonio Carlos Padoan Junior
  2022-12-19 14:35       ` zimoun
  2022-12-20 21:38       ` Antonio Carlos Padoan Junior
  0 siblings, 2 replies; 7+ messages in thread
From: Antonio Carlos Padoan Junior @ 2022-12-19 12:06 UTC (permalink / raw)
  To: zimoun; +Cc: guix-devel

Hi,

thanks a lot for your help!

zimoun <zimon.toutoune@gmail.com> writes:

>
> This package sbcl-lispiec is indeed not in:
>
>     https://gitlab.com/acpadoanjr/my-guix.git/
>
> and there no line 217 inside the file:
>
> https://gitlab.com/acpadoanjr/my-guix/-/blob/main/my-packages/extra.scm
>
> Therefore, I guess something is twisted somewhere.

Sorry, I forgot to mention that the channel is not on main branch, but
on master branch.

>
> Could you try:
>
>     guix show -L /home/antonio/git/my-guix sbcl-lispiec
>     guix build -L /home/antonio/git/my-guix sbcl-lispiec
>
>
> Cheers,
> simon


I got bad returns:

~$ guix show -L /home/antonio/git/my-guix sbcl-lispiec
guix show: error: sbcl-lispiec: package not found

~$ guix build -L /home/antonio/git/my-guix sbcl-lispiec
guix build: error: sbcl-lispiec: unknown package


while guix search is still working:

~$ guix search sbcl-lispiec
name: sbcl-lispiec
version: 1.0.2
outputs:
+ out: everything
systems: x86_64-linux i686-linux
dependencies: libiec61850@v1.5.0 sbcl-alexandria@1.4 sbcl-bordeaux-threads@0.8.8 sbcl-cffi-c-ref@1.0-0.8123cbb sbcl-cffi@0.24.1 sbcl-cl-csv@1.0.6-2.68ecb5d sbcl-cl-ppcre@2.1.1 sbcl-cl-utilities@0.0.0-1.dce2d2f
+ sbcl-croatoan@0.0.1-5.5d0949d sbcl-deeds@1.1.1-1.f5df54e sbcl-iterate@1.5.3 sbcl-slynk@1.0.43-6.4513c38
location: my-packages/extra.scm:217:4
homepage: https://gitlab.com/acpadoanjr/lispiec.git
license: GPL 3+
synopsis: IEC-61850 common-lisp library.  
description: IEC-61850 common-lisp library for simulation based on cffi and libiec61850.
relevance: 20

Best regards,
-- 
Antonio Carlos PADOAN JUNIOR
GPG fingerprint:
243F 237F 2DD3 4DCA 4EA3  1341 2481 90F9 B421 A6C9


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guix package path
  2022-12-19 12:06     ` Antonio Carlos Padoan Junior
@ 2022-12-19 14:35       ` zimoun
  2022-12-20 21:38       ` Antonio Carlos Padoan Junior
  1 sibling, 0 replies; 7+ messages in thread
From: zimoun @ 2022-12-19 14:35 UTC (permalink / raw)
  To: Antonio Carlos Padoan Junior; +Cc: guix-devel

Hi,

On Mon, 19 Dec 2022 at 13:06, Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> wrote:

> ~$ guix show -L /home/antonio/git/my-guix sbcl-lispiec
> guix show: error: sbcl-lispiec: package not found
>
> ~$ guix build -L /home/antonio/git/my-guix sbcl-lispiec
> guix build: error: sbcl-lispiec: unknown package

The issue is this snippet:

--8<---------------cut here---------------start------------->8---
(define-public gtklp
  (let ((toolchain (specification->package "clang-toolchain@10")))
    (package-with-c-toolchain gtklp-bad-tool `(("toolchain" ,toolchain)))))
--8<---------------cut here---------------end--------------->8---

and to be precise, it seems ’specification->package’.  If it is removed,
and for example, adding #:use-module (gnu packages llvm) and

--8<---------------cut here---------------start------------->8---
(define-public gtklp
  (let ((toolchain clang-toolchain-10))
    (package
      (inherit
       (package-with-c-toolchain gtklp-bad-tool `(("toolchain" ,toolchain))))
      (name "gtklp-with-clang"))))
--8<---------------cut here---------------end--------------->8---

Then all seems to work.  Therefore, the same should fix
GUIX_PACKAGE_PATH.

Well, I do not know why it does not work as expected.  Maybe an issue
with Guile modules and compilation.


Back to your original issue.  Using
26f397ee26c2da6961a2ef893270ea03986ee55e from master and the channels
file:

--8<---------------cut here---------------start------------->8---
$ cat channels.scm
(list (channel
        (name 'guix)
        (url "https://git.savannah.gnu.org/git/guix.git")
        (branch "master")
        (commit
          "c8316c1e47ce2ace5474cbcda03555cf915b4fce"))
      (channel
       (name 'mine)
       (url "file:///tmp/my-guix")
       (branch "master")))

$ guix time-machine -C /tmp/channels.scm -- build sbcl-lispiec
/gnu/store/giwpdx5kcwfry3bx2yc90084nkmx7283-sbcl-lispiec-1.0.2
--8<---------------cut here---------------end--------------->8---

And note that,

--8<---------------cut here---------------start------------->8---
$ guix repl -q -L /tmp/my-guix
GNU Guile 3.0.8
Copyright (C) 1995-2021 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guix-user)> ,use(guix)
scheme@(guix-user)> ,use(my-packages extra)
scheme@(guix-user)> ,build sbcl-lispiec
$1 = "/gnu/store/giwpdx5kcwfry3bx2yc90084nkmx7283-sbcl-lispiec-1.0.2"
scheme@(guix-user)>
--8<---------------cut here---------------end--------------->8---


Cheers,
simon


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guix package path
  2022-12-19 12:06     ` Antonio Carlos Padoan Junior
  2022-12-19 14:35       ` zimoun
@ 2022-12-20 21:38       ` Antonio Carlos Padoan Junior
  2022-12-21 22:42         ` Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: Antonio Carlos Padoan Junior @ 2022-12-20 21:38 UTC (permalink / raw)
  To: zimoun; +Cc: guix-devel

Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> writes:

Hi,

I would like to give some feedback concerning this issue I faced.
I found an offending package definition in my channel (but the issue is only
present when using -L argument):

(define-public gtklp
  (let ((toolchain (specification->package "clang-toolchain@10")))
    (package-with-c-toolchain gtklp-bad-tool `(("toolchain" ,toolchain)))))

For instance, when using "guix build -L ... gtklp", the alternative toolchain did not
get called and compilation fails because of that (toolchain must be clang-toolchain@10).

There is something missing in the environment when channel
is called from a local directory (using -L argument). I think that perhaps
"specification->package" does not work correctly, but this pure
speculation.

From this point in the channel's definition, all other
packages are not recognized when using "guix build -L ...".  
I moved the gtklp package to the end of the file and all other packages
compiled (sbcl-lispiec as well).

I'm not sure this is a bug. But well, I think important to mention
anyway.

Best regards,
-- 
Antonio Carlos PADOAN JUNIOR
GPG fingerprint:
243F 237F 2DD3 4DCA 4EA3  1341 2481 90F9 B421 A6C9


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guix package path
  2022-12-20 21:38       ` Antonio Carlos Padoan Junior
@ 2022-12-21 22:42         ` Ludovic Courtès
  2022-12-30 14:57           ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2022-12-21 22:42 UTC (permalink / raw)
  To: Antonio Carlos Padoan Junior; +Cc: zimoun, guix-devel

Hi,

Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> skribis:

> I would like to give some feedback concerning this issue I faced.
> I found an offending package definition in my channel (but the issue is only
> present when using -L argument):
>
> (define-public gtklp
>   (let ((toolchain (specification->package "clang-toolchain@10")))
>     (package-with-c-toolchain gtklp-bad-tool `(("toolchain" ,toolchain)))))
>
> For instance, when using "guix build -L ... gtklp", the alternative toolchain did not
> get called and compilation fails because of that (toolchain must be clang-toolchain@10).

We don’t have enough info to be sure, but could it be that there are two
‘gtklp’ packages in your package collection, for instance because
‘gtklp-bad-tool’ is also public?  ‘specification->package’ prints a
warning if it’s ambiguous.

HTH,
Ludo’.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guix package path
  2022-12-21 22:42         ` Ludovic Courtès
@ 2022-12-30 14:57           ` zimoun
  0 siblings, 0 replies; 7+ messages in thread
From: zimoun @ 2022-12-30 14:57 UTC (permalink / raw)
  To: Ludovic Courtès, Antonio Carlos Padoan Junior; +Cc: guix-devel

Hi Ludo,

On Wed, 21 Dec 2022 at 23:42, Ludovic Courtès <ludo@gnu.org> wrote:

> We don’t have enough info to be sure, but could it be that there are two
> ‘gtklp’ packages in your package collection, for instance because
> ‘gtklp-bad-tool’ is also public?  ‘specification->package’ prints a
> warning if it’s ambiguous.

I do not think the issue is about your assumption.  I guess it is about
Guile modules and compilation.

The package gtklp-bad-tool is defined by:

--8<---------------cut here---------------start------------->8---
(define-public gtklp-bad-tool
  (package
    (name "gtklp")
    (version "1.3.4")
[...]
--8<---------------cut here---------------end--------------->8---

Then gtklp is defined by:

--8<---------------cut here---------------start------------->8---
(define-public gtklp
  (let ((toolchain (specification->package "clang-toolchain@10")))
    (package-with-c-toolchain gtklp-bad-tool `(("toolchain" ,toolchain)))))
--8<---------------cut here---------------end--------------->8---

Here, the issue is ’(specification->package "clang-toolchain@10")’.  For
instance, you get:

    $ guix show -L /tmp/my-guix sbcl-lispiec
    guix show: error: sbcl-lispiec: package not found

where nothing is ambiguous; the package ’sbcl-lispiec’ is unrelated to
both gtklp-bad-tool or gtklp.

If you replace [1] ’specification->package’ by the symbol
clang-toolchain-10, then it just works.

Last, if you use the broken channel with ’specification->package’ but
instead of --load-path, you run “time-machine” or “pull”, then the issue
is gone.


https://gitlab.com/acpadoanjr/my-guix/-/blob/0e540b6fce0409330cb1ca3453d81f18c8e60163/my-packages/extra.scm#L71-115
https://gitlab.com/acpadoanjr/my-guix/-/blob/0e540b6fce0409330cb1ca3453d81f18c8e60163/my-packages/extra.scm#L313-315
1: <https://yhetil.org/guix/87cz8fo412.fsf@gmail.com>


Cheers,
simon


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-30 14:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87wn6nzx2g.fsf.ref@yahoo.com.br>
2022-12-19  7:12 ` guix package path Antonio Carlos Padoan Junior
2022-12-19 10:47   ` zimoun
2022-12-19 12:06     ` Antonio Carlos Padoan Junior
2022-12-19 14:35       ` zimoun
2022-12-20 21:38       ` Antonio Carlos Padoan Junior
2022-12-21 22:42         ` Ludovic Courtès
2022-12-30 14:57           ` zimoun

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.