help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Erlang development in GNU Guix environment


From: Zelphir Kaltstahl
Subject: Erlang development in GNU Guix environment
Date: Fri, 18 Jun 2021 10:38:05 +0000

Hello Guix User!

Today I decided to start a second attempt at getting Erlang and Emacs to work in
a GNU Guix environment.

I hit an error installing the emacs-erlang package.

In the following I protocol the steps I took and the resulting error.


In my project directory I have the following files:

~~~~
.
├── guix-env
│   ├── channels.scm
│   ├── env.sh
│   ├── manifest.scm
│   └── start-emacs.sh
~~~~

The content of the files is:

channels.scm, which was created as follows using a guix pulled just a few
minutes ago:

~~~~
guix pull
guix describe --format=channels > channels.scm
~~~~

channels.scm looks as follows:

~~~~
(list (channel
        (name 'guix)
        (url "https://git.savannah.gnu.org/git/guix.git";)
        (commit
          "d4b86bac974fe133af629f5de25955339173f9ab")
        (introduction
          (make-channel-introduction
            "9edb3f66fd807b096b48283debdcddccfea34bad"
            (openpgp-fingerprint
              "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))))
~~~~

Next we have manifest.scm:

~~~~
(specifications->manifest
 '("erlang"
   "emacs"
   "emacs-org"
   "emacs-erlang"
   "emacs-ob-erlang"))
~~~~

There is org babel erlang (ob-erlang) in there, because I intend to make use of
org mode and source blocks of erlang code, if possible.

Next is env.sh, a simple script that allows me to use guix time machine from
anywhere to spawn the guix environment's shell:

~~~~
#!/usr/bin/env bash

set -Eeuxo pipefail

DIR=$(dirname "$(readlink -f "${0}")")

guix time-machine \
     --channels="${DIR}/channels.scm" -- \
     environment \
     --manifest="${DIR}/manifest.scm"
~~~~

I also have another, not yet used file there, start-emacs.sh:

~~~~
#!/usr/bin/env bash

set -Eeuxo pipefail

emacs --no-init-file --no-desktop --maximized
~~~~

With all this in place, I run the command:

~~~~
bash guix-env/env.sh
~~~~

Which will start creating the guix environment, which shall be used in the
spawned shell. However, I get an error:

~~~~
(lots of output above)

building /gnu/store/x0kjb6h125x75biz1fgwfskvwarrb789-emacs-erlang-23.2.1.drv...
/ 'install' phasebuilder for 
`/gnu/store/x0kjb6h125x75biz1fgwfskvwarrb789-emacs-erlang-23.2.1.drv' failed 
with exit code 1
build of /gnu/store/x0kjb6h125x75biz1fgwfskvwarrb789-emacs-erlang-23.2.1.drv 
failed
View build log at 
'/var/log/guix/drvs/x0/kjb6h125x75biz1fgwfskvwarrb789-emacs-erlang-23.2.1.drv.bz2'.
cannot build derivation 
`/gnu/store/q8986a2hjxv8bnvin1kq9p3mls2anggv-profile.drv': 1 dependencies 
couldn't be built
guix environment: error: build of 
`/gnu/store/q8986a2hjxv8bnvin1kq9p3mls2anggv-profile.drv' failed
~~~~

I copy the log file to my current directory and decompress it:

~~~~
cp 
/var/log/guix/drvs/x0/kjb6h125x75biz1fgwfskvwarrb789-emacs-erlang-23.2.1.drv.bz2
 .
bzip2 --decompress kjb6h125x75biz1fgwfskvwarrb789-emacs-erlang-23.2.1.drv.bz2 
~~~~

It contains as an error at the bottom of the file:

~~~~
## WARNING: phase `install' returned `#f'.  Return values other than #t
## are deprecated.  Please migrate this package so that its phase
## procedures report errors by raising an exception, and otherwise
## always return #t.
~~~~

Above that there are loooads of lines looking like the following:

~~~~
info: considering installing .............
~~~~

Where there are many things and files listed in place of the dots. The last few
of those lines are:

~~~~
info: considering installing bin/.gitignore
info: considering installing HOWTO/BENCHMARKS.md
info: considering installing HOWTO/BOOTSTRAP.md
info: considering installing HOWTO/DEPRECATE.md
info: considering installing HOWTO/DTRACE.md
info: considering installing HOWTO/INSTALL-ANDROID.md
info: considering installing HOWTO/INSTALL-CROSS.md
info: considering installing HOWTO/INSTALL-RASPBERRYPI3.md
info: considering installing HOWTO/INSTALL-WIN32-OLD.md
info: considering installing HOWTO/INSTALL-WIN32.md
info: considering installing HOWTO/INSTALL.md
info: considering installing HOWTO/MARKDOWN.md
info: considering installing HOWTO/OTP-PATCH-APPLY.md
info: considering installing HOWTO/SYSTEMTAP.md
info: considering installing HOWTO/TESTING.md
info: considering installing .github/workflows/main.yaml
info: considering installing .github/workflows/update-base.yaml
info: considering installing .github/dockerfiles/Dockerfile.32-bit
info: considering installing .github/dockerfiles/Dockerfile.64-bit
info: considering installing .github/dockerfiles/Dockerfile.cross-compile
info: considering installing .github/dockerfiles/Dockerfile.debian-base
info: considering installing .github/dockerfiles/Dockerfile.documentation
info: considering installing .github/dockerfiles/Dockerfile.ubuntu-base
phase `install' failed after 3.3 seconds
## WARNING: phase `install' returned `#f'.  Return values other than #t
## are deprecated.  Please migrate this package so that its phase
## procedures report errors by raising an exception, and otherwise
## always return #t.
~~~~

When I scroll very far upwards in that file, holding page up down for 5s or so,
I get to lines, which do not start with "info: ..." and there seems to be
something going on:

~~~~
phase `patch-source-shebangs' succeeded after 0.6 seconds
starting phase `patch-generated-file-shebangs'
patch-shebang: ./erts/emulator/utils/beam_emu_vars: warning: no binary for 
interpreter `perl' found in $PATH
patch-shebang: ./erts/emulator/utils/beam_makeops: warning: no binary for 
interpreter `perl' found in $PATH
patch-shebang: ./erts/emulator/utils/beam_strip: warning: no binary for 
interpreter `perl' found in $PATH
patch-shebang: ./erts/emulator/utils/find_cross_ycf: warning: no binary for 
interpreter `escript' found in $PATH
patch-shebang: ./erts/emulator/utils/make_alloc_types: warning: no binary for 
interpreter `perl' found in $PATH
patch-shebang: ./erts/emulator/utils/make_compiler_flags: warning: no binary 
for interpreter `perl' found in $PATH
patch-shebang: ./erts/emulator/utils/make_driver_tab: warning: no binary for 
interpreter `perl' found in $PATH
patch-shebang: ./erts/emulator/utils/make_preload: warning: no binary for 
interpreter `perl' found in $PATH
patch-shebang: ./erts/emulator/utils/make_tables: warning: no binary for 
interpreter `perl' found in $PATH
patch-shebang: ./erts/emulator/utils/make_version: warning: no binary for 
interpreter `perl' found in $PATH
patch-shebang: ./erts/etc/unix/gcov-gen-html: warning: no binary for 
interpreter `perl' found in $PATH
patch-shebang: ./erts/lib_src/utils/make_atomics_api: warning: no binary for 
interpreter `escript' found in $PATH
patch-shebang: ./lib/compiler/scripts/smoke: warning: no binary for interpreter 
`escript' found in $PATH
patch-shebang: ./lib/diameter/bin/diameterc: warning: no binary for interpreter 
`escript' found in $PATH
patch-shebang: ./lib/erl_docgen/priv/bin/codeline_preprocessing.escript: 
warning: no binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/erl_docgen/priv/bin/github_link.escript: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/erl_docgen/priv/bin/validate_links.escript: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/erl_docgen/priv/bin/xml_from_edoc.escript: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/erl_docgen/priv/bin/xref_mod_app.escript: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/kernel/test/esock_ttest/esock-ttest: warning: no binary 
for interpreter `escript' found in $PATH
patch-shebang: ./lib/public_key/priv/convert.escript: warning: no binary for 
interpreter `escript' found in $PATH
patch-shebang: ./lib/reltool/bin/reltool.escript: warning: no binary for 
interpreter `escript' found in $PATH
patch-shebang: ./lib/reltool/examples/mnesia_core_dump_viewer: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/scripts/update_deprecations: warning: no binary for 
interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/arg_overflow: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/bad_io_server: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/compile_error: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/emulator_flags: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/factorial: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/factorial_compile: warning: 
no binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/factorial_compile_main: 
warning: no binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/factorial_epp: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/factorial_warning: warning: 
no binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/filesize: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/linebuf_overflow: warning: 
no binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/lint_error: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/strange.name: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/tail_rec: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/test_script_name: warning: 
no binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/trap_exit: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/two_lines: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/unicode1: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/unicode2: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/unicode3: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/unicode4: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/unicode5: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./lib/stdlib/test/escript_SUITE_data/unicode6: warning: no 
binary for interpreter `escript' found in $PATH
patch-shebang: ./make/fixup_development_runtime_dependencies: warning: no 
binary for interpreter `perl' found in $PATH
patch-shebang: ./make/make_emakefile.in: warning: no binary for interpreter 
`@PERL@' found in $PATH
patch-shebang: ./make/verify_runtime_dependencies: warning: no binary for 
interpreter `escript' found in $PATH
patch-shebang: ./scripts/diffable: warning: no binary for interpreter `escript' 
found in $PATH
patch-shebang: ./scripts/otp_html_check: warning: no binary for interpreter 
`perl' found in $PATH
patch-makefile-SHELL: ./lib/hipe/Makefile: changing `SHELL' from `/bin/sh' to 
`/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh'
patch-makefile-SHELL: ./lib/hipe/doc/Makefile: changing `SHELL' from `/bin/sh' 
to `/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh'
phase `patch-generated-file-shebangs' succeeded after 0.2 seconds
starting phase `check'
test suite not run
phase `check' succeeded after 0.0 seconds
starting phase `install'
error: No files found to install.
info: considering installing .dir-locals.el
info: .dir-locals.el included as it matches "^[^/]*\.el$"
info: .dir-locals.el excluded as it matches "^\.dir-locals\.el$"
info: considering installing .gitattributes
~~~~

Could that be something about some emacs lisp script or about some erlang 
script?

Not sure that has anything to do with the final error I get, but it does say:

~~~~
starting phase `install'
error: No files found to install.
~~~~

Then after that it "considers" a lot of things to install but probably does not.
And then it fails.

How can I fix the issues or work around it?

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]