Updated MinGW building instructions, fixed building gnustep-base on MinGW

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@29861 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2010-03-06 21:13:58 +00:00
parent 21162acb26
commit 66d819e592
3 changed files with 93 additions and 45 deletions

View file

@ -1,3 +1,11 @@
2010-03-06 Nicola Pero <nicola.pero@meta-innovation.com>
* target.make (SHARED_LIB_LINK_CMD): On MinGW, pass
--export-all-symbols to the linker. This fixes building
gnustep-base on MinGW with more recent libraries.
* Documentation/README.MinGW: Updated instructions to work with
more recent versions - up to building gnustep-base.
2010-03-06 Nicola Pero <nicola.pero@meta-innovation.com>
* Instance/Documentation/javadoc.make (JAVADOC_BUILD_ALWAYS):

View file

@ -1,5 +1,5 @@
Date: 28-Feb-2007 (tested under Windows XP)
Update: 05-Dec-2008
Update: 06-Mar-2010
Author: Nicola Pero <nicola.pero@meta-innovation.com>
after Richard Frith-Macdonald <rfm@gnu.org> and others
@ -75,7 +75,7 @@ A. STEP BY STEP INSTALLATION INSTRUCTIONS
1. Install MinGW
================
Download MinGW-5.1.4.exe from
Download MinGW-5.1.6.exe from
http://sourceforge.net/projects/mingw
@ -93,8 +93,9 @@ PS: Earlier versions of MinGW might not work.
2. Install msys
===============
Download MSYS-1.0.10 following the links in
http://www.mingw.org/download.shtml. Install it into C:/xxx/msys/1.0
Download MSYS-1.0.11.exe following the links in
http://www.mingw.org/download.shtml. Execute and install it into
C:/xxx/msys/1.0
The postinstall script should ask you for the mingw location, then
detect it and be happy that it's there and all is setup properly.
@ -142,17 +143,42 @@ From this window we can now start building things.
If you want to install GNUstep from Subversion, you need a Subversion
client. I used
http://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe
and then installed subversion in a random directory. Then you can run
svn.exe from the MS-DOS console (or the MSYS one).
http://www.sliksvn.com/pub/Slik-Subversion-1.6.9-win32.msi and then
installed subversion in a random directory. Then you can run svn.exe
from the MS-DOS console (or the MSYS one).
If you need Emacs, get a Windows version from
ftp://ftp.gnu.org/gnu/emacs/windows/emacs-21.3-bin-i386.tar.gz. To
ftp://ftp.gnu.org/gnu/emacs/windows/emacs-23.1-bin-i386.zip. To
install it, simply unpack it in your home directory, you can now
execute the binary in 'bin'.
6. Obtaining GNUstep
6. Installing pthreads
======================
GNUstep-base now requires a pthreads API. So you'll have to get one
and install it (if you're using an old version of gnustep-base, this
may not be necessary).
Get
libpthreads-2.8.0-3-mingw32-dll-2.tar.lzma
pthreads-w32-2.8.0-3-minfw32-dev.tar.lzma
from
http://sourceforge.net/projects/mingw
Uncompress them in your mingw tree --
mv libpthreads-2.8.0-3-mingw32-dll-2.tar.lzma /mingw
mv pthreads-w32-2.8.0-3-minfw32-dev.tar.lzma /mingw
cd /mingw
tar --extract --verbose --lzma --file libpthreads-2.8.0-3-mingw32-dll-2.tar.lzma
tar --extract --verbose --lzma --file pthreads-w32-2.8.0-3-minfw32-dev.tar.lzma
7. Obtaining GNUstep
====================
The main GNUstep project pages tell you how to get hold of this. You
@ -163,12 +189,12 @@ snapshot or code from SVN.
svn co http://svn.gna.org/svn/gnustep/modules/core
7. Installing gnustep-make
8. Installing gnustep-make
==========================
go in core/make and do
./configure --with-layout=fhs
./configure --with-layout=fhs --with-thread-lib=-lpthread
make
make install
@ -177,8 +203,11 @@ don't need to do anything to set up your environment. You could use
the standard 'gnustep' layout instead, in which case you need to
source GNUstep.sh to run stuff.
We also need to force -lpthread which is not currently the default on
Windows.
8. setup your GNUstep environment
9. setup your GNUstep environment
=================================
Nothing to do here since we're using the fhs native layout.
@ -187,7 +216,7 @@ But if at some point something doesn't work for you, try using
export GNUSTEP_MAKEFILES=/usr/local/share/GNUstep/Makefiles
9. Installing gnustep-objc
10. Installing gnustep-objc
==========================
Download gnustep-libobjc (you can find it at
@ -195,59 +224,56 @@ http://www.gnustep.org/resources/downloads.php, or use subversion:
svn co http://svn.gna.org/svn/gnustep/libs/libobjc/trunk),
and compile it:
make
make install
make THREADING=posix
make THREADING=posix install
10. Reinstalling gnustep-make
11. Reinstalling gnustep-make
=============================
Go in core/make and reconfigure/recompile again so that gnustep-objc
is detected:
make distclean
./configure --with-layout=fhs
./configure --with-layout=fhs --with-thread-lib=-lpthread
make
make install
gnustep-make should have detected your custom libobjc.
11. Installing libffi
12. Installing libffi
=====================
Download libffi-3.0.1.tar.gz from the GNUstep website, unpack it, compile and install:
Download libffi-3.0.9.tar.gz from the GNUstep website, unpack it, compile and install:
cd libffi-3.0.1
cd libffi-3.0.9
./configure --prefix=/mingw
make
make install
mv /mingw/lib/libffi*/include/* /mingw/include
mv /mingw/lib/libffi-3.0.9/include/* /mingw/include/
(if you get a popup about contest.exe failing, just ignore it)
NB. The headers have to be moved manually because the package won't install
them in the right place.
(FIXME: Wouldn't it make more sense to install libffi into /usr/local
instead of /mingw ?)
12. Installing additional packages
13. Installing additional packages
==================================
Download the following packages:
libintl-0.14.4.bin.zip
libintl-0.14.4.lib.zip
libintl-0.14.4.exe
libiconv-1.9.2-1.exe
zlib-1.2.3.exe
libiconv-1.9.2-1-bin.zip
libiconv-1.9.2-1-lib.zip
from http://gnuwin32.sourceforge.net, and install them. To install
them, execute the installer, and select C:\xxx\msys\1.0\mingw\ as the
installation directory. Do a full install and do not create any
shortcuts in the menu or desktop.
zlib-1.2.3-bin.zip
zlib-1.2.3-lib.zip
from http://gnuwin32.sourceforge.net, and install them. To
install them, simply unzip them into /C/xxx/msys/1.0/mingw.
13. Installing SSL support (Optional)
14. Installing SSL support (Optional)
=====================================
(Optional) if you want to use the SSL support built in gnustep-base
@ -263,32 +289,38 @@ files being installed in each of the bin lib and include
subdirectories so that they can be found by gnustep-base-2.1.15 or
later.
TODO: Add instructions for openssl.
TODO: OpenSSL instructions.
14. XML support
15. XML support
===============
You need to get the source code for libxml2 and build it yourself.
Download the libxml2 source from http://www.xmlsoft.org.
I used libxml2-2.6.32.tar.gz
I used libxml2-2.7.6.tar.gz
Unpack the source, change into the directory and do the usual routine --
cd libxml2-2.6.32
cd libxml2-2.7.6
./configure
make
make install
(you can safely ignore the warning about not being able to remove
libtoolT during configure).
You should now have libxml2 installed on your system.
IMPORTANT: Do *not* install libxslt. It has been reported that
libxslt is currently built in the wrong way and will prevent anything
from linking correctly if you try to use it.
(FIXME: Check if we can now install libxslt)
14. Installing gnustep-base
16. Installing gnustep-base
===========================
Go in gnustep-base, and type
@ -301,8 +333,10 @@ At this point, you should be able to compile and run any non-gui tool
and library (to check this try, for example, 'defaults read'). The
next steps are only required for gui applications.
<NICOLA: Updated on 06-03-2010 up to here>
15. Installing gui additional packages
17. Installing gui additional packages
======================================
For the gui, download and install the following packages:
@ -323,7 +357,7 @@ The process is always the same: download the zip file from the
gnuwin32 website, then unzip them into /C/xxx/msys/1.0/mingw.
16. Installing gnustep-gui
18. Installing gnustep-gui
==========================
Go in the gui, and type:
@ -333,7 +367,7 @@ Go in the gui, and type:
make install
17. Installing gnustep-back
19. Installing gnustep-back
===========================
Go in back, and type:
@ -343,7 +377,7 @@ Go in back, and type:
make install
18. Testing your gui installation
20. Testing your gui installation
=================================
Go in a simple gui application (examples/gui a very good starting

View file

@ -868,12 +868,18 @@ endif
ifeq ($(findstring mingw32, $(GNUSTEP_TARGET_OS)), mingw32)
shared = yes
HAVE_SHARED_LIBS = yes
# This command links the library, generates automatically the list of
# symbols to export, creates the DLL (eg, obj/gnustep-base-1_13.dll) and
# the import library (eg, obj/libgnustep-base.dll.a).
# symbols to export, creates the DLL (eg, obj/gnustep-base-1_13.dll)
# and the import library (eg, obj/libgnustep-base.dll.a). We pass
# --export-all-symbols to make sure it is always used. Otherwise,
# while it is the default, it might silently get disabled if a symbol
# gets manually exported (eg, because a header of a library we include
# exports a symbol by mistake).
SHARED_LIB_LINK_CMD = \
$(LD) $(SHARED_LD_PREFLAGS) -shared \
-Wl,--enable-auto-image-base \
-Wl,--export-all-symbols \
-Wl,--out-implib,$(LIB_LINK_OBJ_DIR)/$(LIB_LINK_VERSION_FILE) \
$(ALL_LDFLAGS) -o $(LIB_LINK_OBJ_DIR)/$(LIB_LINK_DLL_FILE) $^ \
$(INTERNAL_LIBRARIES_DEPEND_UPON) \