Closed Bug 198276 Opened 22 years ago Closed 22 years ago

RFE: Make Sun Workshop SHUT UP about |Distance(const nsReadingIterator<unsigned short>&,const nsReadingIterator<unsigned short>&)|

Categories

(Core :: XPCOM, defect)

Sun
Solaris
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.4alpha

People

(Reporter: roland.mainz, Assigned: roland.mainz)

Details

Attachments

(1 file, 3 obsolete files)

Nearly every 2nd week we have problems like the lines below: -- snip -- Undefined first referenced symbol in file unsigned Distance(const nsReadingIterator<unsigned short>&,const nsReadingIterator<unsigned short>&) ../../dist/bin/libxpcom.so unsigned Distance(const nsReadingIterator<char>&,const nsReadingIterator<char>&) ../../dist/bin/libxpcom.so -- snip -- This usually breaks the Sun Workshop/Forte StaticBuild for which we do not have a tinderbox and the (well known) workaround is to stick lots of |#include "nsReadableUtils.h"| in all sources which use the string iterators or include something which uses the string iterators or includes something which includes something else which includes something which uses the string iterators. Finally I am sick of it to fix that manually all the time which involves r= and sr=. I'll file a patch which should make the compiler shut up forver!
Suffering is mine...
Assignee: jaggernaut → Roland.Mainz
Status: NEW → ASSIGNED
Attached patch Patch for 2003-03-19-08-trunk (obsolete) — Splinter Review
Comment on attachment 117757 [details] [diff] [review] Patch for 2003-03-19-08-trunk Requesting r=/sr= ...
Attachment #117757 - Flags: superreview?(bzbarsky)
Attachment #117757 - Flags: review?(dwitte)
Comment on attachment 117757 [details] [diff] [review] Patch for 2003-03-19-08-trunk sr=bzbarsky, but this must get review from the module owner (jag). Please do not check this in with _anyone_ else's review without checking with me first.
Attachment #117757 - Flags: superreview?(bzbarsky)
Attachment #117757 - Flags: superreview+
Attachment #117757 - Flags: review?(jaggernaut)
Attachment #117757 - Flags: review?(dwitte)
Is there any chance that changing the extra foward declarations in nsStringIteratorUtils.h from saying: NS_COM size_t Distance( const nsReadingIterator<PRUnichar>&, const nsReadingIterator<PRUnichar>& ); NS_COM size_t Distance( const nsReadingIterator<char>&, const nsReadingIterator<char>& ); to saying: NS_COM size_t Distance( const nsAString::const_iterator&, const nsAString::const_iterator& ); NS_COM size_t Distance( const nsACString::const_iterator&, const nsACString::const_iterator& ); would help?
(Actually, that might not compile, so what about making the reverse change, in both nsReadableUtils.h and .cpp?)
I made the reverse change on nebiros and all of xpcom built. I'll let the tinderbox catch up and see if the rest of the tree builds. I don't know if that reverse change will work everywhere else (OS/2 in particular).
Attachment #117757 - Flags: review?(jaggernaut) → review-
Attached patch dbaron's suggested changes (obsolete) — Splinter Review
Attachment #117757 - Attachment is obsolete: true
Comment on attachment 117770 [details] [diff] [review] dbaron's suggested changes r=jag silly compilers.
Attachment #117770 - Flags: review?(jaggernaut) → review+
Attachment #117770 - Flags: superreview+
Though I wonder... Do we still need this declaration in nsStringIteratorUtils.h? This is the patch I had mkaply test a long time ago, and it worked fine on OS/2: Index: string/public/nsStringIterator.h =================================================================== RCS file: /cvsroot/mozilla/string/public/nsStringIterator.h,v retrieving revision 1.3 diff -u -r1.3 nsStringIterator.h --- string/public/nsStringIterator.h 13 Oct 2001 15:01:17 -0000 1.3 +++ string/public/nsStringIterator.h 15 Feb 2002 10:05:13 -0000 @@ -423,5 +423,8 @@ { return lhs.get() != rhs.get(); } + +NS_COM size_t Distance( const nsReadingIterator<PRUnichar>&, const nsReadingIterator<PRUnichar>& ); +NS_COM size_t Distance( const nsReadingIterator<char>&, const nsReadingIterator<char>& ); #endif /* !defined(nsStringIterator_h___) */ Index: string/public/nsStringIteratorUtils.h =================================================================== RCS file: /cvsroot/mozilla/string/public/nsStringIteratorUtils.h,v retrieving revision 1.3 diff -u -r1.3 nsStringIteratorUtils.h --- string/public/nsStringIteratorUtils.h 29 Jun 2001 12:47:07 -0000 1.3 +++ string/public/nsStringIteratorUtils.h 15 Feb 2002 10:05:13 -0000 @@ -36,13 +36,4 @@ return lhs.fragment().mStart == rhs.fragment().mStart; } -template <class CharT> class nsReadingIterator; - - // NOTE: need to break iterators out into their own file (as with many classes here), need - // these routines, but can't currently |#include "nsReadableUtils.h"|, this hack is bad - // but we need it to get OS2 building again. Fix by splitting things into different files. -NS_COM size_t Distance( const nsReadingIterator<PRUnichar>&, const nsReadingIterator<PRUnichar>& ); -NS_COM size_t Distance( const nsReadingIterator<char>&, const nsReadingIterator<char>& ); - - #endif /* !defined(nsStringIteratorUtils_h___) */ cls, could you see if that fixes the build problem on nebiros?
I think the build problem on nebiros is that it's using the typedef name in the name mangling, so that would only work if the place where you're adding it has access to nsAString and thus could use nsAString::const_iterator instead of nsReadingIterator<PRUnichar>, etc.
jag, your inline proposed patch breaks on nebiros.
dbaron's patch has been checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.4alpha
The dbaron's patch did not work: -- snip -- /opt/SUNWspro/bin/CC -I/usr/openwin/include -xbuiltin=%all -mt -DDEBUG -D_DEBUG -DDEBUG_mozilla -DTRACING -g -g -o nsTestSample ns TestSample.o -xildoff -zlazyload -zcombreloc -L../../dist/bin -L../../dist/lib ../../dist/lib/libxpcomglue.a ../../dist/li b/libembedstring.a -L/shared/bigtmp2/mozilla/2003-03-20-08-trunk_cvs/objdir_ws7_gtk/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl - lrt -lsocket -ldl -lm Undefined first referenced symbol in file unsigned Distance(const nsReadingIterator<unsigned short>&,const nsReadingIterator<unsigned short>&) ../../dist/lib/libembedstring.a (nsDependentSubstring.o) unsigned Distance(const nsReadingIterator<char>&,const nsReadingIterator<char>&) ../../dist/lib/libembedstring.a(nsDependentSubstring.o) ld: fatal: Symbol referencing errors. No output written to nsTestSample gmake[3]: *** [nsTestSample] Error 1 gmake[3]: Leaving directory `/shared/bigtmp2/mozilla/2003-03-20-08-trunk_cvs/objdir_ws7_gtk/xpcom/sample' gmake[2]: *** [libs] Error 2 gmake[2]: Leaving directory `/shared/bigtmp2/mozilla/2003-03-20-08-trunk_cvs/objdir_ws7_gtk/xpcom' gmake[1]: *** [tier_2] Error 2 gmake[1]: Leaving directory `/shared/bigtmp2/mozilla/2003-03-20-08-trunk_cvs/objdir_ws7_gtk' gmake: *** [default] Error 2 -- snip -- and the resulting Zilla binaries crash due missing symbols. Reopening bug...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #117770 - Attachment is obsolete: true
Did you clobber your build? I don't see why that include should help unless it's covering up some other problem.
David Baron wrote: > Did you clobber your build? That was a clean, fresh source pull and clean objdir. And the same issue occurs for the automated Phoenix+Mozilla nightly build system which runs on another box and on another, seperate account.
Comment on attachment 118120 [details] [diff] [review] Patch for 2003-03-20-08-trunk to get Mozilla compiling and running again Requesting r=/sr= for this patch to get the build and runtime bustage fixed for now (bug should be kept open to go after the real issue once this patch has been checked-in) ...
Attachment #118120 - Flags: superreview?(bzbarsky)
Attachment #118120 - Flags: review?(jaggernaut)
Comment on attachment 118120 [details] [diff] [review] Patch for 2003-03-20-08-trunk to get Mozilla compiling and running again jag and dbaron are much more qualified reviewers for this than I am.
Attachment #118120 - Flags: superreview?(bzbarsky) → superreview?(dbaron)
Nebiros tripped over this as well when timeless caused that makefile to be rebuilt. I think the problem in this case is that embedstring.a has a dependency upon |Distance| via nsDependentSubstring.o but we're not actually linking against libxpcom.so to resolve the dependency. Adding nsReadableUtils.cpp to embedstring.a would probably resolve that issue.
Attachment #118343 - Flags: superreview?(dbaron)
Attachment #118343 - Flags: review?(jaggernaut)
Comment on attachment 118343 [details] [diff] [review] Change embedstring standalone Distance signatures sr=dbaron, although it might be nice to leave the space between the "&" and the variable names.
Attachment #118343 - Flags: superreview?(dbaron) → superreview+
Comment on attachment 118343 [details] [diff] [review] Change embedstring standalone Distance signatures r=jag, see dbaron's comment.
Attachment #118343 - Flags: review?(jaggernaut) → review+
Patch checked in with extra spaces.
Status: REOPENED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Attachment #118120 - Flags: superreview?(dbaron)
Attachment #118120 - Flags: superreview-
Attachment #118120 - Flags: review?(jaggernaut)
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: