Closed Bug 1134511 Opened 6 years ago Closed 6 years ago

PKIX doesn't build with GCC 4.6 due to -pedantic-errors

Categories

(Core :: Security: PSM, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: birtles, Unassigned)

References

Details

Bug 1128413 part 3 (https://hg.mozilla.org/mozilla-central/rev/d17a125c8ee7) appears to have turned on -pedantic-errors for GCC which causes problems building PKIX because of various enum macros that leave a trailing comma.

Build output for GCC 4.6.4 is as follows:

28:14.14 pkixbuild.o
28:14.18 In file included from /home/brian/src/security/pkix/include/pkix/Input.h:31:0,
28:14.18                  from /home/brian/src/security/pkix/include/pkix/pkixtypes.h:28,
28:14.18                  from /home/brian/src/security/pkix/include/pkix/pkix.h:28,
28:14.18                  from /home/brian/src/security/pkix/lib/pkixbuild.cpp:25:
28:14.18 /home/brian/src/security/pkix/include/pkix/Result.h:195:3: error: comma at end of enumerator list [-pedantic]
28:14.18 In file included from /home/brian/src/security/pkix/include/pkix/pkix.h:28:0,
28:14.18                  from /home/brian/src/security/pkix/lib/pkixbuild.cpp:25:
28:14.19 /home/brian/src/security/pkix/include/pkix/pkixtypes.h:39:11: error: comma at end of enumerator list [-pedantic]
28:14.20 /home/brian/src/security/pkix/include/pkix/pkixtypes.h:51:16: error: comma at end of enumerator list [-pedantic]
28:14.20 /home/brian/src/security/pkix/include/pkix/pkixtypes.h:76:38: error: comma at end of enumerator list [-pedantic]
28:14.20 /home/brian/src/security/pkix/include/pkix/pkixtypes.h:86:24: error: comma at end of enumerator list [-pedantic]
28:14.20 In file included from /home/brian/src/security/pkix/lib/pkixutil.h:28:0,
28:14.20                  from /home/brian/src/security/pkix/lib/pkixbuild.cpp:28:
28:14.20 /home/brian/src/security/pkix/lib/pkixder.h:49:29: error: comma at end of enumerator list [-pedantic]
28:14.20 /home/brian/src/security/pkix/lib/pkixder.h:74:38: error: comma at end of enumerator list [-pedantic]
28:14.20 /home/brian/src/security/pkix/lib/pkixder.h:268:15: error: comma at end of enumerator list [-pedantic]
28:14.20 /home/brian/src/security/pkix/lib/pkixder.h:606:8: error: comma at end of enumerator list [-pedantic]
28:14.22 In the directory  /home/brian/src/obj-debug/security/pkix
28:14.22 The following command failed to execute properly:
28:14.22 c++ -o pkixbuild.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include /home/brian/src/config/gcc_hidden_dso_handle.h -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_GLUE_IN_PROGRAM -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -I/home/brian/src/security/pkix -I. -I/home/brian/src/security/pkix/include -I../../dist/include -I/home/brian/src/obj-debug/dist/include/nspr -I/home/brian/src/obj-debug/dist/include/nss -fPIC -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/pkixbuild.o.pp -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DDEBUG -DTRACING -g -fno-omit-frame-pointer -Wall -Wextra -pedantic-errors /home/brian/src/security/pkix/lib/pkixbuild.cpp
I am happy to review a patch that fixes this for GCC 4.6 by removing -pendantic-errors for GCC 4.6 (and/or 4.7). Let's leave it activated for GCC 4.8+ though.
Is there a way to turn it off?
Depends on: 1144155
With bug 1144155 landed and uplifted, as of Gecko 38, gcc-4.7 is now officially our minimum supported version.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.