Yeah, you're sort of fundamentally misunderstanding the relationship between a host and guest VM, here. The guest VM is an entirely different machine. It shares nothing with the host. Including shared libraries and other build chain dependencies.
Emacs
A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!
Get Emacs
Rules
- Posts should be emacs related
- Be kind please
- Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.
Emacs Resources
Emacs Tutorials
- Beginner’s Guide to Emacs
- Absolute Beginner's Guide to Emacs
- How to Learn Emacs: A Hand-drawn One-pager for Beginners
Useful Emacs configuration files and distributions
Quick pain-saver tip
I had thought that the libraries may have been linked in statically into a binary that "just worked" but indeed that is not the case. It will work on the host once I install some of the dependencies (of course, making the whole project a bit of a moot point. Though I will say it is a bit fewer than what was needed to build...)
This is not a useful plan. Building eMacs produces a binary that depends at runtime on loads of libraries that you haven’t installed on the outer system.
Just don’t bother doing this.
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.