[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-os2
Subject:    My changes to get a full build
From:       George Lengel <lengel1 () home ! com>
Date:       2000-02-22 4:09:48
[Download RAW message or body]

Here are all my little hacks I did to get a full build. Note some of
this was due to me building in the source tree. (It started out that way
by accident but worked anyway). Henry has specific code for some of
these that can be added to the CVS repository. My quick fixes would
break things because I was not adding ifdefs or ifeq type test to single
out specific OS2 issues.  My other additions I made need to be cleaned
up so they will not break other builds by adding some ifeq or some such
professional-type code. :)

Sometimes I use pronouns like "this problem" and such because I cut out
specific fixes from my build notes that I kept so I could go back later
and write up good instructions. I am throwing my fixes up here now to
help any other newcomers. These fixes are not as well organized as they
should be, but hopefully can be helpful. If you come across a build
stop, that looks like something I mention, you can be pretty sure your
stop is what I refer to with generic pronouns in that case.

 ****************
I needed to edit Henry's glib-config and libIDL-config. They both got
changed at the top to
reflect my gbash location. I set prefix-dir to j:/mozilla/libs for
libIDL because the one program
refers to libIDL/IDL.h and I had to delete the $prefix-dir/include
refernce in the INCLUDE flags  because he put all the .h files in the
libIDL directory, there is no include subdirectory.
The last change in libIDL-config was changing the one -lIDL to -llibIDL
because that is what it    is named on OS/2. I set prefix-dir for glib
to j:/mozilla/libs-glib-1.2.1 because all *.h
files for it are referenced in the current directory. I also had to get
rid of the reference
to the include subdirectory here because there is not one. Also changed
$prefix-dir/lib/glib
to reference $prefix-dir/lib-emx so glib.lib would be found. This is the
next to the last line.


*************************
Got rid of build stop by removing the -fPIC flag from
mozilla/config/autoconf.mk
This was at line 217 and it looked like this
DSO_PIC_CFLAGS          = -fPIC
I just deleted -fPIC so the flag was blank

*************
If I want to regenerate the makefiles with configure, there is one
directory that causes trouble
/mozilla/webshell/embed/gtk. The mozilla_config.mk is zero bytes, and if
I try to do
./configure again I get an error
/mozilla/webshell/embed/gtk/mozilla_config.mk.in does not
exist. This is a directory Henry would not have inluded, but ./configure
is still trying to
make it on my system.

**************************** rules.mk
ifdef DIRS
LOOP_OVER_DIRS  =     \
 @for d in $(DIRS); do     \
  $(UPDATE_TITLE);    \
  set $(EXIT_ON_ERROR);    \
  echo "cd $$d; $(MAKE) $@";   \
  oldDir=`pwd -D`;                                    \ I changed this
line
  cd $$d; $(MAKE) $@; cd $$oldDir;  \
  set +e;      \
  $(CLICK_STOPWATCH);    \
 done
endif

By looking at the source of the pwd builtin included with bash 2.0.266,
I found I can get
the equivalent behavior of showing the drive by using pwd -D


********************************
I then ran into a problem with the Makefile in
J:\mozilla\js\src\xpconnect\tests>. The first lines
in it were

topsrcdir = ../../../../..
srcdir  = ../../../../../js/src/xpconnect/tests

so ../../../../../config was not found because it backed up one too many
times.
I fixed it  by making it ../../../..


*****************************
When building nsprpub, none of the files were getting copied to
/mozilla/dist/[bin.include,lib] the commands had a destination of
/mozilla/dist/OS2_OBJDIR/[bin,include,lib] and my OS2_OBJDIR  was not
defined. This made the commands use a destiantion of
/mozilla/dist//[bin,include,lib]  which did not exist, once I figured
this out I used 'set OS2_OBJDIR=.' before starting gbash and it coped
the files to the correct directory.
This was only because I built in the source directory.

*********************************************
I moved this block in mozilla/locale/src/nsLocaleService.cpp

#ifdef XP_OS2
#include <locale.h>
#include "nsIOS2Locale.h"
#endif

from it original location at ~line 37 to above all initial includes.
locale.h was not being included
because one of the earlier includes also included unidef.h which defined
_LOCALE_H so there was no  need to include locale.h by the time line 37
was encountered.

Later Henry came up with this

Better solution. Leave the XP_OS2 include block where it is, but delete
#include <locale.h>. Then put #include <locale.h> at the top of the
includes in locale/public/nsIOS2Locale.h and run "gmake export" in
public to copy the changed header to dist/include.

This solution also worked.


*******************************************
I had an error in mozilla/intl/locale/src/os2/nsLocaleFactoryOS2.cpp
where it said it could not       find a function with a certain name. I
traced it to a line in mozilla/intl/locale/src/os2/nsLocaleFactoryOS2.h
that was commented out.
Line 37 needed the //
removed from teh front of it so this could be used in the cpp file. The
line looked like this

   nsLocaleFactoryOS2(const nsCID &aClass);


*********************************
In the Makefile, RCOPTS is defined as RCOPTS  = -n -x2 -i . $(RCDEFS)
, but my
version of rc cannot take the -n flag.


*************************
Copy these three lines from nsWidgetDefs.h into resID.h. This fixed the
problem.

#ifndef FCF_CLOSEBUTTON // defined in the Merlin toolkit
#define FCF_CLOSEBUTTON 0x04000000L
#endif

******************************************
Henry fixed the build in source tree directory problem in
widget/src/os2/res directory with a clever ifneq test.

***********************************
This is due to this line in  TestInterfaceInfo.cpp

#ifdef XP_OS2
#include "nsInterfaceInfo.h"
#else
#include "../src/nsInterfaceInfo.h"
#endif

Since I am defining XP_OS2, I bet I had a problem since I am building in
the source tree.

I changed this to read


#ifdef XP_OS2
#include "../src/nsInterfaceInfo.h"
#else
#include "../src/nsInterfaceInfo.h"
#endif

and then it can be found.


************************************
'gmake install' stopped in /mozilla/widget/src/os2/res because it could
not find nsinstall
It is very strange as DEPTH is correctly set at the top as ../../../..
so it should work.
However, from the error it is clear that one .. somehow got chopped off
or it did not read the
DEPTH in this Makefile and it was still using the previous one.

[CC281790-A|j:/mozilla/widget/src]gmake install
cd xpwidgets; gmake install
gmake[1]: Entering directory `/mozilla/widget/src/xpwidgets'
gmake[1]: Nothing to be done for `install'.
gmake[1]: Leaving directory `/mozilla/widget/src/xpwidgets'
cd support; gmake install
gmake[1]: Entering directory `/mozilla/widget/src/support'
gmake[1]: Nothing to be done for `install'.
gmake[1]: Leaving directory `/mozilla/widget/src/support'
cd os2; gmake install
gmake[1]: Entering directory `/mozilla/widget/src/os2'
../../../config/nsinstall -R -m 555 wdgtos2.dll ../../../dist/bin
cd res; gmake install
gmake[2]: Entering directory `/mozilla/widget/src/os2/res'
../../../config/nsinstall -R -m 444 wdgtres.dll ../../../../dist/bin
gmake[2]: ../../../config/nsinstall: Command not found
gmake[2]: Leaving directory `/mozilla/widget/src/os2/res'
gmake[1]: *** [install] Error 1
gmake[1]: Leaving directory `/mozilla/widget/src/os2'
gmake: *** [install] Error 2


I fixed it for now by making this line in the Makefile

install:
 $(INSTALL) -m 444 $(DLL) $(DIST)/bin

got changed to

install:
 ../$(INSTALL) -m 444 $(DLL) $(DIST)/bin

and the extra .. let nsinstall be found.


*****************
I stalled out during gmake install with an unknown external
IDM_VIEWERBAR. It is in     xpfe/xpviewer/src/resources.h but not in
webshell/tests/viewer so I cut and pasted it from
the first resources.h to the second one since resources.h is included in
nsOS2Main.cpp

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic