Compile and install emacs in a non root Linux environment (XDA and

It’s a Non X, non root environment, typically the XDA build server, you can install and use emacs by the following commands:

mkdir ~/myapps
mkdir sources && cd sources
tar -xvvf emacs-24.2.tar.gz
cd emacs-24.2
./configure --prefix=/home/droidzone/myapps --with-x-toolkit=no --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no --with-png=no
make ; make install
export PATH=$PATH:/home/droidzone/myapps/emacs/bin

Compiling and using emacs on requires a few additional steps.

If you try configuring emacs directly, you will encounter an error stating that:

configure: error: The required function `tputs' was not found in any library.
These libraries were tried: libncurses, libterminfo, libtermcap, libcurses.
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.[/code]
This is because ncurses library is missing in the Goo server.

So, first download GNU Ncurses and install it:
cd ~/sources
tar -xvvf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --prefix=/home/droidzone/myapps
make install

After this, compile Emacs setting the env flag properly to the location where you installed Ncurses

cd ../emacs-24.2
env LDFLAGS=-L/home/droidzone/myapps/lib ./configure --prefix=/home/droidzone/myapps --with-x-toolkit=no --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no --with-png=no
make install

It is possible to achieve the same by setting
export LD_LIBRARY_PATH=/home/droidzone/myapps/lib before compiling.


Compiling mc on Goo

checking for pkg-config... no
*** The pkg-config script could not be found. Make sure it is
*** in your path, or set the PKG_CONFIG environment variable
*** to the full path to pkg-config.
*** Or see to get pkg-config.
checking for glib-config... no
checking for glib12-config... no
checking for glib-config... no
checking for GLIB - version >= 1.2.6... no
*** The glib-config script installed by GLIB could not be found
*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GLIB_CONFIG environment variable to the
*** full path to glib-config.
configure: error: Test for glib failed.
GNU Midnight Commander requires glib 1.2.6 or above.


On trying to configure pkg-config:

./configure --prefix=/home/droidzone/myapps

./configure: line 13557: --exists: command not found
configure: error: pkg-config and "glib-2.0 >= 2.16" not found, please set GLIB_CFLAGS and GLIB_LIBS to the correct values or pass --with-internal-glib to configure
[email protected]:~/temp/pkg-config-0.27.1$ c

Now, pkg-config configures fine.


configure error

configure: error: linker with -z relro support required