akermu / emacs-libvterm

Emacs libvterm integration
GNU General Public License v3.0
1.69k stars 135 forks source link

failed to provide feature ‘vterm-module’ #181

Open EdmondFrank opened 4 years ago

EdmondFrank commented 4 years ago

error: Loading file /usr/local/share/emacs/26.3/lisp/term.elc failed to provide feature ‘vterm-module’

Screenshot from 2019-11-15 11-39-17

My Operating System Release Ubuntu 16.04 LTS

➜ ~ emacs --version GNU Emacs 26.2 Copyright (C) 2019 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING.

(message module-file-suffix) , return ".so"

Sbozzolo commented 4 years ago

It seems that there are two version of Emacs installed: the 26.2 (according to your output) and the 26.3 (according to the screenshot). My guess is that you updated emacs and this somehow broke vterm. I'd try cleaning up stuff and re-installing vterm (which is supposed to provide the feature vterm-module).

On Thu, Nov 14, 2019, 20:46 EdmondFrank notifications@github.com wrote:

error: Loading file /usr/local/share/emacs/26.3/lisp/term.elc failed to provide feature ‘vterm-module’

[image: Screenshot from 2019-11-15 11-39-17] https://user-images.githubusercontent.com/13914416/68915347-9e478000-079c-11ea-9ff0-b6201a502b14.png

My Operating System Release Ubuntu 16.04 LTS

➜ ~ emacs --version GNU Emacs 26.2 Copyright (C) 2019 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING.

(message module-file-suffix) , return ".so"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/akermu/emacs-libvterm/issues/181?email_source=notifications&email_token=ACF6E7LSW25JEJVMMRYEDV3QTYLS3A5CNFSM4JNVDUQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZP6SFA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACF6E7LOVW4CD6MPSBHYICTQTYLS3ANCNFSM4JNVDUQA .

EdmondFrank commented 4 years ago

It seems that there are two version of Emacs installed: the 26.2 (according to your output) and the 26.3 (according to the screenshot). My guess is that you updated emacs and this somehow broke vterm. I'd try cleaning up stuff and re-installing vterm (which is supposed to provide the feature vterm-module). On Thu, Nov 14, 2019, 20:46 EdmondFrank @.***> wrote: error: Loading file /usr/local/share/emacs/26.3/lisp/term.elc failed to provide feature ‘vterm-module’ [image: Screenshot from 2019-11-15 11-39-17] https://user-images.githubusercontent.com/13914416/68915347-9e478000-079c-11ea-9ff0-b6201a502b14.png My Operating System Release Ubuntu 16.04 LTS ➜ ~ emacs --version GNU Emacs 26.2 Copyright (C) 2019 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. (message module-file-suffix) , return ".so" — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#181?email_source=notifications&email_token=ACF6E7LSW25JEJVMMRYEDV3QTYLS3A5CNFSM4JNVDUQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZP6SFA>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACF6E7LOVW4CD6MPSBHYICTQTYLS3ANCNFSM4JNVDUQA .

I have recompiled emacs 26.3 with prefix --with-module from source and reinstallde vterm too but this problem still exists

EdmondFrank commented 4 years ago

This is the latest screenshot Screenshot from 2019-11-15 13-40-48

Sbozzolo commented 4 years ago

Does it work if you do make run in the vterm build directory?

EdmondFrank commented 4 years ago

image No, same error.

AmCrNi commented 4 years ago

Hi, currently I'm facing exactly the same problem on one of mine machines. And it's occuring only on Ubuntu 16.04 LTS with emacs 26.3. The same emacs config is working properly on gentoo.

jixiuf commented 4 years ago

https://github.com/akermu/emacs-libvterm/issues/66#issuecomment-500886977 can you build a docker image for me like this to reproduce this

AmCrNi commented 4 years ago

I've migrated ubuntu 16.04 to 18.04 and after rebuilding only vterm module it doesn't work. However after rebuilding emacs itself and module on ubuntu 18.04 vterm worked. It looks like something is broken with emacs built on ubuntu 16.04 which prevents load vterm-module.

jixiuf commented 4 years ago

maybe this is the same problem with #185

EdmondFrank commented 4 years ago

I tried to follow #66 to reproduce the problem debug docker

jixiuf commented 4 years ago

so can you try install vterm by M-x:list-package it seems like package vterm is not found

or run docker run -t -i vterm again

EdmondFrank commented 4 years ago

so can you try install vterm by M-x:list-package it seems like package vterm is not found

or run docker run -t -i vterm again

It worked after install vterm manually on the docker container

It looks like the problem only occurs on Ubuntu 16.04 LTS

alinbxSorcerer commented 4 years ago

The problem occurs in Ubuntu 18.04, Ubuntu 19.10, The package failed to support Ubuntu.

csheaff commented 4 years ago

Same issue.

kernel 4.4.0-124-generic Ubuntu 16.04.6 LTS GNU Emacs 26.3, module-file-suffix: ".so" cmake 3.17.0 libtool 2.4.6

Sbozzolo commented 4 years ago

Can you please update the package and try again?

It may have to do with problems we had we the byte-compilation, which was fixed in the latest version.

On Sun, Apr 12, 2020 at 8:13 PM Kyochu Joho notifications@github.com wrote:

Same issue.

kernel 4.4.0-124-generic Ubuntu 16.04.6 LTS GNU Emacs 26.3, module-file-suffix: ".so" cmake 3.17.0 libtool 2.4.6

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/akermu/emacs-libvterm/issues/181#issuecomment-612729201, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACF6E7K7ZWPTGERHB6BZ2C3RMJ7L3ANCNFSM4JNVDUQA .

csheaff commented 4 years ago

commit aa512b8 still not working for me.

Sbozzolo commented 4 years ago

I am very interested in tracking down and solving this problem.

Did the module compile? What is the value of load-path? What happens if you eval (require 'vterm-module)?

csheaff commented 4 years ago

cmake output

-- The C compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- No build type selected, defaulting to RelWithDebInfo
-- Configuring done
-- Generating done
-- Build files have been written to: ~/emacs-libvterm/build

make output

Scanning dependencies of target libvterm
[  8%] Creating directories for 'libvterm'
[ 16%] Performing download step (git clone) for 'libvterm'
Cloning into 'libvterm'...
Note: checking out '65dbda3ed214f036ee799d18b2e693a833a0e591'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 65dbda3... Bump version to 0.1.3
[ 25%] No patch step for 'libvterm'
[ 33%] Performing update step for 'libvterm'
[ 41%] No configure step for 'libvterm'
[ 50%] Performing build step for 'libvterm'
TBL src/encoding/DECdrawing.tbl
TBL src/encoding/uk.tbl
CC src/encoding.c
CC src/keyboard.c
CC src/mouse.c
CC src/parser.c
CC src/pen.c
CC src/screen.c
CC src/state.c
CC src/unicode.c
src/unicode.c:215:12: warning: ‘mk_wcswidth’ defined but not used [-Wunused-function]
 static int mk_wcswidth(const uint32_t *pwcs, size_t n)
            ^
src/unicode.c:306:12: warning: ‘mk_wcswidth_cjk’ defined but not used [-Wunused-function]
 static int mk_wcswidth_cjk(const uint32_t *pwcs, size_t n)
            ^
CC src/vterm.c
LINK libvterm.la
ar: `u' modifier ignored since `D' is the default (see `U')
CC bin/unterm.c
CC bin/vterm-ctrl.c
CC bin/vterm-dump.c
[ 58%] No install step for 'libvterm'
[ 66%] Completed 'libvterm'
[ 66%] Built target libvterm
Scanning dependencies of target vterm-module
[ 75%] Building C object CMakeFiles/vterm-module.dir/vterm-module.c.o
[ 83%] Building C object CMakeFiles/vterm-module.dir/utf8.c.o
[ 91%] Building C object CMakeFiles/vterm-module.dir/elisp.c.o
[100%] Linking C shared module ../vterm-module.so
[100%] Built target vterm-module

load-path

load-path is a variable defined in ‘C source code’.                                                                                                                                                             
Its value is                                                                                                                                                                                                    
("~/emacs-libvterm" ...

(require 'vterm-module)

Debugger entered--Lisp error: (error "Loading file /usr/share/emacs/26.3/lisp/emacs-lisp/pp.elc failed to provide feature ‘vterm-module’")                                                                      
  require(vterm-module)                                                                                                                                                                                         
  eval((require (quote vterm-module)) nil)                                                                                                                                                                      
  eval-expression((require (quote vterm-module)) nil nil 127)                                                                                                                                                   
  funcall-interactively(eval-expression (require (quote vterm-module)) nil nil 127)                                                                                                                             
  call-interactively(eval-expression record nil)                                                                                                                                                                
  command-execute(eval-expression record)                                                                                                                                                                       
  execute-extended-command(nil "eval-expression" "eval-expre")                                                                                                                                                  
  funcall-interactively(execute-extended-command nil "eval-expression" "eval-expre")                                                                                                                            
  call-interactively(execute-extended-command nil nil)                                                                                                                                                          
  command-execute(execute-extended-command)
Sbozzolo commented 4 years ago

Thanks, what about (locate-library "vterm")?

csheaff commented 4 years ago

(locate-library "vterm") ~/emacs-libvterm/vterm.el"

Sbozzolo commented 4 years ago

Thanks. Do you have a vterm-module.so file in ~/emacs-libvterm?

csheaff commented 4 years ago

yep

Sbozzolo commented 4 years ago

What about (locate-library "vterm-module")?

csheaff commented 4 years ago

(locate-library "vterm-module") ~/emacs-libvterm/vterm-module.so

Sbozzolo commented 4 years ago

Everything seems okay. I have no idea why Emacs is thinking that pp.elc should provide vterm-module.

What about (require 'vterm-module "~/emacs-libvterm/vterm-module.so") ?

csheaff commented 4 years ago
Debugger entered--Lisp error: (error "Loading file /usr/share/emacs/26.3/lisp/term/xterm.elc failed to provide feature ‘vterm-module’")                                                     
  require(vterm-module "~/emacs-libvterm/vterm-module.so")                                                                                                                      
  eval((require (quote vterm-module) "~/emacs-libvterm/vterm-module.so") nil)                                                                                                   
  eval-expression((require (quote vterm-module) "~/emacs-libvterm/vterm-module.so") nil nil 127)                                                                                
  funcall-interactively(eval-expression (require (quote vterm-module) "~/emacs-libvterm/vterm-module.so") nil nil 127)                                                          
  call-interactively(eval-expression record nil)                                                                                                                                            
  command-execute(eval-expression record)                                                                                                                                                   
  execute-extended-command(nil "eval-expression" "eval-expr")                                                                                                                               
  funcall-interactively(execute-extended-command nil "eval-expression" "eval-expr")                                                                                                         
  call-interactively(execute-extended-command nil nil)                                                                                                                                      
  command-execute(execute-extended-command)  
sanel commented 3 years ago

I reported this to Emacs tracker: link. The thing is that, when this happens, even the simple modules fails as well.