GithubHelp home page GithubHelp logo

Comments (13)

rakanalh avatar rakanalh commented on May 22, 2024

Not necessarily... but you definitely need emacs-module.h at the very least, which as far as i remember is generated by the build script when building emacs from source.
Update: So basically, checkout Emacs source code and execute

make EMACS-SRC=/path/to/emacs-src

from emacs-libvterm.

srustamo avatar srustamo commented on May 22, 2024

Thanks.

from emacs-libvterm.

srustamo avatar srustamo commented on May 22, 2024

I tried make EMACS-SRC=/path/to/emacs-src with /path/to/emacs-src/ pointing to cloned working tree of this repo git://git.savannah.gnu.org/emacs.git.

It gave me the error reported in the previous issue:

❮ make EMACS-SRC=~/sources/Emacs/emacs
gcc -ggdb3 -Wall -I~/sources/Emacs/emacs/src -I/ -fPIC -c vterm-module.c
In file included from vterm-module.c:1:
./vterm-module.h:1:10: fatal error: 'emacs-module.h' file not found
#include <emacs-module.h>
         ^
1 error generated.
make: *** [vterm-module.o] Error 1

Then I tried to compile Emacs from source, which went fine. Run make EMACS-SRC=/path/to/emacs-src still get the above error.

from emacs-libvterm.

rakanalh avatar rakanalh commented on May 22, 2024

It has to be /path/to/emacs-src/src i think and you have to run ./configure && make inside emacs-src so that the file is generated, i am not sure which one of them actually generates but you can do both.

from emacs-libvterm.

akermu avatar akermu commented on May 22, 2024

The build should work, if you run make with the full path to the emacs source (without the tilde), like make EMACS-SRC=/home/srustamo/sources/Emacs/emacs. You only have to specify the root of the git repository. When I will have a little more time on my hands, I will try to simplify the build process (maybe by using CMake).

from emacs-libvterm.

srustamo avatar srustamo commented on May 22, 2024

Thanks. The package successfully compiles without the ~, although with warnings (see at the end).

However, after adding (add-to-list 'load-path "/Users/srustamo/GitHub/emacs-libvterm") to my init file, I don't have vterm-create function.

I then tried to evaluate vterm.el from within Emacs, which gives me ad-Advice-require: Cannot open load file: Not a directory, vterm-module error.

gcc -ggdb3 -Wall -I/Users/srustamo/sources/Emacs/emacs/src -I/ -fPIC -c vterm-module.c
vterm-module.c:427:45: warning: passing 'unsigned char [len]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
    env->copy_string_contents(env, args[1], key, &len);
                                            ^~~
vterm-module.c:117:13: warning: unused function 'message' [-Wunused-function]
static void message(emacs_env *env, char *message) {
            ^
vterm-module.c:123:13: warning: unused function 'message_value' [-Wunused-function]
static void message_value(emacs_env *env, emacs_value value) {
            ^
3 warnings generated.
gcc -shared  -lvterm -lutil -o vterm-module.so vterm-module.o
rm vterm-module.o

from emacs-libvterm.

akermu avatar akermu commented on May 22, 2024

Is your emacs compiled with module support? Does the value of system-configuration-options contain --with-modules?

from emacs-libvterm.

srustamo avatar srustamo commented on May 22, 2024

Thanks. I'm using emacs-mac. The value of system-configuration-options is

"--enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.7/share/info/emacs --prefix=/usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.7 --with-mac --enable-mac-app=/usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.7"

No module support, it seems.

from emacs-libvterm.

knazarov avatar knazarov commented on May 22, 2024

@srustamo you can add module support with brew install --with-modules emacs-mac

from emacs-libvterm.

srustamo avatar srustamo commented on May 22, 2024

@racktear thanks. I raised this issue in emacs-mac repo.

from emacs-libvterm.

knazarov avatar knazarov commented on May 22, 2024

@srustamo yes, you are correct. The command you mention there should do the trick.

from emacs-libvterm.

knazarov avatar knazarov commented on May 22, 2024

@srustamo I've actually tried to do it myself, and failed, as emacs-mac misses the emacs-module.h, despite being built with module support.

I've sent a pull request to the homebrew formula that fixes it:

railwaycat/homebrew-emacsmacport#112

You can edit your local brew formula with brew edit emacs-mac and add those lines if you don't want to wait for the upstream merge.

from emacs-libvterm.

srustamo avatar srustamo commented on May 22, 2024

Thanks. Your PR is not merged yet. Adding PR code manually with brew edit emacs-mac as suggested fails to build:

❮ brew install --with-modules emacs-mac
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
apibuilder-cli

==> Installing emacs-mac from railwaycat/emacsmacport
==> Downloading https://bitbucket.org/mituharu/emacs-mac/get/emacs-25.3-mac-6.8.tar.bz2
Already downloaded: /Users/srmba3/Library/Caches/Homebrew/emacs-mac-emacs-25.3-mac-6.8.tar.bz2
==> ./autogen.sh
==> ./configure --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.8/share/info/emacs --prefix=/usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.8 --with-mac --enable-mac-app=/usr/local/Cellar/emacs-mac/emacs-25.3-mac
==> make
==> make install
Error: undefined method `install' for "/usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.8/src":String
/usr/local/Homebrew/Library/Taps/railwaycat/homebrew-emacsmacport/Formula/emacs-mac.rb:122:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:143:in `block (2 levels) in install'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1093:in `block in brew'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1911:in `block in stage'
/usr/local/Homebrew/Library/Homebrew/resource.rb:97:in `block in unpack'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:14:in `block in mktemp'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:74:in `block in run'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:74:in `chdir'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:74:in `run'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:13:in `mktemp'
/usr/local/Homebrew/Library/Homebrew/resource.rb:93:in `unpack'
/usr/local/Homebrew/Library/Homebrew/resource.rb:85:in `stage'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1888:in `stage'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1088:in `brew'
/usr/local/Homebrew/Library/Homebrew/build.rb:114:in `block in install'
/usr/local/Homebrew/Library/Homebrew/utils.rb:554:in `with_env'
/usr/local/Homebrew/Library/Homebrew/build.rb:111:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:192:in `<main>'

from emacs-libvterm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.