[MacPorts] #51196: nss 3.23 does not build on Mac Os X 10.6.8, Snow Leopard, because of "unrecognized command line option "-std=c++0x""

MacPorts noreply at macports.org
Thu Apr 21 13:54:20 PDT 2016


#51196: nss 3.23 does not build on Mac Os X 10.6.8, Snow Leopard, because of
"unrecognized command line option "-std=c++0x""
------------------------------+--------------------------------
  Reporter:  Peter_Dyballa@…  |      Owner:  macports-tickets@…
      Type:  defect           |     Status:  new
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.3.4
Resolution:                   |   Keywords:
      Port:  nss              |
------------------------------+--------------------------------

Comment (by Peter_Dyballa@…):

 Trying the patch `std=.patch` allows compilation of `gtest-all.c`. But now
 a new error arrises:

 {{{
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_nss/nss/work/nss-3.23/nss/external_tests/google_test'
 cd der_gtest; /usr/bin/make libs
 make[2]: Entering directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_nss/nss/work/nss-3.23/nss/external_tests/der_gtest'
 if test ! -d Output.OBJD; then rm -rf Output.OBJD;
 ../../coreconf/nsinstall/Output.OBJD/nsinstall -D Output.OBJD; fi
 /usr/bin/llvm-g++-4.2 -arch x86_64 -o Output.OBJD/der_getint_unittest.o -c
 -Os -fPIC  -fno-common -pipe -DDARWIN -DHAVE_STRERROR -DHAVE_BSD_FLOCK
 -Wall -DNSS_NO_GCC48 -DXP_UNIX -UDEBUG -DNDEBUG -DUSE_UTIL_DIRECTLY
 -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES
 -I../../external_tests/google_test/gtest/include
 -I../../external_tests/common -I/opt/local/include/nspr
 -I../../../dist/Output.OBJD/include -I../../../dist/public/nss
 -I../../../dist/private/nss -I../../../dist/public/nspr
 -I../../../dist/public/nss -I../../../dist/public/libdbm
 -I../../../dist/public/gtest   der_getint_unittest.cc
 In file included from der_getint_unittest.cc:14:
 ../../external_tests/common/scoped_ptrs.h:33: error: expected initializer
 before ‘<’ token
 ../../external_tests/common/scoped_ptrs.h:34: error: expected initializer
 before ‘<’ token
 ../../external_tests/common/scoped_ptrs.h:35: error: expected initializer
 before ‘<’ token
 ../../external_tests/common/scoped_ptrs.h:36: error: expected initializer
 before ‘<’ token
 ../../external_tests/common/scoped_ptrs.h:37: error: expected initializer
 before ‘<’ token
 ../../external_tests/common/scoped_ptrs.h:38: error: expected initializer
 before ‘<’ token
 ../../external_tests/common/scoped_ptrs.h:39: error: expected initializer
 before ‘<’ token
 make[2]: *** [Output.OBJD/der_getint_unittest.o] Error 1
 }}}

 So it's this block of C++ statements that the used Apple GCC 4.2 does not
 understand:

 {{{
    31   #define SCOPED(x) typedef std::unique_ptr<x, ScopedMaybeDelete<x>
 > Scoped ## x
    32
    33   SCOPED(PK11SlotInfo);
    34   SCOPED(SECItem);
    35   SCOPED(PK11SymKey);
    36   SCOPED(SECKEYPublicKey);
    37   SCOPED(SECKEYPrivateKey);
    38   SCOPED(SECAlgorithmID);
    39   SCOPED(CERTSubjectPublicKeyInfo);
    40
    41   #undef SCOPED
 }}}

 I think this means that at least GCC 4.8 has to be used, taking into
 account also the warning from `coreconf/Werror.mk`… (but I am no C++
 expert)

-- 
Ticket URL: <https://trac.macports.org/ticket/51196#comment:2>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list