Hi, I am trying to package an application, my guix.scm is below. The build starts OK but fails with the error: ice-9/boot-9.scm:1669:16: In procedure raise-exception: no code for module (artanis utils) make: *** [Makefile:1878: limsn/app/controllers/target.go] Error 1 command "make" "-j" "4" failed with status 2 artanis/utils.scm is a file within artanis. I use-module (artanis utils) to no effect. Within artanis, utils is defined as a module: (define-module (artanis artanis) #:use-module (artanis utils) #:use-module (artanis config) #:use-module (artanis env)..... I tried ("artanis:utils" ,artanis "utils") but that doesn't work. How do I specify artanis/utils.scm as an input module? Do I need to package artanis/utils.scm separately? Thanks Mortimer ===guix.scm=================== (use-modules (guix packages) ((guix licenses) #:prefix license:) (guix download) (guix build-system gnu) (gnu packages) (gnu packages autotools) (gnu packages guile) (gnu packages guile-xyz) (gnu packages pkg-config) (gnu packages texinfo) (artanis artanis) (artanis utils)(artanis irregex)) (package (name "limsn") (version "0.1") (source "./limsn-0.1.tar.gz") (build-system gnu-build-system) (arguments `()) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("pkg-config" ,pkg-config) ("texinfo" ,texinfo) ("artanis" ,artanis) )) (inputs `(("guile" ,guile-3.0) )) (propagated-inputs `()) (synopsis "") (description "") (home-page "www.acme.com") (license license:gpl3+))
Hello, I think this may be of help: https://guix.gnu.org/cookbook/en/html_node/GUIX_005fPACKAGE_005fPATH.html The error seems to be that it does not find the code, that your use module is trying to load. -- Vincent Legoll
On Sat, Apr 24, 2021 at 12:08 AM Vincent Legoll <vincent.legoll@gmail.com> wrote: > I think this may be of help: > > https://guix.gnu.org/cookbook/en/html_node/GUIX_005fPACKAGE_005fPATH.html And the first thing this page tells you, is to go have a look at the new way of doing this kind of things: channels. https://guix.gnu.org/manual/en/html_node/Channels.html#Channels So I think I also have to read about the new world order... :-) -- Vincent Legoll
Thanks but I don't see how channels will help me. Artanis is in the
public Guix repository. If I query my local store for the missing
module:
mbc@HP8300:~/temp/limsn$ find /gnu/store -wholename '*artanis/utils*'
/gnu/store/2slcmvlhyr0n5chrr6nyz0df886xb31s-artanis-0.3.1/share/guile/site/2.2/artanis/utils.scm
/gnu/store/2slcmvlhyr0n5chrr6nyz0df886xb31s-artanis-0.3.1/lib/guile/2.2/site-ccache/artanis/utils.go
/gnu/store/np3v3bifspgqslc7xl2rz2sg08q2wvzq-artanis-0.4.1/share/guile/site/2.2/artanis/utils.scm
/gnu/store/np3v3bifspgqslc7xl2rz2sg08q2wvzq-artanis-0.4.1/lib/guile/2.2/site-ccache/artanis/utils.go
/gnu/store/0zq9d6gjb6r4d98lgfkh3ccv57dbacq4-artanis-0.4.1/share/guile/site/2.2/artanis/utils.scm
/gnu/store/0zq9d6gjb6r4d98lgfkh3ccv57dbacq4-artanis-0.4.1/lib/guile/2.2/site-ccache/artanis/utils.go
etc.
Likewise I can find artanis/artanis.go and artanis/irregex.go so they
are in the local store.
If I comment out the artanis/artanis native-input:
;;("artanis" ,artanis)
in my guix.scm I get the error:
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
no code for module (artanis artanis)
make: *** [Makefile:1878: limsn/app/controllers/login.go] Error 1
make: *** Waiting for unfinished jobs....
So a native-input of ("artanis" ,artanis) provides artanis/artanis.go
How do I specify an input for artanis/utils.go that is within the
artanis package but not defined as an external module? But is in my
store as artanis/utils.go?
The closest I find in the manual would be something like:
("artanis:utils" ,artanis "utils")
Which results in the error:
guix package: error: reference to invalid output 'utils' of
derivation
'/gnu/store/v21j7g5xy6r48n94dbj2izs69cb48y5p-artanis-0.4.1.drv'
Note that I (use-modules ....(artanis irregex)(artanis
artanis)(artanis utils)) but that does not error?
Also, at the beginning of the packaging log file where environment
variables are displayed I see:
environment variable `GUILE_LOAD_PATH' unset
environment variable `GUILE_LOAD_COMPILED_PATH' unset
environment variable `BASH_LOADABLES_PATH' unset
Is this OK? I am in a protected GUIX environment that should not be
dependent on system variables, correct?
Thanks
Mortimer
Quoting Vincent Legoll <vincent.legoll@gmail.com>:
> On Sat, Apr 24, 2021 at 12:08 AM Vincent Legoll
> <vincent.legoll@gmail.com> wrote:
>> I think this may be of help:
>>
>> https://guix.gnu.org/cookbook/en/html_node/GUIX_005fPACKAGE_005fPATH.html
>
> And the first thing this page tells you, is to go have a look at the
> new way of doing
> this kind of things: channels.
>
> https://guix.gnu.org/manual/en/html_node/Channels.html#Channels
>
> So I think I also have to read about the new world order... :-)
>
> --
> Vincent Legoll
Hello,
On Sat, Apr 24, 2021 at 2:56 PM <mbcladwell@stihie.net> wrote:
> Thanks but I don't see how channels will help me. Artanis is in the
> public Guix repository. If I query my local store for the missing
> module:
Sorry, I misunderstood, and thought that your module was outside.
--
Vincent Legoll
[-- Attachment #1: Type: text/plain, Size: 2440 bytes --] mbcladwell@stihie.net schreef op vr 23-04-2021 om 14:57 [-0500]: > Hi, > I am trying to package an application, my guix.scm is below. The > build starts OK but fails with the error: > > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > no code for module (artanis utils) > make: *** [Makefile:1878: limsn/app/controllers/target.go] Error 1 > command "make" "-j" "4" failed with status 2 When I do "guix edit artanis", I see the "artanis" package currently uses guile-2.2. You should: (a) change artanis to use guile-3.0 instead, or (b) change your package to use guile-2.2 instead of guile-3.0. > artanis/utils.scm is a file within artanis. I use-module (artanis > utils) to no effect. Within artanis, utils is defined as a module: > > (define-module (artanis artanis) > #:use-module (artanis utils) > #:use-module (artanis config) > #:use-module (artanis env)..... > > I tried ("artanis:utils" ,artanis "utils") but that doesn't work. > How do I specify artanis/utils.scm as an input module? Just use ("artanis" ,artanis). The ("package:x" ,x "output") construction is only needed for very few package, that split the documentation or binaries out in a separate output, for space reasons. > Do I need to package artanis/utils.scm separately? No, all artanis stuff is packaged in the artanis package. (Maybe the documentation is separate, I dunno, but you're not looking for documentation.) > >[...] > (native-inputs > `(("autoconf" ,autoconf) > ("automake" ,automake) > ("pkg-config" ,pkg-config) > ("texinfo" ,texinfo) > ("artanis" ,artanis) artanis must most likely be placed in 'propagated-inputs', and not 'inputs'. It's a bit complicated to explain why though, particularily if you're from a ‘classical distro’ (e.g. Debian). python and guile libraries usually need to go into 'propagated-inputs' instead of 'inputs'. It will build just fine if you put it in 'inputs' instead, but at run-time in a pure profile, your package won't find artanis, as your package most likely refers to artanis by module name (artanis utils) instead of by absolute file name "/gnu/store/...-artanis-.../SOME-DIR-WITH-GUILE-STUFF". Maybe when cross-compiling, it should _also_ be placed in native-inputs, not sure though. (If you don't know what cross-compiling is, you're most likely not doing it.) Greetings, Maxime. [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 260 bytes --]
Hi, mbcladwell@stihie.net writes: > artanis/utils.scm is a file within artanis. I use-module > (artanis > utils) to no effect. Within artanis, utils is defined as a > module: There must be some confusion here: whatever modules Artanis provides has no impact on your Guix manifest. For Guix we only care about modules exporting package values. > How do I specify artanis/utils.scm as an input module? You don’t. Your problem likely stems from the fact that limsn uses Guile 3 but Artanis is built for Guile 2.2. -- Ricardo