[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *Any* way to getting GNUstep on a G4 ???
From: |
M. Uli Kusterer |
Subject: |
Re: *Any* way to getting GNUstep on a G4 ??? |
Date: |
Thu, 28 Oct 2004 02:06:48 +0200 |
User-agent: |
MT-NewsWatcher/3.4 (PPC Mac OS X) |
In article <mailman.5310.1098807185.2017.discuss-gnustep@gnu.org>,
Fabien VALLON <fabien@sonappart.net> wrote:
> I installed GNUstep under MacOSX last month and it works (without
> sound, with back-xlib)
You mean with Apple's GCC? Everybody told me that wouldn't work and
that I had to compile my own GCC, which is where everything failed last
time, I think. I got some weird errors
> I just follow the gcc & GNUstep HOWTO/FAQ
Is there a new HOWTO or something?
> What are your problem exactly ?
NB - This was under Jaguar back then. Haven't tried it on Panther yet,
because I thought that installing a Linux would be an easier way ... the
best laid plans of mice and men...
Okay, the error I got was:
> Compiling file NSNumber11.m ...
> Compiling file NSNumber12.m ...
> Linking library libgnustep-base ...
> ld: /usr/local/lib/libffi.a(darwin.o) section's (__TEXT,__eh_frame)
> type S_REGULAR does not match previous objects type S_COALESCED
> ld: /usr/local/lib/libffi.a(darwin.o) section's (__TEXT,__eh_frame)
> type S_REGULAR does not match previous objects type S_COALESCED
> ld: /usr/local/lib/libffi.a(darwin_closure.o) section's
> (__TEXT,__eh_frame) type S_REGULAR does not match previous objects type
> S_COALESCED
> /usr/bin/libtool: internal link edit command failed
> Making all in SSL...
> make[1]: Nothing to be done for `all'.
> Making all in Tools...
> Making all for tool autogsdoc...
> Compiling file autogsdoc.m ...
> Compiling file AGSParser.m ...
> Compiling file AGSOutput.m ...
> AGSOutput.m: In function `-[AGSOutput split:]':
> AGSOutput.m:1846: Warnung: `c' might be used uninitialized in this
> function
> Compiling file AGSIndex.m ...
> Compiling file AGSHtml.m ...
> AGSHtml.m: In function `-[AGSHtml outputNode:to:]':
> AGSHtml.m:1578: Warnung: unused variable `tmp'
> Linking tool autogsdoc ...
> /usr/bin/ld: can't locate file for: -lgnustep-base
> collect2: ld returned 1 exit status
> make[2]: *** [shared_obj/autogsdoc] Error 1
> make[1]: *** [autogsdoc.all.tool.variables] Error 2
> make: *** [internal-all] Error 2
Here's my "diary" of what I did back then:
GETTING GNUSTEP:
First, go to http://www.gnustep.org and download the newest versions of
GNUstep. You need "Gnustep gui", "Gnustep make", "Gnustep base" and
"Gnustep back".
Then, go to http://www.gnu.org and download a new version of GCC. You
need at least GCC 3.3.2 to compile Gnustep. You'll need the GCC core,
GCC ObjC ("Objective C" support). You'll also need GCC Java, but you
need at least version 3.4 (if 3.4 isn't final yet, take a 3.4 version
from the "snapshots" directory that is at least from 2003-11-05). GCC
Java is needed for "libffi" (that's used for IMPs and NSInvocation), and
you also need the Java part of the package if you intend to use
Distributed Objects. I've also DLed the gnustep examples and Gorm. We'll
see what good it'll do me.
You may also want to download the Installation instructions for Darwin
from gnu.org now and save them somewhere on your hard disk, that way you
can go offline for the rest of the installation. If you can't find it,
the link is called "host/target specific installation notes".
gnustep-make-1.8.0.tar.gz
gnustep-gui-0.9.0.tar.gz
gnustep-back-0.9.0.tar.gz
gnustep-base-1.8.0.tar.gz
gcc-core-3.3.2.tar.gz
gcc-objc-3.3.2.tar.gz
gcc-java-3.4-20031105.tar.bz2
gnustep-examples-0.9.7.tar.gz
Gorm-0.4.0.tar.gz
Stash the files in one folder, so it's easier to clean up later. I chose
/Users/witness/GNUstep. You'll also need a copy of the "dlcompat"
library, e.g. from http://www.opendarwin.org/projects/dlcompat/ Now
bring up Terminal.app to unpack the files:
[octavo:~/GNUstep] witness% tar xfvz gcc-core-3.3.2.tar.gz
Do this for all the archives in there (note that you can drag a file
into the Terminal window to have the file's path pasted into the window
at the cursor position.
Note that unpacking may take a minute or two for some of the packages.
If you get an error message "gzip: stdin: not in gzip format", your file
is either damaged, or you have a bzip2 archive (like the gcc-java
snapshot). In that case, you'll have to unpack and untar it separately
using:
[octavo:~/GNUstep] witness% bunzip2 gcc-java-3.4-20031105.tar.bz2
[octavo:~/GNUstep] witness% tar xfv gcc-java-3.4-20031105.tar
INSTALLATION
Next, copy the "libffi" directory from the GCC 3.4 folder that last
action produced into the GCC 3.2.2 folder the commands before that
produced. You can do this using the Finder, or you can do it using a
Unix command like
[octavo:~/GNUstep] witness% cp -r gcc-3.4-20031105/libffi gcc-3.3.2
Now we need the Darwin installation instructions you downloaded. As
described in there, open the file "gcc-3.3.2/gcc/config/darwin.h": Since
GNUstep expects the GNU Objective-C runtime, but GCC on Darwin defaults
to Apple's ObjC runtime. You need to go to the line that says "#define
NEXT_OBJC_RUNTIME" and change it to read "#undef NEXT_OBJC_RUNTIME". You
can use any text editor for this, whether it's SubEthaEdit, TextEdit,
Project Builder, pico or vi.
It also says there to increase the stack limit. So, as described there,
type into the terminal:
[octavo:~/GNUstep] witness% limit stack 800
Next, create a new gcc332 folder in your GNUstep folder. Again, you can
use the Finder, or the command-line commands:
[octavo:~/GNUstep] witness% mkdir gcc332
This is the folder in which the configure script will create a nice
distribution with all the files needed for building on our platform, and
it'll set up a makefile that does everything needed for compiling GCC on
OS X as well.
Make that new folder the current directory using "cd", and then run the
"configure" script in the (downloaded) gcc-3.3.2 folder. Since we don't
want it to overwrite our existing Apple GCC, we set the install prefix
(which specifies the folder where it will be installed) to
/usr/local/gcc-3.3.2 instead of the default /usr/local/gcc. We also need
to tell configure to compile for POSIX threads (??WHY?? Is there another
option that's picked by default on the Mac? Is this GNUstep-specific?)
We do this using the following commands:
[octavo:~/GNUstep] witness% cd gcc332/
[octavo:~/GNUstep/gcc332] witness% ../gcc-3.3.2/configure
--prefix=/usr/local/gcc-3.3.2 --enable-threads=posix
Note that this may complain about being unable to build libffi -- that's
okay. Once configure has installed the stuff needed to build our GCC as
per our directions into your brand-spankin'-new gcc332 folder (which
takes about 2 to 3 minutes), we simply run the GNU make command on it:
[octavo:~/GNUstep] witness% make bootstrap-lean
(??WHY?? What other options would we have? I guess this builds the
smallest version? And what does "bootstrap" mean in this context?) This
can take about half an hour, so get yourself something to do.
Once that is done, you'll have to install the built compiler. You do
that using
[octavo:~/GNUstep] witness% sudo make install
Now that the compiler has been installed, you have to make it possible
to call this compiler from the command line. To do that, we'll create a
symbolic link (a Unix-style Alias) in /usr/bin/, which is one of the
places where the Terminal looks for command-line tools. We do this using
the "ln" command with the option "-s" as in Symlink:
[octavo:~/GNUstep] witness% cd /usr/bin/
[octavo:/usr/bin] witness% sudo ln -s /usr/local/gcc-3.3.2/bin/gcc
gcc332
Also, since the linker tends to (wrongly) look for Apple's Objective C
library, we'll also create a symbolic link to our GNU Objective C
library with the same name as the Apple library:
[octavo:~/GNUstep] witness% cd /usr/local/gcc-3.3.2/lib
[octavo:/usr/local/gcc-3.3.2/lib] witness% sudo ln -s libobjc.a
libobjc.dylib
Then we set up the environment variable "CC" so future calls to "make"
will use our new GCC instead of Apple's:
[octavo:~/GNUstep/gcc332/libffi] witness% setenv CC gcc332
Now we need to build libffi, which didn't work during the initial
compile. For that, we first create a "libffi" folder inside our gcc332
folder:
[octavo:local/gcc-3.3.2/lib] witness% mkdir ~/GNUstep/gcc332/libffi
[octavo:~/GNUstep/gcc332] witness% cd ~/GNUstep/gcc332/libffi
Then we configure it into that folder and make/make install it:
[octavo:~/GNUstep/gcc332/libffi] witness%
../../gcc-3.3.2/libffi/configure
[octavo:~/GNUstep/gcc332/libffi] witness% make
[octavo:~/GNUstep/gcc332/libffi] witness% sudo make install
[octavo:~/GNUstep/gcc332/libffi] witness% make ffitest
[octavo:~/GNUstep/gcc332/libffi] witness% ./ffitest
Don't be disappointed if the "make ffitest" and "./ffitest" fails.
Apparently, make sometimes has a bad day (???WHY???).
Now we need to install dlcompat. This works analogously to installing
libffi. Just configure, make, make install:
[octavo:~] witness% cd ~/GNUstep/dlcompat-20030629/
[octavo:~/GNUstep/dlcompat] witness% ./configure
[octavo:~/GNUstep/dlcompat-20030629] witness% make
[octavo:~/GNUstep/dlcompat-20030629] witness% sudo make install
Okay. Now we can *finally* get going with any GNUstep-related stuff:
First, we'll do GNUstep make. "cd" to the gnustep-make-1.8.0 folder And
a configure and make install:
[octavo:~/GNUstep/gnustep-make-1.8.0] witness% ./configure
prefix=/usr/local/GNUstep --with-library-combo=gnu-gnu-gnu
[octavo:~/GNUstep/gnustep-make-1.8.0] witness% make
[octavo:~/GNUstep/gnustep-make-1.8.0] witness% sudo make install
Note that you can choose pretty much any path ending in /GNUstep as the
prefix, and this is the location where your files will end up.
Next, we have to run a shell script. Depending on the MacOS X version
and whether someone messed with your computer, you may be using a
different Shell (that's the Unix part that you're actually working with
when you use Terminal.app). To find out which one you have, type:
[octavo:~] witness% echo $SHELL
You may get /bin/tcsh. If that is the case, you need to create a file
named .cshrc in your home directory and add the line "source
/GNUDeveloper/GNUstep/System/Makefiles/GNUstep.csh" to it, and then use
the "source" command to make Tcsh look at this file again:
[octavo:~] witness% echo 'source
/usr/local/GNUstep/System/Makefiles/GNUstep.csh' >> ~/.cshrc
[octavo:~] witness% source ~/.cshrc
If you get /bin/bash, the file should be called ".bash_profile", and the
script is called GNUstep.sh:
[octavo:~] witness% echo 'source
/usr/local/GNUstep/System/Makefiles/GNUstep.sh' >> ~/.bash_profile
[octavo:~] witness% source ~/.bash_profile
These scripts will do some set up work so you can call some GNUstep
commands from Terminal.app.
Now that that's done, proceed installing gnustep-base, gnustep-gui and
gnustep-back (in that order) by cding into each folder and executing
[octavo:~/GNUstep/gnustep-base-1.8.0] witness% ./configure
--prefix=/usr/local/GNUstep --with-library-combo=gnu-gnu-gnu
--disable-openssl
[octavo:~/GNUstep/gnustep-base-1.8.0] witness% make
[octavo:~/GNUstep/gnustep-base-1.8.0] witness% sudo make install
(???WHY??? Here it fails now)
- Re: *Any* way to getting GNUstep on a G4 ???, (continued)
- Message not available
- Re: *Any* way to getting GNUstep on a G4 ???, Uli Kusterer, 2004/10/28
- Re: *Any* way to getting GNUstep on a G4 ???, Andrew Pinski, 2004/10/28
- Message not available
- Re: *Any* way to getting GNUstep on a G4 ???, Uli Kusterer, 2004/10/28
- Re: *Any* way to getting GNUstep on a G4 ???, Andrew Pinski, 2004/10/28
- Re: *Any* way to getting GNUstep on a G4 ???, Quentin Mathé, 2004/10/28
- Message not available
- Re: *Any* way to getting GNUstep on a G4 ???, Uli Kusterer, 2004/10/28
- Message not available
- Re: *Any* way to getting GNUstep on a G4 ???, Uli Kusterer, 2004/10/28
- Re: *Any* way to getting GNUstep on a G4 ???, Andrew Pinski, 2004/10/28
Re: *Any* way to getting GNUstep on a G4 ???, M. Uli Kusterer, 2004/10/27
Re: *Any* way to getting GNUstep on a G4 ???,
M. Uli Kusterer <=
- Re: *Any* way to getting GNUstep on a G4 ???, Adam Fedor, 2004/10/27
- Re: *Any* way to getting GNUstep on a G4 ???, Nicolas Roard, 2004/10/28
- Message not available
- Re: *Any* way to getting GNUstep on a G4 ???, M. Uli Kusterer, 2004/10/28
- Re: *Any* way to getting GNUstep on a G4 ???, Adam Fedor, 2004/10/28
- Re: *Any* way to getting GNUstep on a G4 ???, Alex Perez, 2004/10/28
- Re: *Any* way to getting GNUstep on a G4 ???, Alex Perez, 2004/10/28
- Message not available
- Re: *Any* way to getting GNUstep on a G4 ???, Uli Kusterer, 2004/10/28
- Re: *Any* way to getting GNUstep on a G4 ???, Quentin Mathé, 2004/10/28
- Re: *Any* way to getting GNUstep on a G4 ???, Adam Fedor, 2004/10/28
- Message not available
- Re: *Any* way to getting GNUstep on a G4 ???, Uli Kusterer, 2004/10/28