Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56486 closed defect (fixed)

nss @3.37 does not build on a 32-bit PPC

Reported by: josephsacco Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: powerpc Cc: ryandesign (Ryan Carsten Schmidt)
Port: nss

Description

nss @3.37 does not build on a 32-bit PPC. See below.

-Joseph

info:build Undefined symbols:
:info:build   "_FStar_UInt128_add_mod", referenced from:
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build   "_FStar_UInt128_uint64_to_uint128", referenced from:
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build   "_FStar_UInt128_logor", referenced from:
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build   "_FStar_UInt128_shift_right", referenced from:
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build   "_FStar_UInt128_logand", referenced from:
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build   "_FStar_UInt128_uint128_to_uint64", referenced from:
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build   "_FStar_UInt128_shift_left", referenced from:
:info:build       _Hacl_Poly1305_32_init in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_crypto_onetimeauth in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build       _Hacl_Poly1305_32_finish in Hacl_Poly1305_32.o
:info:build ld: symbol(s) not found

Attachments (1)

nss-fail-gcc6.log (179.8 KB) - added by kencu (Ken) 6 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 6 years ago by kencu (Ken)

May not be simple to fix. building it with gcc6 also failed. full log attached.

Changed 6 years ago by kencu (Ken)

Attachment: nss-fail-gcc6.log added

comment:2 Changed 6 years ago by kencu (Ken)

all the missing functions seem to be defined as static inlines in a header called kremlib.h

https://github.com/FStarLang/kremlin/blob/master/kremlib/kremlib.h

comment:3 Changed 6 years ago by jmroot (Joshua Root)

Sounds like an upstream bug if they're depending on code being emitted for static inline functions. Using -fkeep-inline-functions may be a workaround.

comment:4 Changed 6 years ago by josephsacco

FWIW... The files causing the problem, Hacl_Poly1305_32.[ch] , did not exist in nss-3.36.1. Seems to be a recent addition. See:

https://bugzilla.mozilla.org/show_bug.cgi?id=1441219#a6062859_537492

-Joseph

comment:5 Changed 6 years ago by kencu (Ken)

Right. Looks like you might define this on ppc and disable it:

NSS_DISABLE_CHACHAPOLY

comment:6 Changed 6 years ago by kencu (Ken)

better, maybe. But looks like disabling chachapoly (whatever that is) doesn't really completely disable it, because it's still looking for some bit of it later on:

/usr/bin/gcc-4.2 -arch ppc  -o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_25519.o -c -Os -fPIC -Dppc -fno-common -pipe -DDARWIN -DHAVE_STRERROR -DHAVE_BSD_FLOCK  -Wall -Wshadow -DNSS_NO_GCC48 -DXP_UNIX -DSHLIB_SUFFIX=\"dylib\" -DSHLIB_PREFIX=\"lib\" -DSHLIB_VERSION=\"3\" -DSOFTOKEN_SHLIB_VERSION=\"3\" -DRIJNDAEL_INCLUDE_TABLES -UDEBUG -DNDEBUG -DNSS_DISABLE_CHACHAPOLY -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -DKRML_NOUINT128 -DMP_API_COMPATIBLE -I/opt/local/include/nspr -I../../../dist/Output.OBJD/include -I../../../dist/public/nss -I../../../dist/private/nss -Impi -Iecl -Iverified  -std=gnu99 ecl/ecp_25519.c
/usr/bin/gcc-4.2 -arch ppc  -o Output.OBJD/Darwin_SINGLE_SHLIB/curve25519_32.o -c -Os -fPIC -Dppc -fno-common -pipe -DDARWIN -DHAVE_STRERROR -DHAVE_BSD_FLOCK  -Wall -Wshadow -DNSS_NO_GCC48 -DXP_UNIX -DSHLIB_SUFFIX=\"dylib\" -DSHLIB_PREFIX=\"lib\" -DSHLIB_VERSION=\"3\" -DSOFTOKEN_SHLIB_VERSION=\"3\" -DRIJNDAEL_INCLUDE_TABLES -UDEBUG -DNDEBUG -DNSS_DISABLE_CHACHAPOLY -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -DKRML_NOUINT128 -DMP_API_COMPATIBLE -I/opt/local/include/nspr -I../../../dist/Output.OBJD/include -I../../../dist/public/nss -I../../../dist/private/nss -Impi -Iecl -Iverified  -std=gnu99 ecl/curve25519_32.c
grep -v ';+' freebl.def | grep -v ';-' | sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,_,' > Output.OBJD/Darwin_SINGLE_SHLIB/freebl.def
rm -f Output.OBJD/Darwin_SINGLE_SHLIB/libfreebl3.dylib
/usr/bin/gcc-4.2 -arch ppc  -dynamiclib -compatibility_version 1 -current_version 1 -install_name /opt/local/lib/nss/libfreebl3.dylib -headerpad_max_install_names  -exported_symbols_list Output.OBJD/Darwin_SINGLE_SHLIB/freebl.def -o Output.OBJD/Darwin_SINGLE_SHLIB/libfreebl3.dylib Output.OBJD/Darwin_SINGLE_SHLIB/freeblver.o Output.OBJD/Darwin_SINGLE_SHLIB/ldvector.o Output.OBJD/Darwin_SINGLE_SHLIB/sysrand.o Output.OBJD/Darwin_SINGLE_SHLIB/sha_fast.o Output.OBJD/Darwin_SINGLE_SHLIB/md2.o Output.OBJD/Darwin_SINGLE_SHLIB/md5.o Output.OBJD/Darwin_SINGLE_SHLIB/sha512.o Output.OBJD/Darwin_SINGLE_SHLIB/alghmac.o Output.OBJD/Darwin_SINGLE_SHLIB/rawhash.o Output.OBJD/Darwin_SINGLE_SHLIB/alg2268.o Output.OBJD/Darwin_SINGLE_SHLIB/arcfour.o Output.OBJD/Darwin_SINGLE_SHLIB/arcfive.o Output.OBJD/Darwin_SINGLE_SHLIB/crypto_primitives.o Output.OBJD/Darwin_SINGLE_SHLIB/blake2b.o Output.OBJD/Darwin_SINGLE_SHLIB/desblapi.o Output.OBJD/Darwin_SINGLE_SHLIB/des.o Output.OBJD/Darwin_SINGLE_SHLIB/drbg.o Output.OBJD/Darwin_SINGLE_SHLIB/chacha20poly1305.o Output.OBJD/Darwin_SINGLE_SHLIB/cts.o Output.OBJD/Darwin_SINGLE_SHLIB/ctr.o Output.OBJD/Darwin_SINGLE_SHLIB/blinit.o Output.OBJD/Darwin_SINGLE_SHLIB/fipsfreebl.o Output.OBJD/Darwin_SINGLE_SHLIB/gcm.o Output.OBJD/Darwin_SINGLE_SHLIB/hmacct.o Output.OBJD/Darwin_SINGLE_SHLIB/rijndael.o Output.OBJD/Darwin_SINGLE_SHLIB/aeskeywrap.o Output.OBJD/Darwin_SINGLE_SHLIB/camellia.o Output.OBJD/Darwin_SINGLE_SHLIB/dh.o Output.OBJD/Darwin_SINGLE_SHLIB/ec.o Output.OBJD/Darwin_SINGLE_SHLIB/ecdecode.o Output.OBJD/Darwin_SINGLE_SHLIB/pqg.o Output.OBJD/Darwin_SINGLE_SHLIB/dsa.o Output.OBJD/Darwin_SINGLE_SHLIB/rsa.o Output.OBJD/Darwin_SINGLE_SHLIB/rsapkcs.o Output.OBJD/Darwin_SINGLE_SHLIB/shvfy.o Output.OBJD/Darwin_SINGLE_SHLIB/tlsprfalg.o Output.OBJD/Darwin_SINGLE_SHLIB/seed.o Output.OBJD/Darwin_SINGLE_SHLIB/jpake.o Output.OBJD/Darwin_SINGLE_SHLIB/mpprime.o Output.OBJD/Darwin_SINGLE_SHLIB/mpmontg.o Output.OBJD/Darwin_SINGLE_SHLIB/mplogic.o Output.OBJD/Darwin_SINGLE_SHLIB/mpi.o Output.OBJD/Darwin_SINGLE_SHLIB/mp_gf2m.o Output.OBJD/Darwin_SINGLE_SHLIB/mpcpucache.o Output.OBJD/Darwin_SINGLE_SHLIB/ecl.o Output.OBJD/Darwin_SINGLE_SHLIB/ecl_mult.o Output.OBJD/Darwin_SINGLE_SHLIB/ecl_gf.o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_aff.o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_jac.o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_mont.o Output.OBJD/Darwin_SINGLE_SHLIB/ec_naf.o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_jm.o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_256.o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_384.o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_521.o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_256_32.o Output.OBJD/Darwin_SINGLE_SHLIB/ecp_25519.o Output.OBJD/Darwin_SINGLE_SHLIB/curve25519_32.o    -L../../../dist/Output.OBJD/lib -L../../../dist/Output.OBJD/lib -lnssutil3 -L/opt/local/lib/nspr -lnspr4  -dylib_file /opt/local/lib/nss/libplc4.dylib:../../../dist/Output.OBJD/lib/libplc4.dylib -dylib_file /opt/local/lib/nss/libplds4.dylib:../../../dist/Output.OBJD/lib/libplds4.dylib 
Undefined symbols:
  "_Hacl_Chacha20_Vec128_chacha20", referenced from:
      _ChaCha20Xor in chacha20poly1305.o
  "_Hacl_Chacha20_chacha20", referenced from:
      _ChaCha20Xor in chacha20poly1305.o

comment:7 Changed 6 years ago by josephsacco

Maybe someone with MacPorts "street-cred" could reach out to the maintainers.

-Joseph

comment:8 Changed 6 years ago by josephsacco

I have a sense of humor...

https://bugzilla.mozilla.org/show_bug.cgi?id=1461544

Maybe someone will respond

-Joseph

comment:9 Changed 6 years ago by josephsacco

The bug report I submitted to mozilla.org has been marked as a duplicate of

https://bugzilla.mozilla.org/show_bug.cgi?id=1459739

Looks like Franziskus Kiefer fixed this problem upstream. See:

https://hg.mozilla.org/projects/nss/rev/2209bddb98b8d105159998b9be91a155aa6bd283

-Joseph

comment:10 in reply to:  9 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)

Replying to josephsacco:

Looks like Franziskus Kiefer fixed this problem upstream. See:

No. The patches are already incorporated into the sources when they are downloaded. Compilation still fails. Besides, it looks as if the patches fix problems with 128 bit hardware…

patching file nss/lib/freebl/freebl.gyp
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file nss/lib/freebl/freebl.gyp.rej

comment:11 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added
Resolution: fixed
Status: newclosed

Many fixes were committed to the nss port today, and nss 3.42 builds fine for me on 32-bit Tiger PowerPC. If you still see this problem with that version or later, please reopen this ticket.

comment:12 Changed 6 years ago by josephsacco

Successfully built nss today on a G4-based PPC running OS X 10.5.8.

The build failed when using /usr/bin/gcc-4.2.

The build succeeded when using macports-gcc-6 and macports-gcc-7.

-Joseph

comment:13 in reply to:  12 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to josephsacco:

The build failed when using /usr/bin/gcc-4.2.

It should not be failing with gcc-4.2. After ensuring your ports are up to date with sudo port selfupdate, please try again with gcc-4.2, and if it fails, show us the main.log file, either in this ticket (if it's the error described at the top of this ticket) or in another ticket.

comment:14 Changed 6 years ago by josephsacco

That worked... nss built using gcc-4.2.

Onwards,

-Joseph

Note: See TracTickets for help on using tickets.