[Vala] How to compile glib using MingW under Windows
- From: raum no-log org
- To: vala-list gnome org
- Subject: [Vala] How to compile glib using MingW under Windows
- Date: Wed, 26 Sep 2012 15:50:00 +0200
Hello,
I've tried to compile libgee but it depends to glib... :-/
So, how to compile glib for Vala ?!?
Reference site : http://www.mingw.org/wiki/Bootstrapping_GLIB_with_MinGW
For information, I've relocated my precdedent "vala-src" directory in
"/src" directory. I've modified msys/etc/fstab to :
c:/vala-build/mingw /mingw
c:/vala-build/vala-0.18 /vala
c:/vala-build/src /src
c:/vala-build/mingw/lib /usr/lib
c:/vala-build/build /build
1/ Install few more libs
At first, we need to install these packages :
libstdc++-4.6.2-1-mingw32-dll-6.tar.lzma
libgcc-4.6.2-1-mingw32-dll-1.tar.lzma (for libgcc_s_dw2-1.dll)
mmingwrt-3.20-mingw32-dev.tar.gz (for crt2.o)
libz-1.2.7-1-mingw32-dev.tar.lzma
libz-1.2.7-1-mingw32-dll-1.tar.lzma
gettext-0.18.1.1-2-mingw32-dev.tar.lzma
gettext-0.18.1.1-2-mingw32-bin.tar.lzma
libgettextpo-0.18.1.1-2-mingw32-dll-0.tar.lzma (for libgettextsrc-0-18-1.dll)
libexpat-2.0.1-1-mingw32-dll-1.tar.gz
(some links :
http://sourceforge.net/projects/mingw/files/MinGW/Extension/zlib/zlib-1.2.7-1/libz-1.2.7-1-mingw32-dev.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW/Extension/zlib/zlib-1.2.7-1/libz-1.2.7-1-mingw32-dll-1.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW/Base/gettext/gettext-0.18.1.1-2/gettext-0.18.1.1-2-mingw32-dev.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW/Base/gettext/gettext-0.18.1.1-2/gettext-0.18.1.1-2-mingw32-bin.tar.lzma/download
http://sourceforge.net/projects/mingw/files/MinGW/Base/gettext/gettext-0.18.1.1-2/libgettextpo-0.18.1.1-2-mingw32-dll-0.tar.lzma/download
)
2/ Compile & install FFI lib from tarball
And glib need libffi, so we need to download libffi package.
"FFI stands for Foreign Function Interface. A foreign function interface
is the popular name for the interface that allows code written in one
language to call code written in another language."
Link : ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
(alt link:
http://ftp.gwdg.de/pub/linux/sources.redhat.com/libffi/libffi-3.0.11.tar.gz)
# cd /src/libffi-3.0.11/
# ./configure --prefix=/build
# make
# make install
Then move files into c:/vala-build/mingw.
3/ Compile & install glib
Download lastest release and extract to c:/vala-build/:
http://ftp.gnome.org/pub/GNOME/sources/glib/2.34/glib-2.34.0.tar.xz
And now :
# cd /src/glib-2.34.0
// I don't want to use pkg-config for libffi
/src/glib-2.34.0# export LIBFFI_CFLAGS='-I /mingw/lib/libffi-3.0.11/include'
/src/glib-2.34.0# export LIBFFI_LIBS=-lffi
/src/glib-2.34.0# export CFLAGS="-O0 -g -pipe -Wall -march=i686
-mms-bitfields -mthreads"
/src/glib-2.34.0# ./configure --prefix=/build --with-pcre=internal
--enable-silent-rules --disable-modular-tests --disable-static
(perhaps we need these variables...not sure)
export CPPFLAGS="-DG_ATOMIC_OP_USE_GCC_BUILTINS=1"
export LDFLAGS="-Wl,--enable-auto-image-base"
export lt_cv_deplibs_check_method="pass_all"
()
/src/glib-2.34.0# make
/src/glib-2.34.0# make install
And that's probably all...
Have fun
Regards
Raum
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]