* Documentation/machines.texi (MacOSX): Update (info from Markus Hitter).

* Documentation/README.Darwin: Clean up, simplify.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@20425 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2004-12-07 04:29:06 +00:00
parent a5a2c2faf2
commit ec11275548
3 changed files with 123 additions and 118 deletions

View file

@ -1,3 +1,10 @@
2004-12-06 Adam Fedor <fedor@gnu.org>
* Documentation/machines.texi (MacOSX): Update (info from Markus
Hitter).
* Documentation/README.Darwin: Clean up, simplify.
Sun Nov 7 04:18:39 2004 Nicola Pero <n.pero@mi.flashnet.it>
* tar-exclude-list: Use *.svn instead of .svn to have

View file

@ -1,5 +1,5 @@
Date : 15-Jan-2004
Last update: 20040727 (tested under Mac OS X 10.3 / Darwin 7)
Last update: 20041111 (tested under Mac OS X 10.3 / Darwin 7)
--> must be verified on x86-darwin-7, powerpc-apple-darwin-6
Authors: Adam Fedor <fedor@gnu.org>
Quentin Mathé <qmathe@club-internet.fr>
@ -18,8 +18,9 @@ work. (Must be verified)
COMMONLY USED SYMBOLS
---------------------
<> denotes a variable depending on your preferences. To be replaced with the
actual values from your system. For instance, if you installed gcc in /opt/local
<> denotes a variable depending on your preferences. To be replaced
with the actual values from your system. For instance, if you
installed gcc in /opt/local
./configure CC='<gcc install dir>/bin/gcc'
@ -39,31 +40,21 @@ actual values from your system. For instance, if you installed gcc in /opt/local
./configure --enable-graphics=art
POTENTIAL ERRORS WHEN RUNNING MAKE ESPECIALLY WITH BACK AND GUI
---------------------------------------------------------------
If you get errors like below, just do:
make clean
make
The second or the third time, the errors should disappear. It's probably due to
some potential issues between FSF GCC and the libtool/ld Mac OS X / Darwin
versions.
Linking subproject x11 ...
/usr/bin/ld: shared_obj/xdnd.o bad magic number (not a Mach-O file)
collect2: ld returned 1 exit status
make[3]: *** [shared_obj/subproject.o] Error 1
make[2]: *** [x11.all.subproject.variables] Error 2
make[1]: *** [libgnustep-back.all.bundle.variables] Error 2
make: *** [internal-all] Error 2
PRELIMINAIRES
-------------
For all targets, get the following software:
For all targets, get the following software. I'd recommend installing
Fink (and FinkCommander on MacOSX) to get all this software. If you
use Fink, you probably need to add this to your .bashrc or .profile
(or similar startup) file.
test -r /sw/bin/init.sh && . /sw/bin/init.sh
export DYLD_LIBRARY_PATH=/sw/lib:$DYLD_LIBRARY_PATH
Remember you usually need root access to install software. That means
when you see an instruction like 'make install', you usually need to
use sudo ('sudo make install') or be logged in as root (not
recommended).
libxml2 (Optional, highly recommended, already in Mac OS X 10.3 / Darwin 7)
libtiff (Required)
@ -73,23 +64,18 @@ libpng (Optional, highly recommended)
libffi (Required, only contained in the gcc distributions and pyobjc)
ffcall (On Darwin x86 - use instead of libffi)
Xfree86 (Required, already in Mac OS X 10.3/Darwin 7, to know more read below,
needed for 10.2 / Darwin 6 and earlier)
Xfree86 (Required, already in Mac OS X 10.3/Darwin 7)
libart2 (Optional, but required in the case you choose to use the art backend)
freetype2 (Optional, but required in the case you choose to use the art backend)
libart2 (Optional, but required for art backend)
freetype2 (Optional, but required for art backend)
dlcompat (Required, to be able to load bundles, included with Fink installation)
(No longer required with Mac OS X 10.3.5 or later)
dlcompat (Required, already in Mac OS X 10.3 or later)
Obtaining GNUstep
-----------------
The main GNUstep project pages tell you how to get hold of this. You can get the
latest release of the following libraries. However, since Mac OS X support is
currently evolving, we recommend that you get the latest snapshot or code from
CVS.
The main GNUstep project pages tell you how to get hold of this. You
can get the latest release of the following libraries.
You need these gnustep packages:
GNUstep-make
@ -113,50 +99,44 @@ gnu-gnu-gnu # gnu-objc runtime with gnustep-base and gnustep-gui. Most
apple-gnu-gnu # apple-objc runtime with gnustep libraries. Does currently
# not work
apple-apple-gnu # Apple Foundation with gnustep-gui on the top. Only of
# academically interest.
# academic interest.
apple-apple-apple # Cocoa with GNUstep additions. For porting GNUstep apps to
# Cocoa.
All gnu-*-apple library combos are purely theoretical and only available to the
folks inside Apple since no mortal person ever saw the Cocoa source code. ;-)
You can use either the Apple compiler or compile your own FSF compiler. This
potentially gives two different targets:
All gnu-*-apple library combos are purely theoretical and only
available to the folks inside Apple since no mortal person ever saw
the Cocoa source code. ;-) You can use either the Apple compiler or
compile your own FSF compiler. This potentially gives two different
targets:
Apple GCC, gnu-gnu-gnu
FSF GCC, gnu-gnu-gnu
Unfortunately, using Apple GCC with gnu-gnu-gnu doesn't appear to work currently
(see below for more info), so this option really isn't open now.
In addition, if you are on Mac OS X, you can also use the Apple Foundation and
AppKit frameworks to do GNUstep development with Cocoa, but this only works with
the Apple compiler:
Unfortunately, using Apple GCC with gnu-gnu-gnu doesn't appear to work
currently (see below for more info), so this option really isn't open
now. In addition, if you are on Mac OS X, you can also use the Apple
Foundation and AppKit frameworks to do GNUstep development with Cocoa,
but this only works with the Apple compiler:
Apple GCC, apple-apple-apple
GNUstep on Darwin x86
---------------------
For GNUstep on Darwin x86, Apple GCC compiles GNUstep-base, but causes strange
problems when running programs (e.g. the program hangs while allocating memory
or executes methods multiple times). So we have to use FSF GCC.
Additionally, libffi has not been ported to Darwin x86, so you will need to
install ffcall instead.
ffcall (ftp://ftp.gnustep.org/pub/gnustep/libs or
ftp://ftp.santafe.edu/pub/gnu/ffcall-1.9.tar.gz)
See instructions below for building ffcall.
For GNUstep on Darwin x86, Apple GCC compiles GNUstep-base, but causes
strange problems when running programs (e.g. the program hangs while
allocating memory or executes methods multiple times). So we have to
use FSF GCC. Additionally, libffi has not been ported to Darwin x86,
so you will need to install ffcall instead.
GNUstep on Darwin PowerPC
-------------------------
Haven't been able to get Apple GCC on Mac OS X 10.2 / Darwin 6 to compile
GNUstep-base. The compiler crashes with various errors. You need the FSF GCC
compiler here. You need at least version 3.3.2. (While version 3.3.2 works, it
will not install libffi)
Haven't been able to get Apple GCC on Mac OS X 10.2 / Darwin 6 to
compile GNUstep-base. The compiler crashes with various errors. You
need the FSF GCC compiler here. You need at least version 3.3.2.
Version 3.3.5 seems to cause the fewest headaches, even compared to
later versions.
Building FSF-GCC
----------------
@ -200,9 +180,8 @@ ln -s libobjc.a libobjc.dylib # So the linker sees us
Setting up the GNUstep make environment
---------------------------------------
In the GNUstep-make (core/make) package, do
with bourne shell like bash (Mac OS X 10.3):
In the GNUstep-make (core/make) package, do with bourne shell like
bash (Mac OS X 10.3):
echo 'export CC=<gcc install dir>/bin/gcc' >> ~/.profile
@ -217,8 +196,9 @@ then:
./configure --with-library-combo=gnu-gnu-gnu [--prefix=<GNUstep install dir>] \
[CC='<gcc install dir>/bin/gcc']
(apple-apple-apple is the default if you don't specify gnu-gnu-gnu). If you want
to be able to compile for different targets/platforms together. Do this:
(apple-apple-apple is the default if you don't specify
gnu-gnu-gnu). If you want to be able to compile for different
targets/platforms together. Do this:
./configure --with-library-combo=gnu-gnu-gnu --disable-flattened \
--enable-multi-platform [--prefix=<GNUstep install dir>] \
@ -232,9 +212,8 @@ make install
Building and installing libobjc (target Apple GCC, gnu-gnu-gnu only !!!)
-------------------------------
Warning ! Don't compile libobjc if you are using FSF GCC.
Go to gnustep-objc (or from CVS, into dev-libs/libobjc), and type:
Warning ! Don't compile libobjc if you are using FSF GCC. Go to
gnustep-objc (or from CVS, into dev-libs/libobjc), and type:
make install
@ -252,11 +231,10 @@ cd libffi-build
make
make install
Note: the lastest 3.4 snapshot doesn't seem to have a working libffi on Mac OS X
/ Darwin.
Use PyObjC libffi from http://pyobjc.sourceforge.net, in the case GNUstep-base
install doesn't work with the 3.4 snapshot.
Note: the lastest 3.4 snapshot doesn't seem to have a working libffi
on Mac OS X / Darwin. Use PyObjC libffi from
http://pyobjc.sourceforge.net, in the case libffi install
doesn't work with the 3.4 snapshot.
mkdir libffi-build
cd libffi-build
@ -279,26 +257,6 @@ Now you can now build and install it simply by typing:
make
make install
Additional libraries
--------------------
Build and install and additional libraries listed above. You can also get them
via Fink (http://fink.sourceforge.net) or DarwinPorts
(http://darwinports.opendarwin.org/) and sometimes they are already present on
Mac OS X.
And to have the additional libraries taken in account by the Mac OS X / Darwin
linker with bourne shell like bash (Mac OS X 10.3), here is an example with Fink
obtained libraries:
echo 'export DYLD_LIBRARY_PATH=<gcc install dir>/lib:/sw/lib:$DYLD_LIBRARY_PATH'
>> ~/.profile
with c shell like tcsh (Mac OS X 10.2):
echo 'setenv DYLD_LIBRARY_PATH <gcc install dir>/lib:/sw/lib:$DYLD_LIBRARY_PATH'
>> ~/.tcshrc
Source GNUstep.sh
-----------------
@ -369,9 +327,9 @@ Example with Fink:
Building and installing GNUstep-back
------------------------------------
Warning ! You must have installed X11User.pkg from the Panther install disc and
also X11SDK.pkg from the xCode Tools install disc to be able to compile
GNUstep-back under Mac OS X 10.3.
Warning ! You must have installed X11User.pkg from the Panther
install disc and also X11SDK.pkg from the xCode Tools install disc to
be able to compile GNUstep-back under Mac OS X 10.3.
If you aren't installing GNUstep under Mac OS X 10.3 / Darwin 7, you can use
XDarwin (ftp://ftp.xfree86.org/pub/XFree86/4.3.0/binaries/Darwin-ppc-6.x/) for
@ -383,9 +341,9 @@ In the back directory, type:
make
make install
In the case, you choose to use the art backend, you will need to have the
freetype2 and libart2 libraries installed, first be sure to have libart2 in your
path, for example, with Fink installation type:
In the case, you choose to use the art backend, you will need to have
the freetype2 and libart2 libraries installed, first be sure to have
libart2 in your path, for example, with Fink installation type:
export DYLD_LIBRARY_PATH=/sw/lib:$DYLD_LIBRARY_PATH
@ -395,23 +353,42 @@ Then you should be able to configure back and install it.
make
make install
You also need to have /sw/lib in your library path before running GNUstep apps
with the art backend, as it needs to find libart2, so put the above export
DYLD_LIBRARY_PATH somewhere in your .profile (or do the export before launching
an application) [see the above "Additional Libraries" section].
The backend architecture which GNUstep-gui is built upon, has been written to be
used within X Windows, then you need to start up an X Server (like Apple X11) to
run the GNUstep-gui applications.
You also need to have /sw/lib in your library path before running
GNUstep apps with the art backend, as it needs to find libart2, so put
the above export DYLD_LIBRARY_PATH somewhere in your .profile (or do
the export before launching an application). The backend architecture
which GNUstep-gui is built upon, has been written to be used within X
Windows, then you need to start up an X Server (like Apple X11) to run
the GNUstep-gui applications.
Warning ! With the art backend, before to launch applications based on
GNUstep-gui, in the shell, don't forget to edit the defaults (no need it to redo
it later) :
GNUstep-gui, in the shell, don't forget to edit the defaults (no need
it to redo it later) :
defaults write NSGlobalDomain XWindowBufferUseXShm NO
because Apple X11 doesn't support well shared memory for buffering (wich libart2
uses by default).
because Apple X11 doesn't support well shared memory for buffering
(wich libart2 uses by default).
POTENTIAL ERRORS WHEN RUNNING MAKE ESPECIALLY WITH BACK AND GUI
---------------------------------------------------------------
If you get errors like below, just do:
make clean
make
The second or the third time, the errors should disappear. It's probably due to
some potential issues between FSF GCC and the libtool/ld Mac OS X / Darwin
versions.
Linking subproject x11 ...
/usr/bin/ld: shared_obj/xdnd.o bad magic number (not a Mach-O file)
collect2: ld returned 1 exit status
make[3]: *** [shared_obj/subproject.o] Error 1
make[2]: *** [x11.all.subproject.variables] Error 2
make[1]: *** [libgnustep-back.all.bundle.variables] Error 2
make: *** [internal-all] Error 2
More informations on the art backend
------------------------------------

View file

@ -128,6 +128,12 @@ directory for complete instructions.
@node Darwin/PowerPC, Debian/DEC-Alpha, Darwin/ix86, Machine Specific
@section Darwin/PowerPC
This section is for building the complete GNUstep system.
This system will not interact at all with Mac OS X/Cocoa. It uses different
complilers, different display systems, etc. For building GNUstep extensions
to be used with Mac OS X (for instance, if you want to build something based
on GNUstep, such as GSWeb or GNUMail, see the MacOSX/PowerPC section).
Currently tested on Darwin 6.x, 7.x
@table @var
@ -351,11 +357,17 @@ No libffi-support: Use ffcall
@node MacOSX/PowerPC, MkLinux/PowerPC, Irix 6.5/MIPS, Machine Specific
@section MacOSX/PowerPC
Currently tested on MacOSX 10.2, 10.3
This section is for building the GNUstep extensions only.
Use this if, for instance, if you want to build something based
on GNUstep, such as GSWeb or GNUMail. If you want to build the complete
GNUstep system independant of Mac OS X, see the Darwin/PowerPC section.
Currently tested on MacOSX 10.1.5, 10.2, 10.3
@table @var
@item Recommended compiler
Default.
Default. For 10.1.5, you need to add -no-cpp-precomp to CFLAGS
(For instance, ./configure CFLAGS="-no-cpp-precomp" ...)
@item Extra libs needed
None.
@ -363,18 +375,27 @@ None.
@item Special Instructions
By default, on Mac OS X, only the GNUstep extensions are built. This
is if you want to build gdl2, etc on Mac OS X. Xcode project files
exist, but they may not be up-to-date. Try:
exist, but they may not be up-to-date. Make sure /usr/sbin is in your
path:
@example
PATH=$PATH:/usr/sbin
@end example
Then type:
@example
cd make
./configure --with-library-combo=apple-apple-apple
make install
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
cd ../base
./configure --with-xml-prefix=/usr --disable-xmltest
make debug=yes install
@end example
On Mac OS X 10.1.5, there is no libxml. Either install libxml2
or configure base with --disable-xml.
@end table
See also the Darwin/PowerPC section.