Subject: Re: gimp/mico/egcs1.1b
To: NetBSD Mailing List <port-arm32@netbsd.org>
From: Timothy Coltman <tim@auroral.freeserve.co.uk>
List: port-arm32
Date: 11/15/1998 12:15:12
On Tue 10 Nov, MadNortheners wrote:
> A few questions for the experts...

Well, I'm no expert but I'll have a go anyway. Sorry about the length
of the email, but I decided to be very verbose. (=longwinded).

> 1. I've got an almost complete compile of gimp-1.0 , except it wont link
> in the gif/jpeg/mpeg/tiff plugins. The compile messages from these
> libraries says to use -LLIBDIR in the linker flags, ie when I try and
> compile the plugins I need to use that flag. How do I do this? I have
> tried various things but dont really know what I am doing. What do I do,
> and to what files...

You are compiling it with pkgsrc, are you not? If not, make sure that
you are. If I look at the '/usr/pkgsrc/graphics/gimp/Makefile' file, it
tells me that it needs the following to compile gimp:

(a) 	JPEG-6b (in pkgsrc/graphics/jpeg)
(b) 	GTK+-1.0.4 (pkgsrc/x11/gtk10)
(c) 	mpeg-1.2.1 (pkgsrc/graphics/mpeg-lib)
(d) 	PNG-1.0.2 (pkgsrc/graphics/png)
(e)	TIFF-3.4 (pkgsrc/graphics/tiff)
(f)	XPM-3.4K (pkgsrc/graphics/xpm)

You can download these from any NetBSD mirror, eg:

ftp://sunsite.doc.ic.ac.uk/unix/NetBSD/packages/distfiles.

You can actually ignore all the messages that the libraries bring up about
linking with -LLIBDIR, as if you use pkgsrc, gimp will automatically compile
with those libraries. The -L switch specifies where a library resides on the
harddisc. If I have a library called libgromit.so.1.0 in /usr/gromit/lib and
want to compile/link with it, I need to tell the compiler where gromit lives
(in a kennel?), using this -L flag, eg -L/usr/gromit/lib. If you use pkgsrc
you can ignore all these messages. It's just the libraries trying to be
helpful. Using pkgsrc does everything for you. Just make sure that your
/etc/ld.so.conf file contains the directory where the libraries are
installed (eg /usr/local/lib) and type 'ldconfig -v' to update the config
files to reflect this.

You should copy the downloaded stuff (jpegsrc-v6b.tar.gz, gtk+-1.0.4.tar.gz
and so on) into /usr/pkgsrc/distfiles and build them all using pkgsrc. You
can do them individually, eg for the JPEG stuff, cd into
/usr/pkgsrc/graphics/jpeg and type 'make package', or you can cd into
/usr/pkgsrc/graphics/gimp and type 'make package', and it'll build
everything for you in turn.

[By default, it'll install the non-X based stuff into /usr/pkg, however I
prefer it to go into /usr/local, as stuff I build not using pkgsrc might not
know where to find things like the JPEG stuff. So I copied
/usr/pkgsrc/mk/mk.conf.example into /etc as mk.conf and removed the
preceding # from the LOCALBASE line).]

> 2. mico wont compile. anyone compiled it and stuck it on an ftp/web site
> or prepared to email it to me...?

Yes, I've compiled it. Eventually. Presumably you're trying to compile
KDE Office. Here's my experiences of things:

EGCS

Compile egcs1.1b first. You seem to be having problems compiling it,
however, it *WILL* compile.

> 3. egcs1.1b gets as far as trying to compile texinfo/lib/**** and screams
> about a lack of files - there is a variable called DEP_FILES, which points
> to .deps/****.P (***** is about 6 files). This dir and it's files does not
> seem to exist on my system. what do I need to do?

I've just had a look at the texinfo/Makefile and I can't help wondering
whether egcs needs autoconf and automake to compile??? I think it may well
do. In this case, you need to get autoconf-2.12.tar.gz and
automake-1.3.tar.gz. I think one of these two is on the BSD CD-Rom. Get
t'other from the FTP site above. You'll also need m4-1.4.tar.gz (from the
CD-Rom), Perl (from the FTP site) and texinfo-3.12.tar.gz (on the CDRom
too). Copy the lot to /usr/pkgsrc/distfiles. Build pkgsrc/devel/gtexinfo
first, followed by pkgsrc/devel/m4 and then pkgsrc/lang/perl5. Follow that
with devel/autoconf and devel/automake. Then try and recompile EGCS.

When EGCS compiles, install it (make install). You'll then need to alter
your PATH variable so that it looks first at /usr/local/bin (where
egcs is installed), else it'll look in /usr/bin first. Do this by altering
your ~/.cshrc file or your /etc/csh.cshrc file (depends on your setup).

PYTHON

Python is in the pkgsrc tree, in pkgsrc/lang/python. Go to
ftp://sunsite.doc.ic.ac.uk/unix/NetBSD/packages/distfiles/python and
download *everything* from that directory. You'll end up with 'pyth151.tgz'
and a load of smaller files ending in 'txt' with names such as
'longmodule.1.txt'. Make a directory 'python' in' /usr/pkgsrc/distfiles' and
copy all the python stuff there.

Build python by typing 'make package' in /usr/pkgsrc/lang/python. Note that
you need EGCS to compile. If you're transferring the files via Acorn-land to
NetBSD, make sure all the filenames are correct (look in
/usr/pkgsrc/lang/python/files/md5 to see what they should be).
	
MICO

Mico is a pain in the arse to install. It took me about three days to get it
to compile. In case you're wondering, Mico is an ORB. Don't ask me precisely
what that is as I haven't a clue. It takes absolutely ages to compile as
it's written in C++ and you *MUST* use egcs to compile it.

At first, I couldn't get it to work correctly. At all. It barfed when
compiling the 'orb/dii.cc' file, which is presumably where you had problems
too. I got round this as follows (cue more long-winded explanation).

Unarchive mico (eg tar fzxv mico-2.2.1.tar.gz) and change into the resulting
'mico' directory. If you type 'configure --help' it'll list all the options
you can give it to compile. If you just type 'configure' on its own followed
by 'gmake', it'll die when compiling. KDE say you should compile it using
the 'disable--mini-stl' switch. However, if you compile it using 'configure
--enable-namespace', it should compile fine. Unfortunately it doesn't (yet)
support shared libraries for NetBSD, which is something I'm looking towards
changing, by means of a little fiddling here and there. If you type make
having used the 'enable-namespace' switch, it will compile (eventually) the
dii.cc file, but I found that it barfed again when compiling the
orb/static.cc file. This can be remedied by editing one of the files in the
'mico' directory, namely 'MakeVars'.

Edit the 'MakeVars' file and do a search for 'exceptions'. It should stop at
a line that reads something like 'CXXFLAGS = -O -fno-exceptions'. Change
this line by deleting everything after the equals sign and type gmake
again.Note that you must just 'gmake' to compile it, not 'make'. You've
already got gmake so you needn't worry about downloading that (although you
can if you'd like to).

THE KOFFICE FILES

Once I got mico working (two nights ago), I was very optimistic about
getting KDE Office working, however, when I came to build the
'corba-1998xxxx.tar.bz2' and 'koffice-1998xxxx.tar.bz2' files I downloaded
it emerged that they didn't have any configure scripts, so I had to spent
absolutely ages to try and generate a configure script using autoconf and
automake (arrrghhh). 

First unarchive corba-19981031.tar.gz. Go into the 'corba' directory and
type 'make -f Makefile.cvs'. In order to get them to compile you WILL need
autoconf, automake and all the things that they need ;-)). Then, a normal
'make' and 'make install' will get the thing compiled and installed. Do the
same for the koffice archive.

When I compiled the 19981029 versions, (or tried to), corba died halfway
through. I'm not sure why and I couldn't get it to work. I think it was a
problem with mico. To that end, I've downloaded a newer verson, version
2.2.3 as opposed to verson 2.2.1. You can get this yourself from the mico
web-site, which is now at http://www.vsb.cs.uni-frankfurt.de/~mico/ (in
English). It may work better.

I also had a look at the KOffice FAQ, which suggested that if you have
problems compiling, you should make sure that QT,  all of KDE, mico and the
koffice stuff are compiled with the  same compiler. There is a new version
of QT out (version 1.41) which I will compile sometime. I'll probably also
take the chance to re-compile all of KDE too... This will probably take the
best part of a week, but seeing as I'm a poor unemployed/able graduate with
nothing to do, I'm not exactly pressed for time.

IF NOTHING WILL COMPILE USING PKGSRC

If you have problems with pkgsrc complaining about your package tools being
out of date, you need to compile the pkgsrc/pkgtools/pkg_install package.
You'll need to download the following:

ftp://sunsite.doc.ic.ac.uk/unix/NetBSD/packages/distfiles/LOCAL_TOOLS/
pkg_install-19981026.tar.gz

> Also, are mico/python/egcs going to be added to the pkgsrc tree?

I seem to recall reading that egcs is in the source tree already, so when
someone produces a new snapshot (hint, hint), egcs will be there already, so
you won't need to compile it yourself. Python is in the tree (lang/python).
Mico isn't but why not add it yourself :-) if you get it to compile?? Make
sure you have the most recent pkgsrc.tar.gz file:

ftp://sunsite.doc.ic.ac.uk/unix/NetBSD/NetBSD-current/tar_files/
pkgsrc.tar.gz

LA FIN

Anyway, that's as much help as I can possibly give you at this time. If
there's any problems, yell. I would upload my packages but my connection
speed means that this would be prohibitively expensive.

> TTFN, Karl

Have fun,
tim

-- 
tim@auroral.freeserve.co.uk