Hi all, I thought I was being very clever by creating a virtual machine build environment so I didn’t have to litter my main computer with 100s of packages to build emacs. So I built it in a gnomebox and set the prefix to $home/.local/opt/emacs as I saw someone do. It runs fine in the virtual machine

The issue is now, I’d like to move the install or the built files to my host machine and run it, but it won’t run. If I just try to move the $home/.local/opt/emacs folder to my own computer, and run it I get the following:

./emacs-29.1.90: error while loading shared libraries: libgpm.so.2: cannot open shared object file: No such file or directory

When I try to move the whole directory (source code and the build directories inside there) out of the virtual machine into the Host and try to run make install (this is after make and compilation completed) it says

make install
if [ -x ./config.status ]; then	\
     ./config.status --recheck;	\
else				\
     ../configure --cache-file=/dev/null; \
fi
/bin/sh: line 4: ../configure: Permission denied
make: *** [Makefile:573: config.status] Error 126

I have tried to chown -R : ./ to the whole directory but it still gives me the permission denied.

Any ideas how I might accomplish this task?

Thanks!

  • SlowValueB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    creating a virtual machine build environment so I didn’t have to litter my main computer with 100s of packages to build emacs.

    That’s is a good idea! Despite what all others say. I’m doing this since years with my Linux box(es).

    But you need to know, that self compiled programms should be stored below the filesystem tree /usr/local/.
    There is a tool called stow, it has a package in most Linux distributions.
    Install stow into host and VM and create a directory /usr/local/stow/ in both (host an VM).
    When compiling Emacs or other programs use the --prefix option of configure. E.g. cd emacs-src; ./configure --prefix=/usr/local/stow/emacs-v29.1. Then compile Emacs and install it in the virtual machine. After that, tar the folder /usr/local/stow/emacs-v29.1 and unpack it onto the host into the same directory. Then change dir into /usr/local/stow and run sudo stow emacs-v29.1. Maybe you need to install some libraries onto the host, use ldd /usr/local/bin/emacs to see, what libs you need. Then you are ready to use emacs. It is possible to have multiple versions of emacs installed and only one needs to be “activated” via stow.