Compilation error: /usr/include/nss/pkcs11n.h:365:26: error: "__GNUC_MINOR" is not defined
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NSS |
Fix Released
|
Medium
|
|||
nss (Debian) |
Fix Released
|
Unknown
|
|||
nss (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
i tried to build network-manager from git and got the following compilation error:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../include -pthread -I/usr/
In file included from /usr/include/
/usr/include/
cc1: all warnings being treated as errors
i did:
./autogen.sh && make with the latest git snapshot from NM.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libnss3 3.13.1.
ProcVersionSign
Uname: Linux 3.2.0-8-generic i686
ApportVersion: 1.90-0ubuntu1
Architecture: i386
Date: Wed Jan 11 23:16:44 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110426)
SourcePackage: nss
UpgradeStatus: Upgraded to precise on 2012-01-10 (1 days ago)
Related branches
Changed in nss (Debian): | |
status: | Unknown → Confirmed |
Changed in nss: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Changed in nss (Debian): | |
status: | Confirmed → Fix Released |
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 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: nss3/pkcs11n. h:365:26: error: "__GNUC_MINOR" is not defined
cc1: warnings being treated as errors
In file included from /usr/include/
/usr/include/
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.