Closed Bug 1103342 Opened 10 years ago Closed 10 years ago

error on compilation of mailnews/base/search/src/nsMsgFilterList.cpp on non-x86 platforms due strict GCC settings

Categories

(MailNews Core :: Build Config, defect)

ARM
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1085151

People

(Reporter: c.schoenert, Assigned: c.schoenert)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.2.0
Build ID: 20141102014832

Steps to reproduce:

I imported the latest beta version 34.0b1 of Thunderbird into the Debian Git tree from there we (let) build the various Icedove platform related versions. The Icedove maintainer uploaded the prepared package files to the autobuilders but it fails on most non x86 platforms due strict GCC settings used now in the Debian build environments.

To look the various build result please visit https://buildd.debian.org/status/logs.php?pkg=icedove&ver=34.0~b1-1


Actual results:

As visibly in the build logs the build on arm*, powerpc, ppc64el and s390x failed on the same error depended on the used GCC option "-Werror=type-limits".
The GCC errors out by the following message.

/«PKGBUILDDIR»/mailnews/base/search/src/nsMsgFilterList.cpp: In member function 'nsresult nsMsgFilterList::LoadValue(nsCString&, nsIInputStream*)':
/«PKGBUILDDIR»/mailnews/base/search/src/nsMsgFilterList.cpp:493:18: error: comparison is always true due to limited range of data type [-Werror=type-limits]
   while (curChar != -1);
                  ^



Expected results:

To get out of this issue the complained variables have to be declared as 'signed char' instead of simple 'char'. This is related to the different default platform behaviour for the char type and GCC on various CPU platforms. As x86 based platform will using a 'signed char' if there is a 'char' datatype there are no GCC errors on these platforms.

I found a quite good explanation on
http://www.network-theory.co.uk/docs/gccintro/gccintro_71.html

So I was able to get around this build issue by simple two changes to 'mailnews/base/search/src/nsMsgFilterList.cpp' but propably there should be set up more such explizit 'signed char' declarations to prevent future issues.
There was a similar related bug already some time ago opened up. #824296
https://bugzilla.mozilla.org/show_bug.cgi?id=824296
Hardware: x86_64 → ARM
Product: Thunderbird → MailNews Core
Thx for the patch!
Please see https://developer.mozilla.org/docs/En/Developer_Guide/How_to_Submit_a_Patch#Getting_the_patch_reviewed
Assignee: nobody → c.schoenert
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: error on compilation of mailnews/base/search/src/nsMsgFilterList.cpp → error on compilation of mailnews/base/search/src/nsMsgFilterList.cpp on non-x86 platforms due strict GCC settings
I think this should be fixed in bug 1085151 for TB36. If necessary, please request for that bug to be uplifted to TB34 too.
This bug should be duped there.

But thanks for trying to make a patch!
(In reply to :aceman from comment #3)
> I think this should be fixed in bug 1085151 for TB36. If necessary, please
> request for that bug to be uplifted to TB34 too.

Indeed, the pointed fix in bug 1085151 solved the problem. If possible the fix could be ported to the upcoming version 35.0b1 too.

And yes, this report is now a dup. :) I close this report. Thx.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: