Subject: Getting Mozilla Up and Running on NetBSD (arm and x86).
To: None <mozilla-general@mozilla.org, port-arm32@NetBSD.ORG>
From: paul <pwain@nc.com>
List: port-arm32
Date: 03/31/1998 21:25:24
This is a multi-part message in MIME format.
--------------1B2D85C18268EC2B65C15CC6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The following is enough to link a binary on NetBSD/arm32 (StrongARM110
and Arm7's) for the following configuration with some notes on how to
make it work on NetBSD/x86:
CC = gcc 2.7.2.1
OS = NetBSD/arm32 1.2G / 1.3 and NetBSD/x86 1.2.1
MOTIF= 1.2.1
I havent tested my binary (Im on a text only dial up link) but baring a
bug we know of at NCI with Motif and scrolling widgets it _should_
work).
Having work on the arm32 port of Netscape 3.01 and Communicator 4.03
this is probably 90% of the work. Have fun figuring out the rest.
(For the port-arm32 people go to www.mozilla.org to find out how to get
the source).
One final note: For NetBSD/<whatever> the BSDi port will be the closest
not the FreeBSD port because of the way the jumpbuffer is structured.
/******************************************************************************/
Getting Mozilla working on NetBSD 1.2G / NetBSD 1.3 (arm32)
/******************************************************************************/
Environment Vars: Remember to setenv remember to setenv as per the docs
unxmake.txt [0]
/******************************************************************************/
FILE CHANGES [1]:
Before hitting 'make' at the top level you will need to do at least the
following.
In ns/config:
cp BSD_OS.mk NetBSD1.2G.mk (or 1.3.mk depending - Ill use 1.2G
for now)
ln -s NetBSD1.2.mk NetBSD.mk
in ns/nsprpub/config:
cp BSD_OS.mk NetBSD1.2G.mk
edit NetBSD1.2.mk
-> replace CC and CCC with your favourite compiler
-> if you have a dynamicly linking compiler add -fpic to
your
OS_CFLAGS (note mozilla doesnt really like to compile
without
shared libraries).
-> remove the -ldl from the OS_LIBS line
in ns/nsprpub/pr/include/md:
edit the Makefile
-> find the BSD_386 bit, copy those 3 lines and change
it to
say NetBSD. Change the file it copies to _netbsd.cfg.
i.e:
ifeq ($(OS_ARCH),NetBSD)
MDCPUCFG_H = _netbsd.cfg
endif
cp _bsdi.cfg _netbsd.cfg
cp _bsdi.h _netbsd.h
edit _netbsd.h arount line 48 to make the macro read:
#define _MD_GET_SP(_t)
(_t)->md.context[JMPBUF_REG_R13]
(i.e. remove both the possible BSDI varients - note on a x86 box
this
should be context[2]).
edit prosdep.h at line 62 and add (before the BSDI stuff)
#elif defined(NetBSD)
#include "md/_netbsd.h"
in ns/nsprpub/pr/src/md/unix:
edit unix.h so that somewhere around say line 30 you add a:
#include <fcntl.h>
then at line 2320 change it to read
#if defined(FREEBSD) || defined(NetBSD)
edit uxwrap.c around line 101 add the correct definition of
select (YOU
MUST DO THIS BEFORE THE BSDI LINES to avoid an error)
#elif defined(NetBSD)
int select (int width, fd_set *rd, fd_set *wr,
fd_set *ex, struct timeval *tv)
cp bsdi.c netbsd.c
edit the Makefile:
-> at line 60 add:
NETBSD_CSRCS = \
netbsd.c \
$NULL
-> at line 126 add:
ifeq ($(OS_ARCH),NetBSD)
CSRCS += $(NETBSD_CSRCS)
endif
Locate the similar code in obj.mk and do the same thing!
in ns/sun-java/stubs/include/bool.h:
comment out the typedef on line 24
in ns/modules/security:
edit the Makefile. It should read:
DEPTH = ../..
DIRS = freenav
include $(DEPTH)/config/rules.mk
i.e. cut out all the Netscape funky logic. :) It seems to
sometimes
get it wrong.
in ns/cmd/xfe:
edit the following files:line to remove the definition of
sys_errlist:
dialogs.c:244
movemail.c:44
mozilla.c:3479
prefdialogs.c:81
as it is correctly definied in errno.h (NOTE you still need
errno.h unlike on say FreeBSD)
In the Makefile at line 487 add:
########################################
# NetBSD
ifeq ($(OS_ARCH),NetBSD)
OTHER_LIBS =-L/usr/X11R6/lib -lXm -lXt -lXmu -lXext
-lX11 -lSM -lICE -lm $(OS_LIBS)
endif
/******************************************************************************/
BUILDING
You are now ready to type 'make'. BUT there is a trick here:
Type 'make'. If the make fails because it cant find libxp.a, cd into lib
and do a 'make' there. When that finishes. Go back to the top and redo
the
'make'. (Yes I know this is nasty but thats the way it is....). For some
reason this only happens sometimes [2].
/******************************************************************************/
Notes:
[0] More of a note to myself :)
[1] To do the same thing on the NS4 source tree you just had to edit 1
file!
[2] We had the same problem at NCI with the NS3 and NS4 trees!
--------------1B2D85C18268EC2B65C15CC6
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Paul Wain
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Paul Wain
n: Wain;Paul
org: Network Computer Inc.
adr: 1000 Bridge Parkway;;;Redwood City;CA;94065;USA
email;internet: pwain@nc.com
title: Development Manager, NCOS
tel;work: +1 650 631 4628
tel;fax: +1 650 631 4680
tel;home: +1 415 297 6959 (Mobil)
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard
--------------1B2D85C18268EC2B65C15CC6--