Some (non-libxul-enabled) tests in xpcom fail to build on OS/2 (gcc-3.3.5)

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
10 years ago
9 years ago

People

(Reporter: wuno, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9.2a1pre) Gecko/20090112 Minefield/3.2a1pre
Build Identifier: 

Well after being on the road to fix --enable-tests for the trunk (bug426639), I thought to try building Thunderbird  from comm-central with tests enabled. It built until it reached the xpcom tests and failed to build TestTArray.cpp. This test that gets only build in non-libxul-enabled builds (That's why trunk minefield doesn't have this problem.
Output from the log:
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp: In function `
   PRBool TestTArray::test_string_array()':
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:308: warning: comparison
   between signed and unsigned integer expressions
../../dist/include/xpcom/nsTArray.h: In member function `PRBool 
   nsDefaultComparator<A, B>::Equals(const A&, const B&) const [with A = 
   nsCString, B = char[8]]':
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:393:   instantiated from here
../../dist/include/xpcom/nsTArray.h:223: error: no match for 'operator==' in 'a 
   == b'
../../dist/include/string/nsTSubstring.h:717: error: candidates are: PRBool 
   operator==(const nsAString_internal&, const nsAString_internal&)
../../dist/include/string/nsTSubstring.h:717: error:                 PRBool 
   operator==(const nsACString_internal&, const nsACString_internal&)
../../dist/include/xpcom/nsTArray.h: In member function `PRBool 
   nsDefaultComparator<A, B>::Equals(const A&, const B&) const [with A = 
   nsCString, B = char[2]]':
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:393:   instantiated from here
../../dist/include/xpcom/nsTArray.h:223: error: no match for 'operator==' in 'a 
   == b'
../../dist/include/string/nsTSubstring.h:717: error: candidates are: PRBool 
   operator==(const nsAString_internal&, const nsAString_internal&)
../../dist/include/string/nsTSubstring.h:717: error:                 PRBool 
   operator==(const nsACString_internal&, const nsACString_internal&)
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp: In function `
   PRBool TestTArray::test_basic_array(ElementType*, unsigned int, const 
   ElementType&) [with ElementType = int]':
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:165:   instantiated from here
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:95: warning: comparison
   between signed and unsigned integer expressions
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp: In function `
   PRBool TestTArray::test_basic_array(ElementType*, unsigned int, const 
   ElementType&) [with ElementType = PRInt64]':
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:170:   instantiated from here
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:95: warning: comparison
   between signed and unsigned integer expressions
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp: In function `
   PRBool TestTArray::test_basic_array(ElementType*, unsigned int, const 
   ElementType&) [with ElementType = char]':
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:175:   instantiated from here
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:95: warning: comparison
   between signed and unsigned integer expressions
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp: In function `
   PRBool TestTArray::test_basic_array(ElementType*, unsigned int, const 
   ElementType&) [with ElementType = PRUint32]':
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:180:   instantiated from here
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:95: warning: comparison
   between signed and unsigned integer expressions
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp: In function `
   PRBool TestTArray::test_basic_array(ElementType*, unsigned int, const 
   ElementType&) [with ElementType = nsCString]':
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:315:   instantiated from here
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:95: warning: comparison
   between signed and unsigned integer expressions
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp: In function `
   PRBool TestTArray::test_basic_array(ElementType*, unsigned int, const 
   ElementType&) [with ElementType = TestTArray::FilePointer]':
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:356:   instantiated from here
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:95: warning: comparison
   between signed and unsigned integer expressions
../../dist/include/xpcom/nsTArray.h: At top level:
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:268: warning: `
   PRBool TestTArray::operator==(const nsCString&, const char*)' defined but 
   not used
make.exe[6]: *** [TestTArray.o] Error 1
make.exe[6]: Leaving directory `E:/mozbuild2/mozilla/xpcom/tests'


I used gcc-3.3.5 with the OS/2 specific patch in the xpcom directory. Maybe a problem with the sucking parser component of gcc-3.3.5

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

Comment 1

10 years ago
That's weird, I had this once a few weeks ago but never since. I always combine --enable-tests with --enable-debug which switches libxul off.

Like back when I had this I still can't make sense of the error message and why it originates from the line
   b->Release();
which doesn't even have the == in it...
(Reporter)

Comment 2

10 years ago
I reproduced the build break with gcc-3.3.5. Looking again at the error outputs these lines seem to be crucial
../../dist/include/xpcom/nsTArray.h: At top level:
E:/usr/src/hg/comm-central/mozilla/xpcom/tests/TestTArray.cpp:268: warning: `PRBool TestTArray::operator==(const nsCString&, const char*)' defined but not used
I guess his is the operator definition that should be used.
BTW, with gcc-4.3.3 I don't see the problem, indicating that it might be indeed a gcc-3.3.5 problem.
Summary: Some (non-libxul-enabled) tests in xpcom fail to build on OS/2 → Some (non-libxul-enabled) tests in xpcom fail to build on OS/2 (gcc-3.3.5)

Comment 3

9 years ago
Walter, have you seen this with compilers post 3.3.5 since February? If not, let's close it. I'm OK with running tests only with GCC 4+.
(Reporter)

Comment 4

9 years ago
(In reply to comment #3)
> Walter, have you seen this with compilers post 3.3.5 since February? If not,
> let's close it. I'm OK with running tests only with GCC 4+.
No, starting with gcc-3.4.6 and all gcc-4 I tested, none of them ever failed.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.