Closed
Bug 1226179
Opened 9 years ago
Closed 9 years ago
3.21 build failure on OpenBSD with gcc 4.2.1
Categories
(NSS :: Libraries, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
3.23
People
(Reporter: gaston, Assigned: gaston)
References
Details
Attachments
(1 file, 2 obsolete files)
5.05 KB,
patch
|
gaston
:
feedback+
jbeich
:
feedback+
|
Details | Diff | Splinter Review |
Build fails with In file included from secoid.c:1915: verref.h: In function 'SECOID_Init': verref.h:22: error: #pragma GCC diagnostic not allowed inside functions verref.h:23: error: #pragma GCC diagnostic not allowed inside functions verref.h:31: warning: unused variable '_nss_version_c' verref.h:39: error: #pragma GCC diagnostic not allowed inside functions Probable fallout of the #pragma addition in #1182667
Assignee | ||
Comment 1•9 years ago
|
||
Another nasty one: g++ -o OpenBSD5.8_64_OPT.OBJ/ssl_agent_unittest.o -c -fPIC -DPIC -ansi -Wall -Wno-switch -pipe -DOPENBSD -DXP_UNIX -UDEBUG -DNDEBUG -pthr ead -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../external_tests/google_test/gtest/include - I/usr/local/include/nspr -I../../../dist/OpenBSD5.8_64_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../di st/public/nspr -I../../../dist/public/nss -I../../../dist/public/libdbm -I../../../dist/public/gtest -I/usr/local/include -O2 -pipe -I../ ../lib/ssl -std=c++0x ssl_agent_unittest.cc cc1plus: error: unrecognized command line option "-std=c++0x" So nss decided to unsupported old compilers on purpose or it's an oversight ?
Comment 2•9 years ago
|
||
You probably want to disable gtests. Have a look at bug 1225377 comment 3. That should at least solve the problem from comment 1
Assignee | ||
Comment 3•9 years ago
|
||
Sorry, but only disabling gtests wont fix the #pragma error, i think there needs another check for the gcc version to enable those..
Assignee | ||
Comment 4•9 years ago
|
||
#pragma GCC diagnostic was added in gcc 4.6. Testing this in the #ifdef #if defined(__GNUC__) && !defined(NSS_NO_GCC48) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
Assignee | ||
Comment 5•9 years ago
|
||
Assignee: nobody → landry
Attachment #8699168 -
Flags: review?(martin.thomson)
Comment 6•9 years ago
|
||
The test for the right compiler version is more difficult than you have in your patch. This should work better.
Attachment #8699168 -
Attachment is obsolete: true
Attachment #8699168 -
Flags: review?(martin.thomson)
Attachment #8699348 -
Flags: review?(landry)
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8699348 [details] [diff] [review] bug1226179.patch That doesn't seem to work on 3.21, replacing my patch - which is *not* about -Werror but about #pragma diagnostic : ===> Building for nss-3.21 coreconf/Werror.mk:55: Unable to find gcc 4.8 or greater, disabling -Werror But the build still fails the same: In file included from secoid.c:1915: verref.h: In function 'SECOID_Init': verref.h:22: error: #pragma GCC diagnostic not allowed inside functions verref.h:23: error: #pragma GCC diagnostic not allowed inside functions verref.h:31: warning: unused variable '_nss_version_c' verref.h:39: error: #pragma GCC diagnostic not allowed inside functions
Attachment #8699348 -
Flags: review?(landry) → review-
Comment 0 also affects FreeBSD 9.x and NetBSD 6.x [1]. [1] https://github.com/jsonn/pkgsrc/commit/86e9200dfb187688af35a55fb6a08580f30cae96
Comment 9•9 years ago
|
||
This should make the changes more thorough. I still don't understand how -Werror was being set for platforms other than Linux, since none of the makefiles for those platforms was including the Werror.mk file, or referencing WARNING_CFLAGS anywhere. And even if they did, NSS_NO_GCC48 is defined if -Werror isn't, which would mean that the pragma isn't hit. Have you made changes to the build configuration? Or have you set any environment variables that might alter it?
Attachment #8699348 -
Attachment is obsolete: true
Attachment #8703500 -
Flags: review?(landry)
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Martin Thomson [:mt:] from comment #9) > Created attachment 8703500 [details] [diff] [review] > bug1226179.patch > > > And even if they did, NSS_NO_GCC48 is defined if -Werror isn't, which would > mean that the pragma isn't hit. Have you made changes to the build > configuration? Or have you set any environment variables that might alter > it? The changes to the build config are unrelated imo, see the few patches in http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/security/nss/patches/ - and the env vars set urelated too ,see http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/security/nss/Makefile?rev=1.56&content-type=text/x-cvsweb-markup
Assignee | ||
Comment 11•9 years ago
|
||
Comment on attachment 8703500 [details] [diff] [review] bug1226179.patch With your patch, using gmake NSPR_INCLUDE_DIR=/usr/local/include/nspr NSPR_LIB_DIR=/usr/local/lib/ USE_64=1 NSS_DISABLE_GTESTS=1 in nss tip, the build goes past verref.h, only one warning remaining on it: In file included from secoid.c:1987: verref.h: In function 'SECOID_Init': verref.h:31: warning: unused variable '_nss_version_c' -DNSS_NO_GCC48 is present in the build commands - the build is successful. (i still need NSS_DISABLE_GTESTS=1 otherwise it fails because those require stdc++11) Note that i'm not an nspr peer, so i can only f+ this...
Attachment #8703500 -
Flags: review?(ted)
Attachment #8703500 -
Flags: review?(landry)
Attachment #8703500 -
Flags: feedback+
Comment 13•9 years ago
|
||
Comment on attachment 8703500 [details] [diff] [review] bug1226179.patch This fixes build on FreeBSD 9.3-RELEASE. Like OpenBSD we're going to pass NSS_DISABLE_GTESTS before switching to system gtest. 1.7.0 doesn't require C++11 (or C++0x) by itself. https://www.freebsd.org/doc/en/books/porters-handbook/bundled-libs.html https://svnweb.freebsd.org/ports/head/devel/googletest/files/patch-bsd-defines?revision=373421&view=co
Attachment #8703500 -
Flags: feedback+
Comment 14•9 years ago
|
||
Thanks for checking. We certainly intended for the C++ code to be disabled in builds like that. Firefox builds disable it as well.
Comment 17•9 years ago
|
||
Comment on attachment 8703500 [details] [diff] [review] bug1226179.patch Review of attachment 8703500 [details] [diff] [review]: ----------------------------------------------------------------- Well, I'm fairly sure that I'm allowed to check this in, so I'm going to. Sorry ted, not paying enough attention.
Attachment #8703500 -
Flags: review?(ted)
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.23
You need to log in
before you can comment on or make changes to this bug.
Description
•