unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Compiling vterm: cc: command not found
@ 2022-11-12 15:14 Chris Keschnat via
  2022-11-12 18:11 ` Csepp
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Keschnat via @ 2022-11-12 15:14 UTC (permalink / raw)
  To: help-guix


Hello, after todays ~guix pull~, I cannot compile vterm anymore. I do not
seem to have ~cc~ installed (anymore?). Am I missing a package? I have
~make~, ~cmake~, ~gcc~, and ~gcc-toolchain~ installed and didn't change
anything on that front.


Steps to reproduce (following the "Manual installation" from the docs[1]):

#+begin_src sh

  git clone https://github.com/akermu/emacs-libvterm.git
  cd emacs-libvterm
  mkdir -p build
  cd build
  cmake ..
  make

#+end_src

Results in:

#+begin_src sh

  [  8%] Performing update step for 'libvterm'
  [ 16%] No patch step for 'libvterm'
  [ 25%] No configure step for 'libvterm'
  [ 33%] Performing build step for 'libvterm'
  CC src/encoding.c
  /home/ck/.guix-profile/bin/libtool: line 1933: cc: command not found
  make[3]: *** [Makefile:63: src/encoding.lo] Error 1
  make[2]: *** [CMakeFiles/libvterm.dir/build.make:86: libvterm-prefix/src/libvterm-stamp/libvterm-build] Error 2
  make[1]: *** [CMakeFiles/Makefile2:112: CMakeFiles/libvterm.dir/all] Error 2
  make: *** [Makefile:91: all] Error 2

#+end_src

[1] https://github.com/akermu/emacs-libvterm


Thanks

Chris


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

* Re: Compiling vterm: cc: command not found
  2022-11-12 15:14 Compiling vterm: cc: command not found Chris Keschnat via
@ 2022-11-12 18:11 ` Csepp
  2022-11-13 10:50   ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 5+ messages in thread
From: Csepp @ 2022-11-12 18:11 UTC (permalink / raw)
  To: Chris Keschnat; +Cc: help-guix


Chris Keschnat via <help-guix@gnu.org> writes:

> Hello, after todays ~guix pull~, I cannot compile vterm anymore. I do not
> seem to have ~cc~ installed (anymore?). Am I missing a package? I have
> ~make~, ~cmake~, ~gcc~, and ~gcc-toolchain~ installed and didn't change
> anything on that front.
>
>
> Steps to reproduce (following the "Manual installation" from the docs[1]):
>
> #+begin_src sh
>
>   git clone https://github.com/akermu/emacs-libvterm.git
>   cd emacs-libvterm
>   mkdir -p build
>   cd build
>   cmake ..
>   make
>
> #+end_src
>
>
> Results in:
>
> #+begin_src sh
>
>   [  8%] Performing update step for 'libvterm'
>   [ 16%] No patch step for 'libvterm'
>   [ 25%] No configure step for 'libvterm'
>   [ 33%] Performing build step for 'libvterm'
>   CC src/encoding.c
>   /home/ck/.guix-profile/bin/libtool: line 1933: cc: command not found
>   make[3]: *** [Makefile:63: src/encoding.lo] Error 1
>   make[2]: *** [CMakeFiles/libvterm.dir/build.make:86: libvterm-prefix/src/libvterm-stamp/libvterm-build] Error 2
>   make[1]: *** [CMakeFiles/Makefile2:112: CMakeFiles/libvterm.dir/all] Error 2
>   make: *** [Makefile:91: all] Error 2
>
> #+end_src
>
> [1] https://github.com/akermu/emacs-libvterm
>
>
> Thanks
>
> Chris

Without having looked at the package, what I would recommend and what I
usually try in a case when something tries to use cc is set the CC
environment variable or configure flag.  Its value should ideally be
#$(cc-for-target).
So you would have something like in modify-phases:
(add-before 'configure 'set-cc
(lambda _ (setenv "CC" #$(cc-for-target))))


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

* Re: Compiling vterm: cc: command not found
  2022-11-12 18:11 ` Csepp
@ 2022-11-13 10:50   ` Tobias Geerinckx-Rice
  2022-11-13 11:04     ` Chris Keschnat via
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-11-13 10:50 UTC (permalink / raw)
  To: help-guix

> (anymore?)

Guix has never provided the 'cc' alias for GCC AFAIR.

Perhaps you were previously using 'clang-toolchain', which does symlink cc to clang?  That's something that we, Guix, explicitly add; not upstream.

It's unfortunate that Guix promotes a non-GPL compiler over GCC this way.

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.


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

* Re: Compiling vterm: cc: command not found
  2022-11-13 10:50   ` Tobias Geerinckx-Rice
@ 2022-11-13 11:04     ` Chris Keschnat via
  2022-11-22  6:56       ` Chris Keschnat via
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Keschnat via @ 2022-11-13 11:04 UTC (permalink / raw)
  To: help-guix


Tobias Geerinckx-Rice <me@tobias.gr> writes:

>> (anymore?)
>
> Guix has never provided the 'cc' alias for GCC AFAIR.
>
> Perhaps you were previously using 'clang-toolchain', which does
> symlink cc to clang? That's something that we, Guix, explicitly add;
> not upstream.
>
> It's unfortunate that Guix promotes a non-GPL compiler over GCC this way.
>
> Kind regards,
>
> T G-R
>
> Sent on the go.  Excuse or enjoy my brevity.


Hello,
I might have been confused about how I installed vterm before. I
thought I used straight.el, which builds the module as describe in my
previous mail. It could be that I had manually installed =emacs-vterm= and
didn't add it to my (guix) emacs profile.

I have now installed ~emacs-vterm~ through guix (together with ~libvterm~
in my emacs profile). When I try running vterm from emacs, it still asks
to compile the module though (which fails).

Looking at the ~emacs-vterm~ packages, this happens here:

#+begin_src sh

  (unless (require 'vterm-module nil t)
  ....)

#+end_src

Trying manually:
#+begin_src sh

  (require 'vterm-module)

=>

  Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "vterm-module")
    require(vterm-module)
    elisp--eval-last-sexp(nil)
    eval-last-sexp(nil)
    funcall-interactively(eval-last-sexp nil)
    command-execute(eval-last-sexp)

#+end_src

There is a .so file in my emacs profile though, so I think there is something wrong with some kind of module path?

#+begin_src sh

  ~/.guix-extra-profiles/emacs/emacs  $ find | grep vterm-module
  ./lib/vterm-module.so

#+end_src

I do not know how/what to check though. So far I have only found that my
~module-file-prefix~ is ".so". But other than that, I do not know how
the loading of modules works and would appreciate a hint.


Thank you
Chris


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

* Re: Compiling vterm: cc: command not found
  2022-11-13 11:04     ` Chris Keschnat via
@ 2022-11-22  6:56       ` Chris Keschnat via
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Keschnat via @ 2022-11-22  6:56 UTC (permalink / raw)
  To: help-guix


Chris Keschnat <chris@catsu.it> writes:

> Tobias Geerinckx-Rice <me@tobias.gr> writes:
>
>>> (anymore?)
>>
>> Guix has never provided the 'cc' alias for GCC AFAIR.
>>
>> Perhaps you were previously using 'clang-toolchain', which does
>> symlink cc to clang? That's something that we, Guix, explicitly add;
>> not upstream.
>>
>> It's unfortunate that Guix promotes a non-GPL compiler over GCC this way.
>>
>> Kind regards,
>>
>> T G-R
>>
>> Sent on the go.  Excuse or enjoy my brevity.
>
>
> Hello,
> I might have been confused about how I installed vterm before. I
> thought I used straight.el, which builds the module as describe in my
> previous mail. It could be that I had manually installed =emacs-vterm= and
> didn't add it to my (guix) emacs profile.
>
> I have now installed ~emacs-vterm~ through guix (together with ~libvterm~
> in my emacs profile). When I try running vterm from emacs, it still asks
> to compile the module though (which fails).
>
> Looking at the ~emacs-vterm~ packages, this happens here:
>
> #+begin_src sh
>
>   (unless (require 'vterm-module nil t)
>   ....)
>
> #+end_src
>
>
> Trying manually:
>
> #+begin_src sh
>
>   (require 'vterm-module)
>
> =>
>
>   Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "vterm-module")
>     require(vterm-module)
>     elisp--eval-last-sexp(nil)
>     eval-last-sexp(nil)
>     funcall-interactively(eval-last-sexp nil)
>     command-execute(eval-last-sexp)
>
> #+end_src
>
>
> There is a .so file in my emacs profile though, so I think there is something wrong with some kind of module path?
>
> #+begin_src sh
>
>   ~/.guix-extra-profiles/emacs/emacs  $ find | grep vterm-module
>   ./lib/vterm-module.so
>
> #+end_src
>
> I do not know how/what to check though. So far I have only found that my
> ~module-file-prefix~ is ".so". But other than that, I do not know how
> the loading of modules works and would appreciate a hint.
>
>
> Thank you
> Chris


As I couldn't figure out how to debug this, I chose trial and error. And
it workd. I'm not exactly sure what the issue was, but here is what I
did, in case it helps anyone in the future:


Added ~libtool~ and ~cmake~ to =emacs.scm= and installed those. After that
and running:

#+begin_src sh

  GUIX_PROFILE="/home/ck/.guix-extra-profiles/emacs/emacs"
  . "$GUIX_PROFILE/etc/profile"

#+end_src

the compilation worked. But the module could not be loaded:

#+begin_src sh

  byte-code: Module could not be opened: "/home/ck/.emacs.d/straight/build/vterm/vterm-module.so", "libvterm.so.0: cannot open shared object file: No such file or directory"

#+end_src

Then changed (as stated in the docs)

#+begin_src emacs-lisp
  (use-package vterm)
#+end_src

to

#+begin_src emacs-lisp

  (use-package vterm
    :load-path  "/home/ck/.guix-extra-profiles/emacs/emacs/lib")

#+end_src

vterm now works again.


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

end of thread, other threads:[~2022-11-22  6:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-12 15:14 Compiling vterm: cc: command not found Chris Keschnat via
2022-11-12 18:11 ` Csepp
2022-11-13 10:50   ` Tobias Geerinckx-Rice
2022-11-13 11:04     ` Chris Keschnat via
2022-11-22  6:56       ` Chris Keschnat via

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).