On Thu, May 25, 2023 at 02:14:46PM +0100, Dennis Jackson wrote: > Are you sure that your > environment is configured to use the correct gcc version? It might be you > have gcc 9 installed but not selected.
I think you're on to something; I did already install gcc 9, as I was aware is was necessary to build the source. "rpm -qa '^gcc*" shows me several versions of gcc RPMs are installed. Oddly, this distribution doesn't use 'update-alternatives' to manage which version is in use, and indeed 4.8.5 is the default version in play. It looks like gcc 9's binary is named '/usr/bin/gcc-9'. Similarly, g++ is '/usr/bin/g++-9'. build.sh doesn't seem to directly support overriding the name of the C compiler, but it looks like it honors some environment variables (e.g. CC): env CC=gcc-9 CXX=g++-9 nss/build.sh --with-nspr=/usr/include/nspr4 -v >& build.log And that gets me much farther. My new failure is in compiling nss_bogo_shim.cc. If you're willing to cast an eye on this: FAILED: obj/gtests/nss_bogo_shim/nss_bogo_shim.nss_bogo_shim.o g++-9 -MMD -MF obj/gtests/nss_bogo_shim/nss_bogo_shim.nss_bogo_shim.o.d -DNSS_USE_STATIC_LIBS -DNSS_FIPS_DISABLED -DNSS_NO_INIT_SUPPORT -DNSS_X86_OR_X64 -DNSS_X64 -DNSS_USE_64 -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -DLINUX2_1 -DLINUX -Dlinux -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSDB_MEASURE_USE_TEMP_DIR -DHAVE_STRERROR -DXP_UNIX -D_REENTRANT -DNSS_DISABLE_DBM -DNSS_DISABLE_LIBPKIX -DDEBUG -I../../lib/ssl -I/usr/include/nspr4 -I/home/breichert/build/nss-3.89.1/dist/private/nss -I/home/breichert/build/nss-3.89.1/dist/public/nss -I../../cpputil -fPIC -pipe -ffunction-sections -fdata-sections -m64 -Werror -Wall -Wshadow -O0 -g -gdwarf-2 -std=c++11 -c ../../gtests/nss_bogo_shim/nss_bogo_shim.cc -o obj/gtests/nss_bogo_shim/nss_bogo_shim.nss_bogo_shim.o ../../gtests/nss_bogo_shim/nss_bogo_shim.cc: In function ‘void StringRemoveNewlines(std::string&)’: ../../gtests/nss_bogo_shim/nss_bogo_shim.cc:42:66: error: no matching function for call to ‘std::basic_string<char>::erase(__gnu_cxx::__normal_iterator<char*, std::basic_string<char> >, std::basic_string<char>::const_iterator)’ 42 | str.erase(std::remove(str.begin(), str.end(), '\n'), str.cend()); | ^ In file included from /usr/include/c++/9/string:55, from /usr/include/c++/9/bits/locale_classes.h:40, from /usr/include/c++/9/bits/ios_base.h:41, from /usr/include/c++/9/ios:42, from /usr/include/c++/9/ostream:38, from /usr/include/c++/9/iostream:39, from ../../gtests/nss_bogo_shim/config.h:16, from ../../gtests/nss_bogo_shim/nss_bogo_shim.cc:6: /usr/include/c++/9/bits/basic_string.h:4698:7: note: candidate: ‘std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’ 4698 | erase(size_type __pos = 0, size_type __n = npos) | ^~~~~ /usr/include/c++/9/bits/basic_string.h:4698:23: note: no known conversion for argument 1 from ‘__gnu_cxx::__normal_iterator<char*, std::basic_string<char> >’ to ‘std::basic_string<char>::size_type’ {aka ‘long unsigned int’} 4698 | erase(size_type __pos = 0, size_type __n = npos) | ~~~~~~~~~~^~~~~~~~~ /usr/include/c++/9/bits/basic_string.h:4714:7: note: candidate: ‘std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]’ 4714 | erase(iterator __position) | ^~~~~ /usr/include/c++/9/bits/basic_string.h:4714:7: note: candidate expects 1 argument, 2 provided /usr/include/c++/9/bits/basic_string.h:4734:7: note: candidate: ‘std::basic_string<_CharT, _Traits, _Alloc>::iterator std::basic_string<_CharT, _Traits, _Alloc>::erase(std::basic_string<_CharT, _Traits, _Alloc>::iterator, std::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >; typename _Alloc::rebind<_CharT>::other::pointer = char*]’ 4734 | erase(iterator __first, iterator __last); | ^~~~~ /usr/include/c++/9/bits/basic_string.h:4734:40: note: no known conversion for argument 2 from ‘__normal_iterator<const char*,[...]>’ to ‘__normal_iterator<char*,[...]>’ 4734 | erase(iterator __first, iterator __last); | ~~~~~~~~~^~~~~~ ../../gtests/nss_bogo_shim/nss_bogo_shim.cc:43:66: error: no matching function for call to ‘std::basic_string<char>::erase(__gnu_cxx::__normal_iterator<char*, std::basic_string<char> >, std::basic_string<char>::const_iterator)’ 43 | str.erase(std::remove(str.begin(), str.end(), '\r'), str.cend()); | etc... > > Best, > Dennis > > On Wed, 24 May 2023 at 20:57, Brian Reichert <reich...@numachi.com> wrote: > > > I'm exploring building nss-3.89.1 under SLES12 SP5, but hitting a > > brick wall, right out of the gate. > > > > This host is fully updated, has gcc9-c++, gyp, and ninja installed. > > > > This also has mozilla-nspr-devel-4.35-19.12.0.x86_64 installed > > (locally built); that has put header files under /usr/include/nspr4. > > > > I've be happy to provide specific dev toolchain version numbers, > > if that would be helpful. > > > > Steps taken: > > > > breichert@sles12breichert:~/build> wget > > https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_89_1_RTM/src/nss-3.89.1.tar.gz > > > > breichert@sles12breichert:~/build> tar zxf nss-3.89.1.tar.gz > > > > breichert@sles12breichert:~/build> cd nss-3.89.1/ > > > > breichert@sles12breichert:~/build/nss-3.89.1> nss/build.sh > > --with-nspr=/usr/include/nspr4 -v >& build.log > > > > The build starts to go wrong here; dunno if anyone has any feedback > > they can provide. I'm not a C++ developer, and never have enjoyed > > untangling C++ build failures: > > > > [220/1256] c++ -MMD -MF > > obj/gtests/util_gtest/util_gtest.util_b64_unittest.o.d -DNSS_FIPS_DISABLED > > -DNSS_NO_INIT_SUPPORT -DNSS_X86_OR_X64 -DNSS_X64 -DNSS_USE_64 > > -DNSS_USE_STATIC_LIBS -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT > > -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -DLINUX2_1 -DLINUX -Dlinux > > -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSDB_MEASURE_USE_TEMP_DIR > > -DHAVE_STRERROR -DXP_UNIX -D_REENTRANT -DNSS_DISABLE_DBM > > -DNSS_DISABLE_LIBPKIX -DDEBUG -I../../lib/util -I/usr/include/nspr4 > > -I/home/breichert/build/nss-3.89.1/dist/private/nss > > -I../../gtests/google_test/gtest/include -I../../gtests/common > > -I../../cpputil -I/home/breichert/build/nss-3.89.1/dist/public/nss > > -Wsign-compare -fPIC -pipe -ffunction-sections -fdata-sections -m64 -Werror > > -Wall -Wshadow -O0 -g -gdwarf-2 -std=c++11 -c > > ../../gtests/util_gtest/util_b64_unittest.cc -o > > obj/gtests/util_gtest/util_gtest.util_b64_unittest.o > > FAILED: obj/gtests/util_gtest/util_gtest.util_b64_unittest.o > > c++ -MMD -MF obj/gtests/util_gtest/util_gtest.util_b64_unittest.o.d > > -DNSS_FIPS_DISABLED -DNSS_NO_INIT_SUPPORT -DNSS_X86_OR_X64 -DNSS_X64 > > -DNSS_USE_64 -DNSS_USE_STATIC_LIBS -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT > > -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -DLINUX2_1 -DLINUX -Dlinux > > -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSDB_MEASURE_USE_TEMP_DIR > > -DHAVE_STRERROR -DXP_UNIX -D_REENTRANT -DNSS_DISABLE_DBM > > -DNSS_DISABLE_LIBPKIX -DDEBUG -I../../lib/util -I/usr/include/nspr4 > > -I/home/breichert/build/nss-3.89.1/dist/private/nss > > -I../../gtests/google_test/gtest/include -I../../gtests/common > > -I../../cpputil -I/home/breichert/build/nss-3.89.1/dist/public/nss > > -Wsign-compare -fPIC -pipe -ffunction-sections -fdata-sections -m64 -Werror > > -Wall -Wshadow -O0 -g -gdwarf-2 -std=c++11 -c > > ../../gtests/util_gtest/util_b64_unittest.cc -o > > obj/gtests/util_gtest/util_gtest.util_b64_unittest.o > > In file included from > > > > ../../gtests/google_test/gtest/include/gtest/internal/gtest-death-test-internal.h:39:0, > > from > > ../../gtests/google_test/gtest/include/gtest/gtest-death-test.h:41, > > from > > ../../gtests/google_test/gtest/include/gtest/gtest.h:64, > > from ../../gtests/util_gtest/util_b64_unittest.cc:11: > > ../../gtests/google_test/gtest/include/gtest/gtest-matchers.h: In static > > member function ???static constexpr bool > > testing::internal::MatcherBase<T>::IsInlined()???: > > ../../gtests/google_test/gtest/include/gtest/gtest-matchers.h:414:12: > > error: > > ???is_trivially_copy_constructible??? is not a member of > > ???std??? > > std::is_trivially_copy_constructible<M>::value && > > ^ > > ../../gtests/google_test/gtest/include/gtest/gtest-matchers.h:414:50: > > error: > > expected primary-expression before ???>??? token > > std::is_trivially_copy_constructible<M>::value && > > ^ > > ../../gtests/google_test/gtest/include/gtest/gtest-matchers.h:414:51: > > error: > > ???::value??? has not been declared > > std::is_trivially_copy_constructible<M>::value && > > > > > > -- > > Brian Reichert <reich...@numachi.com> > > BSD admin/developer at large > > > > -- > > You received this message because you are subscribed to the Google Groups " > > dev-tech-crypto@mozilla.org" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to dev-tech-crypto+unsubscr...@mozilla.org. > > To view this discussion on the web visit > > https://groups.google.com/a/mozilla.org/d/msgid/dev-tech-crypto/20230524184301.GA5612%40numachi.com > > . > > -- Brian Reichert <reich...@numachi.com> BSD admin/developer at large -- You received this message because you are subscribed to the Google Groups "dev-tech-crypto@mozilla.org" group. To unsubscribe from this group and stop receiving emails from it, send an email to dev-tech-crypto+unsubscr...@mozilla.org. To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-tech-crypto/20230525150251.GB62065%40numachi.com.