NetBSD Problem Report #23240

Received: (qmail 19012 invoked by uid 605); 23 Oct 2003 07:52:20 -0000
Message-Id: <20031023075215.3123F2E4A1D@what-time-is-love.eterna.com.au>
Date: Thu, 23 Oct 2003 17:52:15 +1000 (EST)
From: mrg@eterna.com.au
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: mrg@eterna.com.au
To: gnats-bugs@gnats.netbsd.org
Subject: mozilla/MozillaFirebird build failure on macppc-current
X-Send-Pr-Version: 3.95

>Number:         23240
>Category:       pkg
>Synopsis:       mozilla/MozillaFirebird build failure on macppc-current
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    taya
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 23 07:53:00 +0000 2003
>Closed-Date:    Sat Nov 20 06:57:09 +0000 2004
>Last-Modified:  Sat Dec 04 02:18:01 +0000 2004
>Originator:     matthew green
>Release:        NetBSD 1.6ZD
>Organization:
people's front against (bozotic) www (softwar foundation)
>Environment:


System: NetBSD what-time-is-love.eterna.com.au 1.6ZD NetBSD 1.6ZD (_what_) #141: Sun Oct 19 21:03:51 EST 2003 mrg@phat-bass.eterna.com.au:/home/obj/macppc/usr/src/sys/arch/macppc/compile/_what_ macppc
Architecture: powerpc
Machine: macppc
>Description:

	both mozilla and phoenix fail to build on my very recently upgraded
	to -current macppc box. the mozilla/nsprpub/pr/src/io/prprf.c file
	fails to build due to bad use of va_list.  changing it to use va_copy(3)
	on netbsd/powerpc makes this file build for both mozilla & firebird.

	next problem - i don't know what is up here at all:


gmake[3]: Entering directory `/var/obj.pkgsrc/www/mozilla/work.what-time-is-love/mozilla/js/src/xpconnect/shell'
xpcshell.cpp
c++ -o xpcshell.o -c -DOSTYPE=\"NetBSD1\" -DOSARCH=\"NetBSD\" -DJS_THREADSAFE  -I../../../../dist/include/xpconnect -I../../../../dist/include/xpcom -I../../../../dist/include/string -I../../../../dist/include/js -I../../../../dist/include/xpcshell -I../../../../dist/include -I/var/obj.pkgsrc/www/mozilla/work.what-time-is-love/mozilla/dist/include/nspr  -I/usr/pkg/include -I/usr/pkg/include   -I/usr/X11R6/include   -fPIC -DPIC  -I/usr/pkg/include/gdk-pixbuf-1.0  -I/usr/pkg/include -I/usr/X11R6/include  -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-long-long -O2 -I/usr/pkg/include -I/usr/X11R6/include -Dunix -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -O2  -I/usr/pkg/include/gdk-pixbuf-1.0  -I/usr/pkg/include -I/usr/X11R6/include  -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../../../mozilla-config.h -Wp,-MD,.deps/xpcshell.pp xpcshell.cpp
c++  -I/usr/pkg/include/gdk-pixbuf-1.0  -I/usr/pkg/include -I/usr/X11R6/include  -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-long-long -O2 -I/usr/pkg/include -I/usr/X11R6/include -Dunix -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -O2 -o xpcshell xpcshell.o -Wl,-R/usr/pkg/lib/mozilla -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib   -L../../../../dist/bin -L../../../../dist/lib -L../../../../dist/bin -lmozjs -L../../../../dist/bin -lxpcom  -L/var/obj.pkgsrc/www/mozilla/work.what-time-is-love/mozilla/dist/lib -lplds4 -lplc4 -lnspr4 -L/usr/pkg/lib -L/usr/X11R6/lib -pthread   -lm  -lintl    -Wl,--export-dynamic
../../../../dist/bin/libxpcom.so: undefined reference to `nsXPTCStubBase::Stub203()'
../../../../dist/bin/libxpcom.so: undefined reference to `nsXPTCStubBase::Stub156()'
../../../../dist/bin/libxpcom.so: undefined reference to `nsXPTCStubBase::Stub184()'
../../../../dist/bin/libxpcom.so: undefined reference to `nsXPTCStubBase::Stub128()'
[ ... ]
../../../../dist/bin/libxpcom.so: undefined reference to `nsXPTCStubBase::Stub102()'
../../../../dist/bin/libxpcom.so: undefined reference to `nsXPTCStubBase::Stub229()'
gmake[3]: *** [xpcshell] Error 1
gmake[3]: Leaving directory `/var/obj.pkgsrc/www/mozilla/work.what-time-is-love/mozilla/js/src/xpconnect/shell'

	(there are about 250 of these "StubN" functions missing.)  the exactly same
	problem occurs in mozilla & phoenix.

	this is with GCC 3.3.2-nb1.

>How-To-Repeat:

	build either of www/{mozilla,MozillaFirebird} on maccpc/current.

>Fix:

	for prprf.c make it use va_copy(3) instead of either raw assignment or
	structure assignment.
>Release-Note:
>Audit-Trail:

From: Jarkko Teppo <jarkko.teppo@er-grp.com>
To: gnats-bugs@netbsd.org
Cc:  
Subject: Re: pkg/23240
Date: Mon, 10 Nov 2003 11:04:13 +0200

 FYI, the missing nsXPTCStubBase::StubXXX-functions show up with alpha 
 (1.6ZD, ~latest pkgsrc) as well. I'm not sure if it's related with moving
 from gcc-2.9 to gcc-3.

 -- 
 jht

From: Arto Huusko <armihu@utu.fi>
To: gnats-bugs@netbsd.org
Cc: netbsd-bugs@netbsd.org
Subject: Re: pkg/23240
Date: Thu, 04 Dec 2003 17:53:31 +0200 (EET)

 Most likely this bug is caused by newer GCC.

 The problem is that

 	mozilla/xpcom/reflect/src/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp

 defines STUB_ENTRY like this:

 	#define STUB_ENTRY(n) \
 	__asm__( \
 	    "#### Stub"#n" ####\n" \
 	".text\n\t" \
 	    ".align 5\n\t" \
 	    ".globl Stub"#n"__14nsXPTCStubBase\n\t" \
 	    ".ent Stub"#n"__14nsXPTCStubBase\n" \
 	"Stub"#n"__14nsXPTCStubBase:\n\t" \
 	    ".frame $30,0,$26,0\n\t" \
 	    "ldgp $29,0($27)\n" \
 	"$Stub"#n"__14nsXPTCStubBase..ng:\n\t" \
 	    ".prologue 1\n\t" \
 	    "lda $1,"#n"\n\t" \
 	    "br $31,$SharedStub..ng\n\t" \
 	    ".end Stub"#n"__14nsXPTCStubBase" \
 	    );

 However, newer GCC apparently mangles C++ names differently.
 Running nm on libxptcall.a shows that it expects symbols like

 	_ZN14nsXPTCStubBase5Stub3Ev
 	_ZN14nsXPTCStubBase6Stub10Ev
 	_ZN14nsXPTCStubBase7Stub100Ev

 So, the solution to the problem is to modify the STUBS_ENTRY macro.
 Since I'm no CPP guru I fixed it like this:

 191c191
 < #define STUB_ENTRY(n) \
 ---
 > #define STUB_ENTRY(n, m) \
 196,198c196,198
 <     ".globl Stub"#n"__14nsXPTCStubBase\n\t" \
 <     ".ent Stub"#n"__14nsXPTCStubBase\n" \
 < "Stub"#n"__14nsXPTCStubBase:\n\t" \
 ---
 >     ".globl _ZN14nsXPTCStubBase"#m"Stub"#n"Ev\n\t" \
 >     ".ent _ZN14nsXPTCStubBase"#m"Stub"#n"Ev\n" \
 > "_ZN14nsXPTCStubBase"#m"Stub"#n"Ev:\n\t" \
 201c201
 < "$Stub"#n"__14nsXPTCStubBase..ng:\n\t" \
 ---
 > "$_ZN14nsXPTCStubBase"#m"Stub"#n"Ev..ng:\n\t" \
 205c205
 <     ".end Stub"#n"__14nsXPTCStubBase" \
 ---
 >     ".end _ZN14nsXPTCStubBase"#m"Stub"#n"Ev" \

 I couldn't figure out how to extract length of n in CPP, so I added a new
 parameter m.  This also requires patching

 	mozilla/xpcom/reflect/xptcall/public/xptcstubsdef.inc

 to add the lengths (5, 6 and 7) to all the STUBS_ENTRY calls.

 Alternative is, if it's possible, to make STUBS_ENTRY define
 an actual C++ function, like STUBS_SENTINEL.

 With this, the build is now at least past the point where it last bombed.

   -- Arto
State-Changed-From-To: open->feedback 
State-Changed-By: grant 
State-Changed-When: Sat Dec 20 08:49:18 UTC 2003 
State-Changed-Why:  
could you please confirm whether this problem is fixed or still exists 
in MozillaFirebird 0.7. 
State-Changed-From-To: feedback->open 
State-Changed-By: mrg 
State-Changed-When: Mon Jan 5 05:10:41 UTC 2004 
State-Changed-Why:  
this problem still exists.  the original compile-time error 
is still there, the meantioned fix for Stubxxx may be enough tough. 

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@netbsd.org
Cc:  
Subject: Re: pkg/23240
Date: Sun, 04 Apr 2004 17:05:50 +1000

 BTW:

 the prprf.c problem still exists today for both mozilla & firefox.


 .mrg.

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@netbsd.org
Cc:  
Subject: Re: pkg/23240
Date: Mon, 05 Apr 2004 19:25:16 +1000

 with the patch below prprf.c works.  as it changes all __NetBSD__
 platforms i don't want to just commit it...  but i still have the
 Stub* lossage with 2.0B/macppc even with this change, so none of
 the original problems are solved.

 this patch probably applies directly to firefox as well.  it
 certainly has the exact same lossage in the same file...


 .mrg.


 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/www/mozilla/distinfo,v
 retrieving revision 1.50
 diff -p -u -r1.50 distinfo
 --- distinfo	22 Feb 2004 12:02:55 -0000	1.50
 +++ distinfo	5 Apr 2004 09:23:56 -0000
 @@ -9,6 +9,7 @@ SHA1 (patch-ad) = 5408db4b7585dcf5855f64
  SHA1 (patch-ae) = e10936ff84d8f5b631c5c9f18271f21e902ea351
  SHA1 (patch-af) = 8fcedb0bdd48f9527fff8c9b970a0e6ea68711e4
  SHA1 (patch-ag) = c52586f92fc801571ccaf5a80c081103a99ed4e7
 +SHA1 (patch-ah) = b79f1bdc12b64538ca18a9ca872a259e88b3b74c
  SHA1 (patch-am) = 6646e8f1e5dbc3532ba45945ad2054756de2186a
  SHA1 (patch-aw) = 5beeefa214a3003a74ccc68776a97a414c6acff1
  SHA1 (patch-ba) = e11ab3e2baa19c9db9e320868a9860fedf5c8cec
 Index: patches/patch-ah
 ===================================================================
 RCS file: patches/patch-ah
 diff -N patches/patch-ah
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-ah	5 Apr 2004 09:23:56 -0000
 @@ -0,0 +1,18 @@
 +$NetBSD$
 +
 +--- nsprpub/pr/src/io/prprf.c.orig	2003-02-27 10:53:42.000000000 +1100
 ++++ nsprpub/pr/src/io/prprf.c	2004-04-05 18:44:09.000000000 +1000
 +@@ -54,10 +54,10 @@
 + #if (defined(LINUX) && defined(__powerpc__)) || \
 +     (defined(LINUX) && defined(__s390__)) || \
 +     (defined(LINUX) && defined(__s390x__)) || \
 +-    defined(WIN16) || defined(QNX) || \
 +-    (defined(__NetBSD__) && defined(__powerpc__) && \
 +-    __NetBSD_Version__ < 105000000)
 ++    defined(WIN16) || defined(QNX)
 + #define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0]
 ++#elif defined(__NetBSD__)
 ++#define VARARGS_ASSIGN(foo, bar) va_copy((foo), (bar))
 + #else
 + #define VARARGS_ASSIGN(foo, bar) (foo) = (bar)
 + #endif

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@netbsd.org
Cc: vincent@labri.fr
Subject: re: pkg/23240
Date: Tue, 06 Apr 2004 23:10:48 +1000

 with this patch for pkgsrc mozilla builds on macppc current, but it
 dumps core at install time.  i haven't yet attempted to look why,
 but i'm going to try building with -g and/or -O1 next.


 .mrg.


 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/www/mozilla/distinfo,v
 retrieving revision 1.50
 diff -p -r1.50 distinfo
 *** distinfo	22 Feb 2004 12:02:55 -0000	1.50
 --- distinfo	6 Apr 2004 13:08:15 -0000
 *************** SHA1 (mozilla-source-1.6.tar.bz2) = baec
 *** 4,14 ****
   Size (mozilla-source-1.6.tar.bz2) = 31037452 bytes
   SHA1 (patch-aa) = 03f158fe673a54b8060d541c80f9ebda2977afc5
   SHA1 (patch-ab) = 3abad84d0768de60f845f26c61cc2629a6e25ce3
 ! SHA1 (patch-ac) = 4cddfd0bfc8acd97db3b974289a79c9ae41c9edf
   SHA1 (patch-ad) = 5408db4b7585dcf5855f64a342cc721a23aec449
   SHA1 (patch-ae) = e10936ff84d8f5b631c5c9f18271f21e902ea351
   SHA1 (patch-af) = 8fcedb0bdd48f9527fff8c9b970a0e6ea68711e4
   SHA1 (patch-ag) = c52586f92fc801571ccaf5a80c081103a99ed4e7
   SHA1 (patch-am) = 6646e8f1e5dbc3532ba45945ad2054756de2186a
   SHA1 (patch-aw) = 5beeefa214a3003a74ccc68776a97a414c6acff1
   SHA1 (patch-ba) = e11ab3e2baa19c9db9e320868a9860fedf5c8cec
 --- 4,17 ----
   Size (mozilla-source-1.6.tar.bz2) = 31037452 bytes
   SHA1 (patch-aa) = 03f158fe673a54b8060d541c80f9ebda2977afc5
   SHA1 (patch-ab) = 3abad84d0768de60f845f26c61cc2629a6e25ce3
 ! SHA1 (patch-ac) = bc0aad7fc0ab64b1e2c9673144bbd3609a375731
   SHA1 (patch-ad) = 5408db4b7585dcf5855f64a342cc721a23aec449
   SHA1 (patch-ae) = e10936ff84d8f5b631c5c9f18271f21e902ea351
   SHA1 (patch-af) = 8fcedb0bdd48f9527fff8c9b970a0e6ea68711e4
   SHA1 (patch-ag) = c52586f92fc801571ccaf5a80c081103a99ed4e7
 + SHA1 (patch-ah) = b79f1bdc12b64538ca18a9ca872a259e88b3b74c
 + SHA1 (patch-ai) = e5c40bb3639b5ff6d7e4f87ddf33f7cb51d4a42a
 + SHA1 (patch-aj) = aa6fe6a0ad514028596b9e246595192970f78f13
   SHA1 (patch-am) = 6646e8f1e5dbc3532ba45945ad2054756de2186a
   SHA1 (patch-aw) = 5beeefa214a3003a74ccc68776a97a414c6acff1
   SHA1 (patch-ba) = e11ab3e2baa19c9db9e320868a9860fedf5c8cec
 Index: patches/patch-ac
 ===================================================================
 RCS file: /cvsroot/pkgsrc/www/mozilla/patches/patch-ac,v
 retrieving revision 1.21
 diff -p -r1.21 patch-ac
 *** patches/patch-ac	17 Jan 2004 00:04:49 -0000	1.21
 --- patches/patch-ac	6 Apr 2004 13:08:15 -0000
 ***************
 *** 1,8 ****
   $NetBSD: patch-ac,v 1.21 2004/01/17 00:04:49 taya Exp $

 ! diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in ./xpcom/reflect/xptcall/src/md/unix/Makefile.in
 ! --- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in	2003-08-15 13:00:23.000000000 +0900
 ! +++ ./xpcom/reflect/xptcall/src/md/unix/Makefile.in	2004-01-16 23:17:21.000000000 +0900
   @@ -135,7 +135,7 @@
    # NetBSD/ARM
    #
 --- 1,20 ----
   $NetBSD: patch-ac,v 1.21 2004/01/17 00:04:49 taya Exp $

 ! --- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig	2003-08-15 14:00:23.000000000 +1000
 ! +++ xpcom/reflect/xptcall/src/md/unix/Makefile	2004-04-06 16:47:38.000000000 +1000
 ! @@ -20,9 +20,9 @@
 !  #
 !  
 !  DEPTH		= ../../../../../..
 ! -topsrcdir	= @top_srcdir@
 ! -srcdir		= @srcdir@
 ! -VPATH		= @srcdir@
 ! +topsrcdir	= ../../../../../..
 ! +srcdir		= .
 ! +VPATH		= .
 !  
 !  include $(DEPTH)/config/autoconf.mk
 !  
   @@ -135,7 +135,7 @@
    # NetBSD/ARM
    #
 *************** diff -ru ../Orig/mozilla/xpcom/reflect/x
 *** 21,27 ****
    CPPSRCS		:= xptcinvoke_netbsd_m68k.cpp xptcstubs_netbsd_m68k.cpp
    endif
    endif
 ! @@ -295,6 +295,13 @@
    CPPSRCS		:= xptcinvoke_sparc_netbsd.cpp xptcstubs_sparc_netbsd.cpp
    ASFILES		:= xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s
    endif
 --- 33,47 ----
    CPPSRCS		:= xptcinvoke_netbsd_m68k.cpp xptcstubs_netbsd_m68k.cpp
    endif
    endif
 ! @@ -245,6 +245,7 @@
 !  # NetBSD/PPC
 !  #
 !  ifneq (,$(filter NetBSDmacppc NetBSDbebox NetBSDofppc NetBSDprep NetBSDamigappc,$(OS_ARCH)$(OS_TEST)))                           
 ! +AS		:= $(CC) -c -x assembler-with-cpp
 !  CPPSRCS		:= xptcinvoke_ppc_netbsd.cpp xptcstubs_ppc_netbsd.cpp
 !  ASFILES		:= xptcinvoke_asm_ppc_netbsd.s xptcstubs_asm_ppc_netbsd.s
 !  endif
 ! @@ -295,6 +296,13 @@
    CPPSRCS		:= xptcinvoke_sparc_netbsd.cpp xptcstubs_sparc_netbsd.cpp
    ASFILES		:= xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s
    endif
 Index: patches/patch-ah
 ===================================================================
 RCS file: patches/patch-ah
 diff -N patches/patch-ah
 *** /dev/null	1 Jan 1970 00:00:00 -0000
 --- patches/patch-ah	6 Apr 2004 13:08:15 -0000
 ***************
 *** 0 ****
 --- 1,18 ----
 + $NetBSD$
 + 
 + --- nsprpub/pr/src/io/prprf.c.orig	2003-02-27 10:53:42.000000000 +1100
 + +++ nsprpub/pr/src/io/prprf.c	2004-04-05 18:44:09.000000000 +1000
 + @@ -54,10 +54,10 @@
 +  #if (defined(LINUX) && defined(__powerpc__)) || \
 +      (defined(LINUX) && defined(__s390__)) || \
 +      (defined(LINUX) && defined(__s390x__)) || \
 + -    defined(WIN16) || defined(QNX) || \
 + -    (defined(__NetBSD__) && defined(__powerpc__) && \
 + -    __NetBSD_Version__ < 105000000)
 + +    defined(WIN16) || defined(QNX)
 +  #define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0]
 + +#elif defined(__NetBSD__)
 + +#define VARARGS_ASSIGN(foo, bar) va_copy((foo), (bar))
 +  #else
 +  #define VARARGS_ASSIGN(foo, bar) (foo) = (bar)
 +  #endif
 Index: patches/patch-ai
 ===================================================================
 RCS file: patches/patch-ai
 diff -N patches/patch-ai
 *** /dev/null	1 Jan 1970 00:00:00 -0000
 --- patches/patch-ai	6 Apr 2004 13:08:15 -0000
 ***************
 *** 0 ****
 --- 1,14 ----
 + $NetBSD$
 + 
 + --- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s.orig	2001-03-12 04:22:17.000000000 +1100
 + +++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s	2004-04-06 11:39:54.000000000 +1000
 + @@ -86,7 +86,9 @@
 +  	lwz     r4,12(r31)			# r4 <= methodIndex
 +  	lwz     r5,0(r3)			# r5 <= vtable ( == *that )
 +  	slwi    r4,r4,3				# convert to offset ( *= 8 )
 + +#if !((__GNUC__ == 3 && __GNUC_MINOR__ < 2) || __GXX_ABI_VERSION  >= 100) // G++ pre-V3 ABI
 +  	addi	r4,r4,8				# skip first two vtable entries
 + +#endif
 +  	add	r4,r4,r5
 +  	lhz	r0,0(r4)			# virtual base offset
 +  	extsh	r0,r0
 Index: patches/patch-aj
 ===================================================================
 RCS file: patches/patch-aj
 diff -N patches/patch-aj
 *** /dev/null	1 Jan 1970 00:00:00 -0000
 --- patches/patch-aj	6 Apr 2004 13:08:15 -0000
 ***************
 *** 0 ****
 --- 1,60 ----
 + $NetBSD$
 + 
 + --- xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp.orig	2001-09-29 06:12:53.000000000 +1000
 + +++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp	2004-04-06 11:39:08.000000000 +1000
 + @@ -195,6 +195,8 @@
 +  // however, it's quick, dirty, and'll break when the ABI changes on
 +  // us, which is what we want ;-).
 +  
 + +#if __GXX_ABI_VERSION < 100
 + +// gcc-2 version
 +  #define STUB_ENTRY(n)                                       \
 +  __asm__ (                                                   \
 +          ".section \".text\" \n\t"                           \
 + @@ -206,6 +208,46 @@
 +  	"li     11,"#n" \n\t"                               \
 +  	"b      SharedStub@local \n"                        \
 +  );
 + +#else
 + +// gcc-3 version
 + +//
 + +// As G++3 ABI contains the length of the functionname in the mangled
 + +// name, it is difficult to get a generic assembler mechanism like
 + +// in the G++ 2.95 case.
 + +// Create names would be like:
 + +// _ZN14nsXPTCStubBase5Stub1Ev
 + +// _ZN14nsXPTCStubBase6Stub12Ev
 + +// _ZN14nsXPTCStubBase7Stub123Ev
 + +// _ZN14nsXPTCStubBase8Stub1234Ev
 + +// etc.
 + +// Use assembler directives to get the names right...
 + +
 + +# define STUB_ENTRY(n)							\
 + +__asm__ (								\
 + +	".align	2 \n\t"							\
 + +	".if	"#n" < 10 \n\t"						\
 + +	".globl	_ZN14nsXPTCStubBase5Stub"#n"Ev \n\t"			\
 + +	".type	_ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n"		\
 + +"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t"					\
 + +									\
 + +	".elseif "#n" < 100 \n\t"					\
 + +	".globl	_ZN14nsXPTCStubBase6Stub"#n"Ev \n\t"			\
 + +	".type	_ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n"		\
 + +"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t"					\
 + +									\
 + +	".elseif "#n" < 1000 \n\t"					\
 + +	".globl	_ZN14nsXPTCStubBase7Stub"#n"Ev \n\t"			\
 + +	".type	_ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n"		\
 + +"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t"					\
 + +									\
 + +	".else \n\t"							\
 + +	".err	\"stub number "#n" >= 1000 not yet supported\"\n"	\
 + +	".endif \n\t"							\
 + +									\
 + +	"li	11,"#n" \n\t"						\
 + +	"b	SharedStub@local \n"					\
 + +);
 + +#endif
 +  
 +  #define SENTINEL_ENTRY(n)                            \
 +  nsresult nsXPTCStubBase::Sentinel##n()               \

From: Aymeric Vincent <vincent@labri.fr>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/23240
Date: Tue, 6 Apr 2004 16:45:19 +0200

 I couldn't resist the temptation to give it a look and I found two 
 typos:

 In patch-ac, this should really be Makefile.in otherwise the patch 
 won't apply
 > ! +++ xpcom/reflect/xptcall/src/md/unix/Makefile

 > +  	slwi    r4,r4,3				# convert to offset ( *= 8 )
 > + +#if !((__GNUC__ == 3 && __GNUC_MINOR__ < 2) || __GXX_ABI_VERSION  
 > >= 100) // G++ pre-V3 ABI
 > +  	addi	r4,r4,8				# skip first two vtable entries

 If the comments are correct, this should be addi r4,r4,16, right?

 I'll be starting a build of mozilla, but it will be from scratch so I 
 don't expect useful results before a long time + a few fsck's... :-/

   Aymeric


From: matthew green <mrg@eterna.com.au>
To: Aymeric Vincent <vincent@labri.fr>
Cc: gnats-bugs@netbsd.org
Subject: re: pkg/23240 
Date: Wed, 07 Apr 2004 01:01:11 +1000


    I couldn't resist the temptation to give it a look and I found two 
    typos:

    In patch-ac, this should really be Makefile.in otherwise the patch 
    won't apply
    > ! +++ xpcom/reflect/xptcall/src/md/unix/Makefile

 yeah i noticed that in my -g build....

    > +  	slwi    r4,r4,3				# convert to offset ( *= 8 )
    > + +#if !((__GNUC__ == 3 && __GNUC_MINOR__ < 2) || __GXX_ABI_VERSION  
    > >= 100) // G++ pre-V3 ABI
    > +  	addi	r4,r4,8				# skip first two vtable entries

    If the comments are correct, this should be addi r4,r4,16, right?

    I'll be starting a build of mozilla, but it will be from scratch so I 
    don't expect useful results before a long time + a few fsck's... :-/


 hmmm the code from linux just made that addi not exist for new abi.
 are you saying it needs to be skip 4 entries?

From: Aymeric Vincent <Aymeric.Vincent@labri.fr>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/23240
Date: 06 Apr 2004 17:45:04 +0200

 matthew green <mrg@eterna.com.au> writes:

 > hmmm the code from linux just made that addi not exist for new abi.
 > are you saying it needs to be skip 4 entries?

 Nope, I don't know. I just understood after sending the mail that
 actually your patch was removing that instruction... So it doesn't
 matter that the comment is wrong or whatever. It just striked me as
 incorrect that entries were 8 bytes long (instead of 4 in linux) and
 that we added 8 to jump over two (2) entries.

 Actually, I was wondering why we just don't use the linux code? I
 didn't see any place in gcc where netbsd differs from linux from the
 ABI point of view. I didn't look very thoroughly and I'm not used to
 the code. Do you know where I could find the place where the virtual
 table's layout is decided within gcc?

  Aymeric

From: matthew green <mrg@eterna.com.au>
To: Aymeric Vincent <Aymeric.Vincent@labri.fr>
Cc: gnats-bugs@netbsd.org
Subject: re: pkg/23240 
Date: Wed, 26 May 2004 03:13:46 +1000


    > hmmm the code from linux just made that addi not exist for new abi.
    > are you saying it needs to be skip 4 entries?

    Nope, I don't know. I just understood after sending the mail that
    actually your patch was removing that instruction... So it doesn't
    matter that the comment is wrong or whatever. It just striked me as
    incorrect that entries were 8 bytes long (instead of 4 in linux) and
    that we added 8 to jump over two (2) entries.

    Actually, I was wondering why we just don't use the linux code? I
    didn't see any place in gcc where netbsd differs from linux from the
    ABI point of view. I didn't look very thoroughly and I'm not used to
    the code. Do you know where I could find the place where the virtual
    table's layout is decided within gcc?


 afaik it should probably work?

From: Aymeric Vincent <vincent@labri.fr>
To: mrg@netbsd.org
Cc: gnats-bugs@netbsd.org
Subject: pkg/23240 (mozilla on macppc)
Date: 30 Jun 2004 14:13:04 +0200

         Hi Matthew,

 I have good news. I finally did what I suggested: ie. use the stubs
 from linux and it gives me a working mozilla, except for the menus and
 more generally all (gtk?) widgets which are broken.

 So there is still some work to do, but at least we have a decent way
 to read HTML.

 The following discussion takes place in
 pkgsrc/www/mozilla/work.powerpc/mozilla/xpcom/reflect/xptcall/src/md/unix

 Replacing the small Makefile fragment with this one and recompiling
 and installing libxpcom.so produces a kind-of-working mozilla.

 ifneq (,$(filter NetBSDmacppc NetBSDbebox NetBSDofppc NetBSDprep NetBSDamigappc,$(OS_ARC
 H)$(OS_TEST)))
 CPPSRCS		:= xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
 ASFILES		:= xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
 AS		:= $(CC) -c -x assembler-with-cpp
 endif

 I'm wondering if we shouldn't just remove the 
 xptcinvoke_asm_ppc_netbsd.s and xptcstubs_asm_ppc_netbsd.s files
 altogether.

 You are welcome to investigate this further: I don't expect to be
 working on that very much in the coming days.

 Regards,
  Aymeric

From: Aymeric Vincent <vincent@labri.fr>
To: mrg@netbsd.org
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/23240 (mozilla on macppc)
Date: 30 Jun 2004 14:15:38 +0200

 Oh, joy! On second invocation, everything works fine. It must be
 related to the fact that the installation process couldn't finish
 properly the first time I did it (regxpcom and regchrome dumped core).

  Aymeric

From: matthew green <mrg@eterna.com.au>
To: Aymeric Vincent <vincent@labri.fr>
Cc: gnats-bugs@netbsd.org
Subject: re: pkg/23240 (mozilla on macppc) 
Date: Wed, 30 Jun 2004 22:44:07 +1000

 hiya.


 i'm unlikely to look at this at all for months if ever.  i don't use
 mozilla anymore and my mac is mostly a frontroom a/v machine not a
 desktop anymore...

 glad you got forward somewhere tho.


 .mrg.
Responsible-Changed-From-To: pkg-manager->taya 
Responsible-Changed-By: wiz 
Responsible-Changed-When: Tue Jul 6 10:48:12 UTC 2004 
Responsible-Changed-Why:  
over to maintainer 

From: Aymeric Vincent <aymeric@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/23240 CVS commit: pkgsrc/www/mozilla
Date: Wed,  7 Jul 2004 09:08:31 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	aymeric
 Date:		Wed Jul  7 09:08:31 UTC 2004

 Modified Files:
 	pkgsrc/www/mozilla: distinfo
 	pkgsrc/www/mozilla/patches: patch-ac patch-bx
 Added Files:
 	pkgsrc/www/mozilla/patches: patch-bz patch-ca patch-cb

 Log Message:
 . on PowerPC, update files so that Mozilla works properly when compiled with
   gcc version 3+.
 . generally reduce diffs to Linux version
 . retain compatibility with older ABI (AIX-like) thanks to useful comments
   from Charles Hannum

 Thanks to Matthew Green for the fruitful discussion. This should address
 PR#23240 as far as mozilla is concerned.


 To generate a diff of this commit:
 cvs rdiff -r1.59 -r1.60 pkgsrc/www/mozilla/distinfo
 cvs rdiff -r1.23 -r1.24 pkgsrc/www/mozilla/patches/patch-ac
 cvs rdiff -r1.1 -r1.2 pkgsrc/www/mozilla/patches/patch-bx
 cvs rdiff -r0 -r1.1 pkgsrc/www/mozilla/patches/patch-bz \
     pkgsrc/www/mozilla/patches/patch-ca pkgsrc/www/mozilla/patches/patch-cb

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: Aymeric Vincent <vincent@labri.fr>
To: gnats-bugs@gnats.NetBSD.org
Cc: mrg@netbsd.org
Subject: pkg/23240 (mozilla and firefox fail on macppc)
Date: Tue, 24 Aug 2004 18:45:00 +0200

 With my latest commits to firefox, I think this PR can be closed/put in 
 feedback state.

 However, I still see some inconsistent GTk layouts in many windows, but 
 "not always". I have no clue for this issue and it may be specific to 
 my setup.

 Regards,
   Aymeric

State-Changed-From-To: open->closed
State-Changed-By: mbw@netbsd.org
State-Changed-When: Sat, 20 Nov 2004 06:57:09 +0000
State-Changed-Why:


From: Shin'ichiro TAYA <taya@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/23240 CVS commit: pkgsrc/mail
Date: Sat,  4 Dec 2004 02:16:03 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	taya
 Date:		Sat Dec  4 02:16:03 UTC 2004

 Modified Files:
 	pkgsrc/mail/thunderbird: Makefile-thunderbird.common PLIST distinfo
 	pkgsrc/mail/thunderbird-gtk2: PLIST
 	pkgsrc/mail/thunderbird/patches: patch-ab patch-ac patch-br patch-bx
 Added Files:
 	pkgsrc/mail/thunderbird/patches: patch-bz patch-ca patch-cb patch-cc
 Removed Files:
 	pkgsrc/mail/thunderbird/patches: patch-bn

 Log Message:
 1)Generate extension directory at installation time.

 2)sync patches from www/mozilla.

 - update patch-ab
 from commit log
 >> date: 2004/08/31 02:37:57;  author: danw;  state: Exp;  lines: +13 -6
 >> darwin fixes (tested against firefox-gtk2)

 - update patch-ac
 - update patch-bx
 - add patch-bz
 - add patch-ca
 - add patch-cb
 from commit log
 >> date: 2004/07/07 09:08:31;  author: aymeric;  state: Exp;  lines: +14 -7
 >> . on PowerPC, update files so that Mozilla works properly when compiled with
 >>   gcc version 3+.
 >> . generally reduce diffs to Linux version
 >> . retain compatibility with older ABI (AIX-like) thanks to useful comments
 >>   from Charles Hannum
 >>
 >> Thanks to Matthew Green for the fruitful discussion. This should address
 >> PR#23240 as far as mozilla is concerned.

 - remove patch-bn
 enable HAVE_SOCKLEN_T

 - update patch-br
 from commit log
 >> date: 2004/10/04 11:52:45;  author: grant;  state: Exp;  lines: +10 -6
 >> bring across a patch in Firefox for using thread-safe resolver library
 >> functions on NetBSD >=2.0F.

 - update patch-cc
 make mozilla work on NetBSD-current/alpha

 3)bump PKGREVISION


 To generate a diff of this commit:
 cvs rdiff -r1.3 -r1.4 pkgsrc/mail/thunderbird/Makefile-thunderbird.common
 cvs rdiff -r1.6 -r1.7 pkgsrc/mail/thunderbird/PLIST
 cvs rdiff -r1.9 -r1.10 pkgsrc/mail/thunderbird/distinfo
 cvs rdiff -r1.5 -r1.6 pkgsrc/mail/thunderbird-gtk2/PLIST
 cvs rdiff -r1.3 -r1.4 pkgsrc/mail/thunderbird/patches/patch-ab \
     pkgsrc/mail/thunderbird/patches/patch-ac \
     pkgsrc/mail/thunderbird/patches/patch-br
 cvs rdiff -r1.3 -r0 pkgsrc/mail/thunderbird/patches/patch-bn
 cvs rdiff -r1.1 -r1.2 pkgsrc/mail/thunderbird/patches/patch-bx
 cvs rdiff -r0 -r1.1 pkgsrc/mail/thunderbird/patches/patch-bz \
     pkgsrc/mail/thunderbird/patches/patch-ca \
     pkgsrc/mail/thunderbird/patches/patch-cb \
     pkgsrc/mail/thunderbird/patches/patch-cc

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.