Tag Archives: GLIB

Get the source:

mkdir ~/sources && cd ~/sources

wget http://ftp.gnu.org/gnu/mc/mc-4.6.1.tar.gz

tar -xvvf mc-4.6.1.tar.gz
cd ~/sources/mc-4.6.1
./configure –prefix=/home/droidzone/myapps

Error:
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 http://www.freedesktop.org/software/pkgconfig 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.

So install pkg-config:
cd ~/sources
wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.1.tar.gz
tar -xvvf pkg-config-0.27.1.tar.gz
cd pkg-config-0.27.1/
./configure –prefix=/home/droidzone/myapps –with-internal-glib
make && make install

Confirm that it works:
[email protected]:~/sources/pkg-config-0.27.1$ which pkg-config
/home/droidzone/myapps/bin/pkg-config

Now retry installing mc:
cd ~/sources/mc-4.6.1
./configure –prefix=/home/droidzone/myapps

Error:
checking for pkg-config… /home/droidzone/myapps/bin/pkg-config
checking for glib-2.0… 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.

Ok, install glib now:
cd ~/sources
wget http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.34/glib-2.34.0.tar.xz
tar -Jxvvf glib-2.34.0.tar.xz
cd glib-2.34.0/
./configure –prefix=/home/droidzone/myapps

Error:
checking for inflate in -lz… no
configure: error: *** Working zlib library and headers not found ***

cd ~/sources
wget http://zlib.net/zlib-1.2.7.tar.gz
tar -xvvf zlib-1.2.7.tar.gz
cd zlib-1.2.7/
./configure –prefix=/home/droidzone/myapps
make && make install

Now retried glib installation, to be met with another error:
checking for LIBFFI… no
configure: error: Package requirements (libffi >= 3.0.0) were not met:

No package ‘libffi’ found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

wget ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
tar -xvvf
cd libffi-3.0.11
./configure –prefix=/home/droidzone/myapps
make && make install
———————————————————————-
Libraries have been installed in:
/home/droidzone/myapps/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
– add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
– add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
– use the `-Wl,-rpath -Wl,LIBDIR’ linker flag
– have your system administrator add LIBDIR to `/etc/ld.so.conf’

export LD_LIBRARY_PATH=/home/droidzone/myapps/lib

Rerying glib config:
checking for msgfmt… no
configure: error:
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html

Gettext make led to errors:
/home/droidzone/myapps/lib/libncurses.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [libgettextlib.la] Error 1
make[4]: Leaving directory `/home/droidzone/sources/gettext-0.18.1.1/gettext-tools/gnulib-lib’
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/droidzone/sources/gettext-0.18.1.1/gettext-tools/gnulib-lib’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/droidzone/sources/gettext-0.18.1.1/gettext-tools’
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/droidzone/sources/gettext-0.18.1.1/gettext-tools’
make: *** [all-recursive] Error 1
[email protected]:~/sources/gettext-0.18.1.1$

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
wget http://ftp.gnu.org/pub/gnu/emacs/emacs-24.2.tar.gz
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 Goo.im 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
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
tar -xvvf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --prefix=/home/droidzone/myapps
make
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
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 http://www.freedesktop.org/software/pkgconfig 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.

Glibc..

configure error

configure: error: linker with -z relro support required