Subject: Galeon compilation errors...
To: None <current-users@netbsd.org>
From: Martin Weber <Ephaeton@gmx.net>
List: current-users
Date: 11/22/2001 19:41:50
Yo ;)

Well, I was wondering if anyone else is having this
problems, or rather, if anyone else is able to compile
galeon properly. I'm using a current snapshot from=20
about three weeks ago atm, and pkgsrc co'd yesterday
night. When I go to compile Galeon I end up:

---------------------------------------------------------------------------=
---------
c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src                 -I/usr/X11R=
6/include/mozilla -I/usr/X11R6/include/mozilla/nspr       -I/usr/X11R6/incl=
ude/mozilla/appcomps   -I/usr/X11R6/include/mozilla/content    -I/usr/X11R6=
/include/mozilla/cookie -I/usr/X11R6/include/mozilla/docshell    -I/usr/X11=
R6/include/mozilla/dom        -I/usr/X11R6/include/mozilla/exthandler     -=
I/usr/X11R6/include/mozilla/find        -I/usr/X11R6/include/mozilla/gfx   =
     -I/usr/X11R6/include/mozilla/gtkembedmoz    -I/usr/X11R6/include/mozil=
la/helperAppDlg        -I/usr/X11R6/include/mozilla/java       -I/usr/X11R6=
/include/mozilla/jsconsole       -I/usr/X11R6/include/mozilla/layout     -I=
/usr/X11R6/include/mozilla/mimetype   -I/usr/X11R6/include/mozilla/mozxfer =
-I/usr/X11R6/include/mozilla/necko      -I/usr/X11R6/include/mozilla/necko2=
     -I/usr/X11R6/include/mozilla/nkcache    -I/usr/X11R6/include/mozilla/o=
ji     -I/usr/X11R6/include/mozilla/pref       -I/usr/X11R6/include/mozilla=
/string     -I/usr/X11R6/include/mozilla/shistory        -I/usr/X11R6/inclu=
de/mozilla/uconv      -I/usr/X11R6/include/mozilla/uriloader  -I/usr/X11R6/=
include/mozilla/wallet  -I/usr/X11R6/include/mozilla/webbrowserpersist  -I/=
usr/X11R6/include/mozilla/webbrwsr   -I/usr/X11R6/include/mozilla/webshell =
       -I/usr/X11R6/include/mozilla/widget     -I/usr/X11R6/include/mozilla=
/windowwatcher      -I/usr/X11R6/include/mozilla/xpcom   -I/usr/X11R6/inclu=
de/gconf/1 -I/usr/X11R6/include -I/usr/pkg/include/glib/glib-1.2 -I/usr/pkg=
/lib/glib/include -I/usr/pkg/include -I/usr/X11R6/include/gtk-1.2       -I/=
usr/X11R6/include -I/usr/X11R6/include/gtk-1.2 -I/usr/pkg/include/glib/glib=
-1.2 -I/usr/pkg/lib/glib/include -I/usr/X11R6/include/gnome-vfs-1.0 -I/usr/=
X11R6/lib/gnome-vfs-1.0/include -I/usr/X11R6/include/libglade-1.0 -I/usr/pk=
g/include/gnome-xml -DNEED_GNOMESUPPORT_H -I/usr/X11R6/lib/gnome-libs/inclu=
de -I/usr/pkg/include   -DLIB_DIR=3D\"/usr/X11R6/lib/galeon\"     -DSHARE_D=
IR=3D\"/usr/X11R6/share/galeon\"   -I/usr/obj/pkg/www/galeon/work.i386/.bui=
ldlink/include  -I/usr/obj/pkg/www/galeon/work.i386/.buildlink/include/libg=
lade-1.0 -I/usr/pkg/share/x11-links/include  -fno-rtti -I/usr/obj/pkg/www/g=
aleon/work.i386/.buildlink/include -I/usr/obj/pkg/www/galeon/work.i386/.bui=
ldlink/include -O2 -I/usr/pkg/share/x11-links/include -Wall -Wmissing-decla=
rations -c BaseHelpProtocolHandler.cpp
In file included from /usr/include/arpa/inet.h:66,
                 from /usr/X11R6/include/mozilla/nspr/prinet.h:81,
                 from /usr/X11R6/include/mozilla/nspr/prio.h:48,
                 from /usr/X11R6/include/mozilla/xpcom/nsILocalFile.h:17,
                 from /usr/X11R6/include/mozilla/necko/nsNetUtil.h:66,
                 from BaseHelpProtocolHandler.cpp:32:
/usr/include/sys/param.h:220: warning: `MIN' redefined
/usr/pkg/include/glib/glib-1.2/glib.h:137: warning: this is the location of=
 the previous definition
/usr/include/sys/param.h:221: warning: `MAX' redefined
/usr/pkg/include/glib/glib-1.2/glib.h:134: warning: this is the location of=
 the previous definition
BaseHelpProtocolHandler.cpp: In method `nsresult GBaseHelpProtocolHandler::=
CreatePage()':
BaseHelpProtocolHandler.cpp:127: ANSI C++ forbids implicit conversion from =
`void *' in assignment
BaseHelpProtocolHandler.cpp:133: ANSI C++ forbids implicit conversion from =
`void *' in assignment
BaseHelpProtocolHandler.cpp:137: ANSI C++ forbids implicit conversion from =
`void *' in assignment
BaseHelpProtocolHandler.cpp:142: ANSI C++ forbids implicit conversion from =
`void *' in argument passing
gmake[3]: *** [BaseHelpProtocolHandler.o] Error 1
gmake[3]: Leaving directory `/usr/obj/pkg/www/galeon/work.i386/galeon-0.12.=
7/src/mozilla'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/obj/pkg/www/galeon/work.i386/galeon-0.12.=
7/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/obj/pkg/www/galeon/work.i386/galeon-0.12.=
7'
gmake: *** [all-recursive-am] Error 2
*** Error code 2

Stop.
make: stopped in /usr/pkgsrc/www/galeon
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/www/galeon
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/www/galeon

---------------------------------------------------------------------------=
---------


I was invoking make update in /usr/pkgsrc/www/galeon,
I do not see how any of my mk.conf settings should
influence this, but if I'm wrong, ask for them ;)

I should say that my USETOOLS stuff is in the
=2Eifndef BSD_PKG_MK portion.

One of the offending statements in BaseHelpProtocolHandler.cpp are (with so=
me context)

---------------------------------------------------------------------------=
---------
   112  NS_METHOD GBaseHelpProtocolHandler::CreatePage (void)
   113  {
   114          nsresult rv;
   115 =20
   116          /* Buffer converter output */
   117          gchar *argv[6];
   118          argv[0] =3D g_strdup (mConverter.get());
   119          argv[1] =3D g_strdup (mDocName.get());
   120          if (mScheme =3D=3D NS_LITERAL_CSTRING("info"))
   121          {
   122                  if (mSection.Length() =3D=3D 0)
   123                          *getter_Copies(mSection) =3D PL_strdup("Top=
");
   124                  argv[2] =3D "-a";
   125                  argv[3] =3D g_strdup (mSection.get());
   126                  argv[4] =3D "-g"; //Activate galeon mode in gnome-i=
nfo2html2
   127                  argv[5] =3D NULL;
   128          }

---------------------------------------------------------------------------=
---------

Mind line 127. If I change it to read :

		argv[5] =3D (gchar *) NULL;

it works fine.

Now, recalling some c++ I remember Bjarne warns in his book about
c++ and c's different handling of NULL (while in C++ afair NULL
simply is 0, in C it's something more wicked... I went and inserted

#ifdef NULL
#define NULL 0
#endif

after the include files. G++ seems to agree with me, now compiling
error-less. Now before I send anything via send-pr, what should this
be ? Explicit cast ? Usage of 0 instead of NULL ?

Well, and still, I'm not sure if not something is broken on my
machine, so a story of a successful compile would be interesting
to hear, too ;))

Any hints appreciated & tia,

Martin Weber