akermu / emacs-libvterm

Emacs libvterm integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make error on Ubuntu

ztlevi opened this issue · comments

I got the following issue when building on Ubuntu 18 with sudo apt install libvterm-dev installed.

~/emacs.d/.local/packages/elpa/vterm-20190219.1419/build
➜    make

[  8%] Performing update step for 'libvterm'
[ 16%] No configure step for 'libvterm'
[ 25%] Performing build step for 'libvterm'
LINK libvterm.la
/home/ztlevi/anaconda3/bin/libtool: 1: eval: /tmp/build/80754af9/libtool_1538243245774/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc: not found
Makefile:58: recipe for target 'libvterm.la' failed
make[3]: *** [libvterm.la] Error 127
CMakeFiles/libvterm.dir/build.make:110: recipe for target 'libvterm-prefix/src/libvterm-stamp/libvterm-build' failed
make[2]: *** [libvterm-prefix/src/libvterm-stamp/libvterm-build] Error 2
CMakeFiles/Makefile2:136: recipe for target 'CMakeFiles/libvterm.dir/all' failed
make[1]: *** [CMakeFiles/libvterm.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

According to the solution over here, I tried conda install gxx_linux-64 but it didn't work out. Also, it's weird building emacs-libvterm uses conda binaries.

got the same errors.

I am trying to reproduce this with this docker image ,found it compile vterm successfully when I run emacs.
and I found I am using the libtool in /usr/bin/libtool,
and you use /home/ztlevi/anaconda3/bin/libtool
so maybe you need try to install libtool-bin with apt-get install libtool-bin and try again

Dockerfile

FROM docker.io/ubuntu:latest
RUN apt-get update 
RUN apt-get -y install software-properties-common # install add-apt-repository command

# http://ubuntuhandbook.org/index.php/2019/02/install-gnu-emacs-26-1-ubuntu-18-04-16-04-18-10/
RUN add-apt-repository ppa:kelleyk/emacs # for emacs26  (default emacs is not compile with module support)
RUN apt-get update

RUN apt-get -y install cmake make git libtool-bin

RUN apt-get -y install emacs26-nox #run emacs26 
RUN mkdir -p ~/.emacs.d/

RUN echo "(require 'package)" > ~/.emacs.d/init.el  
RUN echo "(add-to-list 'package-archives '(\"melpa\" . \"http://melpa.org/packages/\"))" >> ~/.emacs.d/init.el  
RUN echo "(or (file-exists-p package-user-dir) (package-refresh-contents))" >> ~/.emacs.d/init.el  
RUN echo "(package-initialize)" >> ~/.emacs.d/init.el  
RUN echo "(package-install 'vterm)" >> ~/.emacs.d/init.el
RUN echo "(let (vterm-install) (require 'vterm))" >> ~/.emacs.d/init.el

build and run

docker build -t vterm .
docker run -t -i vterm

I figure out the problem was the anaconda environment has an alternative libtool and it's default on my shell env. I just need to remove anaconda path from PATH temporarily and everything works fine.

Thank you for the catch up.

Got the same problem and I also tried conda install gxx_linux-64. I fixed it the same as above by temporarily removing Anaconda from PATH. Maybe it would be worth putting a note about this in the README?

I agree. Otherwise, a hack to remove anaconda/miniconda path from exec-path is also acceptable.

For anyone hitting this, here's a path-remove function:

path_remove ()  { export PATH=`echo -n $PATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; }

hi, I'm sorry I don't follow your comment @exp2ipi

I have the same error. My path variable is:

/home/sreenivas/anaconda3/bin:/home/sreenivas/anaconda3/condabin:/home/sreenivas/.pyenv/bin:/home/sreenivas/bin:/home/sreenivas/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda/bin:~/doom-emacs/bin

This worked well for me.
conda install gxx_linux-64

RcppCore/Rcpp#770