Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required feature ‘vterm-module’ was not provided #9

Closed
diamond-lizard opened this issue Oct 29, 2017 · 16 comments
Closed

Required feature ‘vterm-module’ was not provided #9

diamond-lizard opened this issue Oct 29, 2017 · 16 comments

Comments

@diamond-lizard
Copy link

diamond-lizard commented Oct 29, 2017

When I (add-to-list 'load-path "~/.emacs.d/dist/emacs-libvterm") and then try to (require 'vterm) I get this error:

Debugger entered--Lisp error: (error "Required feature ‘vterm-module’ was not provided")
  require(vterm-module)
  eval-buffer(#<buffer  *load*> nil "/home/me/.emacs.d/dist/emacs-libvterm/vterm.el" nil t)  ; Reading at buffer position 218
  load-with-code-conversion("/home/me/.emacs.d/dist/emacs-libvterm/vterm.el" "/home/me/.emacs.d/dist/emacs-libvterm/vterm.el" nil t)
  require(vterm)
  eval-region(204 220 t #f(compiled-function (ignore) #<bytecode 0x456b6f>))  ; Reading at buffer position 220
  elisp--eval-defun()
  eval-defun(nil)
  funcall-interactively(eval-defun nil)
  call-interactively(eval-defun record nil)
  command-execute(eval-defun record)
  execute-extended-command(nil "eval-defun" "eval-defun")
  funcall-interactively(execute-extended-command nil "eval-defun" "eval-defun")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

This is despite having vterm-module.so in ~/.emacs.d/dist/emacs-libvterm. The log of the compile that generated it is below:

> make EMACS-SRC=/home/me/compilation/editors/emacs/emacs/emacs-26.0.90
gcc -ggdb3 -Wall -I/home/me/compilation/editors/emacs/emacs/emacs-26.0.90/src -I/ -fPIC -c vterm-module.c
vterm-module.c: In function ‘Fvterm_update’:
vterm-module.c:427:45: warning: pointer targets in passing argument 3 of ‘env->copy_string_contents’ differ in signedness [-Wpointer-sign]
     env->copy_string_contents(env, args[1], key, &len);
                                             ^
vterm-module.c:427:45: note: expected ‘char *’ but argument is of type ‘unsigned char *’
vterm-module.c: At top level:
vterm-module.c:117:13: warning: ‘message’ defined but not used [-Wunused-function]
 static void message(emacs_env *env, char *message) {
             ^
vterm-module.c:123:13: warning: ‘message_value’ defined but not used [-Wunused-function]
 static void message_value(emacs_env *env, emacs_value value) {
             ^
gcc -shared  -lvterm -lutil -o vterm-module.so vterm-module.o
rm vterm-module.o

file ~/.emacs.d/dist/emacs-libvterm/vterm-module.so tells me that it's ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, with debug_info, not stripped

I'm using Emacs 26.0.90 in Gentoo Linux amd64. I've compiled Emacs with a --with-modules configure flag, and the value of the module-file-suffix variable in Emacs is ".so"

@akermu
Copy link
Owner

akermu commented Nov 16, 2017

What's the output of ldd ~/.emacs.d/dist/emacs-libvterm/vterm-module.so?

@akermu
Copy link
Owner

akermu commented Nov 16, 2017

I also switched the build system to CMake. Could you update emacs-libvterm to master and rebuild the module?

@diamond-lizard
Copy link
Author

I updated emacs-livterm, rebuilt the module, but when I (require 'vterm) I get an error:
Loading file /usr/local/apps/emacs-26.0.90/share/emacs/26.0.90/lisp/term/xterm.elc failed to provide feature ‘vterm-module’

ldd vterm-module.so returns:

linux-vdso.so.1 (0x00007ffc3ff6d000)
libvterm.so.0 => /usr/lib64/libvterm.so.0 (0x00007f073913a000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f0738f37000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0738b7e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0739552000)

Also, during the build I noticed that it reported: Performing download step (git clone) for 'emacs'. I'm not sure which emacs version it cloned, but I'm using 26.0.90, whose source I already have in /home/me/compilation/editors/emacs/emacs/emacs-26.0.90. Would it be possible to just reuse that by doing a make EMACS-SRC=/home/me/compilation/editors/emacs/emacs/emacs-26.0.90 like I did with the previous make system?

@akermu
Copy link
Owner

akermu commented Nov 17, 2017

Would it be possible to just reuse that

I will add an option to the build system.

@akermu
Copy link
Owner

akermu commented Nov 17, 2017

What happens if you call make run?

@diamond-lizard
Copy link
Author

make run builds and runs a new emacs (compile log here). From there, a (require 'vterm) gives me this error:

Debugger entered--Lisp error: (error "Loading file /usr/local/apps/emacs-26.0.90/share/emacs/26.0.90/lisp/elec-pair.elc failed to provide feature ‘vterm-module’")
  require(vterm-module)
  eval-buffer(#<buffer  *load*> nil "/home/me/.emacs.d/dist/emacs-libvterm/vterm.el" nil t)  ; Reading at buffer position 218
  load-with-code-conversion("/home/me/.emacs.d/dist/emacs-libvterm/vterm.el" "/home/me/.emacs.d/dist/emacs-libvterm/vterm.el" nil t)
  require(vterm)
  eval((require 'vterm) nil)
  eval-expression((require 'vterm) nil nil 127)
  funcall-interactively(eval-expression (require 'vterm) nil nil 127)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

This time elec-pair.elc is reported to be the culprit, but previous to this make run session, other .el or .elc files were reported to be the culprit. I'm not sure why that is.

@akermu
Copy link
Owner

akermu commented Nov 17, 2017

If you pull the latest master, you can now provide your own emacs source during the build like this:

cmake -DEMACS_SOURCE=/home/me/compilation/editors/emacs/emacs/emacs-26.0.90 ..

@akermu
Copy link
Owner

akermu commented Nov 17, 2017

I don't know, why your emacs can't load the module and I can't reproduce the issue on my side. The error messages seem also really weird, why does your emacs try to load the feature from a random built-in elisp file?

Maybe try it with emacs 25.3?

@diamond-lizard
Copy link
Author

I just tried cmake -DEMACS_SOURCE=/home/me/compilation/editors/emacs/emacs/emacs-26.0.90 .. (log here).

Then I started a fresh emacs session using emacs -Q, and did:

(add-to-list 'load-path "~/.emacs.d/dist/emacs-libvterm")
(require 'vterm)

and got a "Required feature ‘vterm-module’ was not provided" error (debug output here).

Then doing a second (require 'vterm) got me a "Loading file /usr/local/apps/emacs-26.0.90/share/emacs/26.0.90/lisp/help-mode.elc failed to provide feature ‘vterm-module’" error (full log here).

I am not sure why this is happening either. It's strange. I will try with emacs 25.3.

@deadtrickster
Copy link

Hi. Same error on emacs master, can't even get to "Required feature ‘vterm-module’ was not provided". Just always "Not such file or directory".

@deadtrickster
Copy link

please ignore my prev comment, after recompiling with modules it works.

@diamond-lizard
Copy link
Author

This works for me now with the latest emacs-libvterm and emacs 26.0.90.

@sheikki
Copy link

sheikki commented Aug 22, 2019

Getting this same error on Ubuntu 16.04 (WSL). Works flawlessly with basically identical emacs dotfile on CentOS 7. Had to install cmake manually if that matters..

@akermu
Copy link
Owner

akermu commented Aug 22, 2019

@sheikki How do you install emacs? And has it module support?

@sheikki
Copy link

sheikki commented Aug 22, 2019

On all boxes Emacs 26.2.90 release compiled from sauce with module support. On WSL 16.04 Ubuntu the first time vterm-package.el fails to provide vterm. On subsequent restarts it's either xterm or undo-tree that complains about vterm

@akermu
Copy link
Owner

akermu commented Aug 23, 2019

Could you please open a fresh issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants