Closed Bug 1414198 Opened 7 years ago Closed 7 years ago

build failure in security/manager/ssl/tests/gtest/CertListTest.cpp

Categories

(Core :: Security: PSM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: dan, Assigned: jcj)

Details

Attachments

(1 file)

Our CI shows that a change that was included on Oct 30th broke build of trunk on all our non-x86 arches (aarch64, ppc64, ppc64le, s390x). The symptom is

...
/usr/bin/g++ -std=gnu++11 -o CertListTest.o -c -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu/dist/stl_wrappers -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu/dist/system_wrappers -include /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu/security/manager/ssl/tests/gtest -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/certverifier -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/pkix/include -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/pkix/test/lib -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu/ipc/ipdl/_ipdlheaders -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/ipc/chromium/src -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/ipc/glue -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu/dist/include -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu/dist/include/nspr -I/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu/mozilla-config.h -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wc++1z-compat -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-overflow=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -g -freorder-blocks -O2 -fno-omit-frame-pointer -Wno-error=shadow  -MD -MP -MF .deps/CertListTest.o.pp   /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp
In file included from /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:13:0:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:72:20: error: ‘function’ in namespace ‘std’ does not name a template type
 typedef const std::function<nsresult(nsCOMPtr<nsIX509Cert>& aCert,
                    ^~~~~~~~
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:38: error: ‘ForEachCertOperation’ has not been declared
   nsresult ForEachCertificateInChain(ForEachCertOperation& aOperation);
                                      ^~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp: In function ‘int CountCertsInList(nsCOMPtr<nsIX509CertList>&)’:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:158:4: error: no matching function for call to ‘nsNSSCertList::ForEachCertificateInChain(CountCertsInList(nsCOMPtr<nsIX509CertList>&)::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>)’
   });
    ^
In file included from /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:13:0:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note: candidate: nsresult nsNSSCertList::ForEachCertificateInChain(int&)
   nsresult ForEachCertificateInChain(ForEachCertOperation& aOperation);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note:   no known conversion for argument 1 from ‘CountCertsInList(nsCOMPtr<nsIX509CertList>&)::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>’ to ‘int&’
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp: In member function ‘virtual void psm_CertList_TestValidSegmenting_Test::TestBody()’:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:269:6: error: invalid user-defined conversion from ‘psm_CertList_TestValidSegmenting_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>’ to ‘int&’ [-fpermissive]
     });
      ^
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:252:68: note: candidate is: psm_CertList_TestValidSegmenting_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>::operator nsresult (*)(nsCOMPtr<nsIX509Cert>, bool, bool&)() const <near match>
     [] (nsCOMPtr<nsIX509Cert> aCert, bool aHasMore, bool& aContinue) {
                                                                    ^
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:252:68: note:   no known conversion from ‘nsresult (*)(nsCOMPtr<nsIX509Cert>, bool, bool&)’ to ‘int’
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:269:6: error: invalid conversion from ‘nsresult (*)(nsCOMPtr<nsIX509Cert>, bool, bool&)’ to ‘int’ [-fpermissive]
     });
      ^
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:269:6: error: conversion to non-const reference type ‘int&’ from rvalue of type ‘nsresult (*)(nsCOMPtr<nsIX509Cert>, bool, bool&)’ [-fpermissive]
In file included from /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:13:0:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note:   initializing argument 1 of ‘nsresult nsNSSCertList::ForEachCertificateInChain(int&)’
   nsresult ForEachCertificateInChain(ForEachCertOperation& aOperation);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp: In member function ‘virtual void psm_CertList_TestForEach_Test::TestBody()’:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:282:6: error: no matching function for call to ‘nsNSSCertList::ForEachCertificateInChain(psm_CertList_TestForEach_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>)’
     });
      ^
In file included from /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:13:0:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note: candidate: nsresult nsNSSCertList::ForEachCertificateInChain(int&)
   nsresult ForEachCertificateInChain(ForEachCertOperation& aOperation);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note:   no known conversion for argument 1 from ‘psm_CertList_TestForEach_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>’ to ‘int&’
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:331:6: error: no matching function for call to ‘nsNSSCertList::ForEachCertificateInChain(psm_CertList_TestForEach_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>)’
     });
      ^
In file included from /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:13:0:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note: candidate: nsresult nsNSSCertList::ForEachCertificateInChain(int&)
   nsresult ForEachCertificateInChain(ForEachCertOperation& aOperation);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note:   no known conversion for argument 1 from ‘psm_CertList_TestForEach_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>’ to ‘int&’
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp: In member function ‘virtual void psm_CertList_TestForEachContinueSafety_Test::TestBody()’:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:351:6: error: no matching function for call to ‘nsNSSCertList::ForEachCertificateInChain(psm_CertList_TestForEachContinueSafety_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>)’
     });
      ^
In file included from /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:13:0:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note: candidate: nsresult nsNSSCertList::ForEachCertificateInChain(int&)
   nsresult ForEachCertificateInChain(ForEachCertOperation& aOperation);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note:   no known conversion for argument 1 from ‘psm_CertList_TestForEachContinueSafety_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>’ to ‘int&’
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp: In member function ‘virtual void psm_CertList_TestForEachStopEarly_Test::TestBody()’:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:372:6: error: no matching function for call to ‘nsNSSCertList::ForEachCertificateInChain(psm_CertList_TestForEachStopEarly_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>)’
     });
      ^
In file included from /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:13:0:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note: candidate: nsresult nsNSSCertList::ForEachCertificateInChain(int&)
   nsresult ForEachCertificateInChain(ForEachCertOperation& aOperation);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note:   no known conversion for argument 1 from ‘psm_CertList_TestForEachStopEarly_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>’ to ‘int&’
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp: In member function ‘virtual void psm_CertList_TestForEachStopOnError_Test::TestBody()’:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:393:6: error: no matching function for call to ‘nsNSSCertList::ForEachCertificateInChain(psm_CertList_TestForEachStopOnError_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>)’
     });
      ^
In file included from /home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/tests/gtest/CertListTest.cpp:13:0:
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note: candidate: nsresult nsNSSCertList::ForEachCertificateInChain(int&)
   nsresult ForEachCertificateInChain(ForEachCertOperation& aOperation);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/security/manager/ssl/nsNSSCertificate.h:99:12: note:   no known conversion for argument 1 from ‘psm_CertList_TestForEachStopOnError_Test::TestBody()::<lambda(nsCOMPtr<nsIX509Cert>, bool, bool&)>’ to ‘int&’
make[5]: *** [/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/config/rules.mk:1050: CertListTest.o] Error 1
make[5]: Leaving directory '/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu/security/manager/ssl/tests/gtest'
make[4]: *** [/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/config/recurse.mk:73: security/manager/ssl/tests/gtest/target] Error 2
make[4]: Leaving directory '/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu'
make[3]: *** [/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/config/recurse.mk:33: compile] Error 2
make[3]: Leaving directory '/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu'
make[2]: *** [/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/config/rules.mk:452: default] Error 2
make[2]: Leaving directory '/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/obj-s390x-ibm-linux-gnu'
make[1]: *** [/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src/client.mk:317: realbuild] Error 2
make[1]: Leaving directory '/home/jenkins/workspace/Firefox-default/label/s390x/firefox-src'
make: *** [client.mk:142: build] Error 2
Build step 'Execute shell' marked build as failure
Maybe nsNSSCertificate.h needs to #include <functional>?
Flags: needinfo?(jjones)
(In reply to David Keeler [:keeler] (use needinfo?) from comment #1)
> Maybe nsNSSCertificate.h needs to #include <functional>?

I guess so for this platform. I'll put up the basic patch and see if it helps.
Flags: needinfo?(jjones)
Assignee: nobody → jjones
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(In reply to J.C. Jones [:jcj] from comment #2)
> (In reply to David Keeler [:keeler] (use needinfo?) from comment #1)
> > Maybe nsNSSCertificate.h needs to #include <functional>?
> 
> I guess so for this platform. I'll put up the basic patch and see if it
> helps.

Thanks, it fixes the problem.
Comment on attachment 8925193 [details]
Bug 1414198 - Include <functional> in nsNSSCertificate.h

https://reviewboard.mozilla.org/r/196432/#review202362
Attachment #8925193 - Flags: review?(dkeeler) → review+
Pushed by dkeeler@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c4b0c5cb5fc
Include <functional> in nsNSSCertificate.h r=keeler
https://hg.mozilla.org/mozilla-central/rev/9c4b0c5cb5fc
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: