On a 10.3 host (i386) the security/nss package looks to be in disaray, it is affected by two problems. The used ports tree was updated using portsnap a few tens of minutes before. 1/ Some patches can not be applied # pwd /usr/ports/security/nss # make patch ===> License MPL accepted by the user ===> nss-3.32 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by nss-3.32 for building ===> Extracting for nss-3.32 => SHA256 Checksum OK for nss-3.32.tar.gz. ===> Patching for nss-3.32 ===> Applying FreeBSD patches for nss-3.32 No such line 52 in input file, ignoring No such line -11 in input file, ignoring No such line 118 in input file, ignoring /usr/bin/find /usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/tests -name '*.sh' | /usr/bin/xargs /usr/bin/grep -l -F '/bin/bash' | /usr/bin/xargs /usr/bin/sed -i.bak -e 's|#! */bin/bash|#!/bin/sh|' 2/ When ignoring those patch failures the port fails to build. # make [...] gmake[5]: Entering directory '/usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign/mangle' ../../../coreconf/nsinstall/FreeBSD10.3_OPT.OBJ/nsinstall -R -m 775 FreeBSD10.3_OPT.OBJ/mangle ../../../../dist/FreeBSD10.3_OPT.OBJ/bin gmake[5]: Leaving directory '/usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign/mangle' cd FreeBSD10.3_OPT.OBJ ; sh '/usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign/.'/sign.sh '/usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign/../../../dist/FreeBSD10.3_OPT.OBJ' \ '/usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign/FreeBSD10.3_OPT.OBJ' FreeBSD \ '/usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign/../../../dist/FreeBSD10.3_OPT.OBJ/lib' '/usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign/../../../dist/FreeBSD10.3_OPT.OBJ/lib/libsoftokn3.so' /usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign/FreeBSD10.3_OPT.OBJ/shlibsign -v -i /usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign/../../../dist/FreeBSD10.3_OPT.OBJ/lib/libsoftokn3.so moduleSpec configdir='' certPrefix='' keyPrefix='' secmod='' flags=noCertDB, noModDB Illegal instruction (core dumped) gmake[4]: *** [Makefile:92: ../../../dist/FreeBSD10.3_OPT.OBJ/lib/libsoftokn3.chk] Error 132 gmake[4]: Leaving directory '/usr/obj/ports/usr/ports/security/nss/work/nss-3.32/nss/cmd/shlibsign' [...]
Does your CPU support SSE2? If not this is probably upstream regression since 3.32.
(In reply to Jan Beich from comment #1) Indeed, it does not support the SSE2 instructions, here are the boot messages: CPU: AMD Sempron(tm) 3000+ (1999.82-MHz 686-class CPU) Origin="AuthenticAMD" Id=0x6a0 Family=0x6 Model=0xa Stepping=0 Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE> AMD Features=0xc0480800<SYSCALL,MP,MMX+,3DNow!+,3DNow!>
A commit references this bug: Author: jbeich Date: Wed Oct 4 07:51:05 UTC 2017 New revision: 451183 URL: https://svnweb.freebsd.org/changeset/ports/451183 Log: security/nss: fix crash on pre-SSE2 hardware PR: 221466 Obtained from: upstream Changes: head/security/nss/Makefile head/security/nss/files/patch-bug1400603
A commit references this bug: Author: jbeich Date: Wed Oct 4 07:53:36 UTC 2017 New revision: 451184 URL: https://svnweb.freebsd.org/changeset/ports/451184 Log: MFH: r451183 security/nss: fix crash on pre-SSE2 hardware PR: 221466 Obtained from: upstream Approved by: ports-secteam blanket Changes: _U branches/2017Q4/ branches/2017Q4/security/nss/Makefile branches/2017Q4/security/nss/files/patch-bug1400603
Bertrand, can you confirm the port now builds and runs fine on your hardware?
(In reply to Jan Beich from comment #5) I confirm that security/nss now compiles on i386 hardware. Thank you for this fix.
First, if the problem really is due to SSE2-features missing on the build-machine, the test should be further tightened: -.if ${OPSYS} == FreeBSD && ${ARCH} == i386 +.if ${OPSYS} == FreeBSD && ${ARCH} == i386 && ${MACHINE_CPU:Msse2} == "" This would allow a vast number of machines to still build nss without building a whole new compiler first. Second, if this is an upstream bug, should we not, perhaps, patch it? How is it, that FreeBSD's base C-compiler is unable to compile nss?
Perhaps more importantly, the upstream bug 1400603 is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1400603 and, indeed, our port no longer carries the files/patch-bug1400603 . Should not the requirement for a special compiler be lifted unconditionally then?
No, SSE2 code is always built but disabled at runtime via CPUID check. I don't plan to spend time working around Clang 3.4 on FreeBSD 10.* lacking https://llvm.org/viewvc/llvm-project?view=revision&revision=239883 In file included from gcm.c:12: In file included from ./gcm.h:21: /usr/include/clang/3.4.1/emmintrin.h:28:2: error: "SSE2 instruction set not enabled" #error "SSE2 instruction set not enabled" ^ In file included from gcm.c:12: ./gcm.h:63:5: error: unknown type name '__m128i' __m128i x, h; ^ 2 errors generated.
Well, you certainly should be able to find time to add the SSE2-check I proposed. I built nss just fine that way yesterday on 10.4/i386 - with -march=native - using the base compiler.
A commit references this bug: Author: jbeich Date: Thu Dec 14 17:17:12 UTC 2017 New revision: 456314 URL: https://svnweb.freebsd.org/changeset/ports/456314 Log: MFH: r456313 security/nss: don't pull llvm40 on 10.* i386 if CPUTYPE is set PR: 221466 Submitted by: mi Approved by: ports-secteam blanket Changes: _U branches/2017Q4/ branches/2017Q4/security/nss/Makefile