[Bug 915069] Re: Compilation error: /usr/include/nss/pkcs11n.h:365:26: error: "__GNUC_MINOR" is not defined

Bug Watch Updater 915069 at bugs.launchpad.net
Wed Jan 11 23:31:07 UTC 2012


Launchpad has imported 6 comments from the remote bug at
https://bugzilla.mozilla.org/show_bug.cgi?id=702090.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2011-11-13T08:32:25+00:00 Chemobejk wrote:

PROBLEM:

A pidgin-sipe user complained about compilation errors when he compiled
it against NSS 3.13.1 on OpenSuse 11.4. Here are the important bits from
the GCC command line:

gcc ... -Werror -Wall -Wextra -Waggre gate-return -Wcast-align -Wdeclaration-after-statement -Winit-self -Wmissing-dec larations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef ... -I/usr/include/nss3 -I/usr/include/nspr4 ... -c sipe-cert-crypto-nss.c 
cc1: warnings being treated as errors
In file included from /usr/include/nss3/pkcs11t.h:1780:0,
                           from /usr/include/nss3/keythi.h:41,
                           from /usr/include/nss3/keyt.h:41,
                           from /usr/include/nss3/cert.h:55,
                           from sipe-cert-crypto-nss.c:29:
 /usr/include/nss3/pkcs11n.h:365:26: error: "__GNUC_MINOR" is not defined

The same code compiles fine with NSS < 3.13.


ROOT CAUSE:

In 3.13.1 pkcs11n.h has this construct:

#if __GNUC__ > 3
...
#if (__GNUC__ == 4) && (__GNUC_MINOR < 5)
...
#else

which is clearly incorrect. It assumes __GNUC__ is defined, i.e. GCC,
and __GNUC_MINOR is a typo.


PROPOSED FIX:

pkcs11n.h should have instead:

#if defined(__GNUC__) && (__GNUC__ > 3)
...
#if (__GNUC__ == 4) && (__GNUC_MINOR__ < 5)
...
#else

That should work with all compilers and fix the __GNUC_MINOR__ typo.

Reply at: https://bugs.launchpad.net/nss/+bug/915069/comments/0

------------------------------------------------------------------------
On 2011-11-13T12:11:13+00:00 Chemobejk wrote:

The problem was introduced in v1.22 with the fix for bug #642503.

See comment: https://bugzilla.mozilla.org/show_bug.cgi?id=642503#c20

Reply at: https://bugs.launchpad.net/nss/+bug/915069/comments/1

------------------------------------------------------------------------
On 2011-11-14T22:17:53+00:00 Rrelyea wrote:

Elio, this looks like the same issue you are dealing with.

The reason we don't trip over the undefines is we don't flip the flag to
make undefined comparisons an error.

Also we currently only have built this with GCC 3.x or GCC 4.5 or
greater. This patch will allow GCC 4.1, for instance, to work correctly.

bob

Reply at: https://bugs.launchpad.net/nss/+bug/915069/comments/2

------------------------------------------------------------------------
On 2011-11-18T15:47:36+00:00 T-matsuu wrote:

Created attachment 575453
fix

Prepare a patch what comment 0 says.

Reply at: https://bugs.launchpad.net/nss/+bug/915069/comments/3

------------------------------------------------------------------------
On 2011-11-24T12:23:21+00:00 Kai Engert wrote:

Comment on attachment 575453
fix

This is obviously correct. r=kaie

Reply at: https://bugs.launchpad.net/nss/+bug/915069/comments/4

------------------------------------------------------------------------
On 2011-11-24T12:26:50+00:00 Kai Engert wrote:

checked in

Checking in pkcs11n.h;
/cvsroot/mozilla/security/nss/lib/util/pkcs11n.h,v  <--  pkcs11n.h
new revision: 1.27; previous revision: 1.26
done

Reply at: https://bugs.launchpad.net/nss/+bug/915069/comments/5


** Changed in: nss (Debian)
       Status: Unknown => Confirmed

** Changed in: nss
       Status: Unknown => Fix Released

** Changed in: nss
   Importance: Unknown => Medium

** Bug watch added: Mozilla Bugzilla #642503
   https://bugzilla.mozilla.org/show_bug.cgi?id=642503

-- 
You received this bug notification because you are a member of Mozilla
Bugs, which is subscribed to Mozilla.
https://bugs.launchpad.net/bugs/915069

Title:
  Compilation error: /usr/include/nss/pkcs11n.h:365:26: error:
  "__GNUC_MINOR" is not defined

To manage notifications about this bug go to:
https://bugs.launchpad.net/nss/+bug/915069/+subscriptions




More information about the Ubuntu-mozillateam-bugs mailing list