Closed Bug 1642174 Opened 5 years ago Closed 4 years ago

/usr/bin/ld: OBJS/Linux_SINGLE_SHLIB/sha512-p8.o: ABI version 2 is not compatible with ABI version 1 output

Categories

(NSS :: Libraries, defect, P1)

3.55

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Assigned: cand)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

On Powerpc64 Linux (not powerpc64le), the build fails with:

cc -shared -Wl,-z,relro -m64 -Wl,-z,defs -Wl,-soname -Wl,libfreeblpriv3.so  -Wl,--version-script,OBJS/Linux_SINGLE_SHLIB/freeblpriv.def -Wl,-Bsymbolic -o OBJS/Linux_SINGLE_SHLIB/libfreeblpriv3.so OBJS/Linux_SINGLE_SHLIB/freeblver.o OBJS/Linux_SINGLE_SHLIB/ldvector.o OBJS/Linux_SINGLE_SHLIB/sysrand.o OBJS/Linux_SINGLE_SHLIB/sha_fast.o OBJS/Linux_SINGLE_SHLIB/md2.o OBJS/Linux_SINGLE_SHLIB/md5.o OBJS/Linux_SINGLE_SHLIB/sha512.o OBJS/Linux_SINGLE_SHLIB/cmac.o OBJS/Linux_SINGLE_SHLIB/alghmac.o OBJS/Linux_SINGLE_SHLIB/rawhash.o OBJS/Linux_SINGLE_SHLIB/alg2268.o OBJS/Linux_SINGLE_SHLIB/arcfour.o OBJS/Linux_SINGLE_SHLIB/arcfive.o OBJS/Linux_SINGLE_SHLIB/crypto_primitives.o OBJS/Linux_SINGLE_SHLIB/blake2b.o OBJS/Linux_SINGLE_SHLIB/desblapi.o OBJS/Linux_SINGLE_SHLIB/des.o OBJS/Linux_SINGLE_SHLIB/drbg.o OBJS/Linux_SINGLE_SHLIB/chacha20poly1305.o OBJS/Linux_SINGLE_SHLIB/cts.o OBJS/Linux_SINGLE_SHLIB/ctr.o OBJS/Linux_SINGLE_SHLIB/blinit.o OBJS/Linux_SINGLE_SHLIB/fipsfreebl.o OBJS/Linux_SINGLE_SHLIB/gcm.o OBJS/Linux_SINGLE_SHLIB/hmacct.o OBJS/Linux_SINGLE_SHLIB/rijndael.o OBJS/Linux_SINGLE_SHLIB/aeskeywrap.o OBJS/Linux_SINGLE_SHLIB/camellia.o OBJS/Linux_SINGLE_SHLIB/dh.o OBJS/Linux_SINGLE_SHLIB/ec.o OBJS/Linux_SINGLE_SHLIB/ecdecode.o OBJS/Linux_SINGLE_SHLIB/pqg.o OBJS/Linux_SINGLE_SHLIB/dsa.o OBJS/Linux_SINGLE_SHLIB/rsa.o OBJS/Linux_SINGLE_SHLIB/rsapkcs.o OBJS/Linux_SINGLE_SHLIB/shvfy.o OBJS/Linux_SINGLE_SHLIB/tlsprfalg.o OBJS/Linux_SINGLE_SHLIB/jpake.o OBJS/Linux_SINGLE_SHLIB/mpprime.o OBJS/Linux_SINGLE_SHLIB/mpmontg.o OBJS/Linux_SINGLE_SHLIB/mplogic.o OBJS/Linux_SINGLE_SHLIB/mpi.o OBJS/Linux_SINGLE_SHLIB/mp_gf2m.o OBJS/Linux_SINGLE_SHLIB/mpcpucache.o OBJS/Linux_SINGLE_SHLIB/ecl.o OBJS/Linux_SINGLE_SHLIB/ecl_mult.o OBJS/Linux_SINGLE_SHLIB/ecl_gf.o OBJS/Linux_SINGLE_SHLIB/ecp_aff.o OBJS/Linux_SINGLE_SHLIB/ecp_jac.o OBJS/Linux_SINGLE_SHLIB/ecp_mont.o OBJS/Linux_SINGLE_SHLIB/ec_naf.o OBJS/Linux_SINGLE_SHLIB/ecp_jm.o OBJS/Linux_SINGLE_SHLIB/ecp_256.o OBJS/Linux_SINGLE_SHLIB/ecp_384.o OBJS/Linux_SINGLE_SHLIB/ecp_521.o OBJS/Linux_SINGLE_SHLIB/ecp_256_32.o OBJS/Linux_SINGLE_SHLIB/ecp_25519.o OBJS/Linux_SINGLE_SHLIB/curve25519_32.o OBJS/Linux_SINGLE_SHLIB/Hacl_Poly1305_32.o OBJS/Linux_SINGLE_SHLIB/Hacl_Chacha20.o OBJS/Linux_SINGLE_SHLIB/Hacl_Chacha20Poly1305_32.o OBJS/Linux_SINGLE_SHLIB/stubs.o OBJS/Linux_SINGLE_SHLIB/nsslowhash.o OBJS/Linux_SINGLE_SHLIB/gcm-ppc.o OBJS/Linux_SINGLE_SHLIB/deprecated/seed.o OBJS/Linux_SINGLE_SHLIB/sha512-p8.o      -ldl -lc
/usr/bin/ld: OBJS/Linux_SINGLE_SHLIB/sha512-p8.o: ABI version 2 is not compatible with ABI version 1 output
/usr/bin/ld: failed to merge target specific data of file OBJS/Linux_SINGLE_SHLIB/sha512-p8.o

sha512-p8.s has a explicit ABI version 2 set, so it can't be used as is when building for ABI version 1.

What distro is this? I thought all distros had moved to the new ABI.

Debian.

Attached patch ppc-old-abi.patch (obsolete) — Splinter Review

Please try this patch.

Currently make only, I don't have enough gyp-fu to do that side.

Attachment #9153100 - Flags: review?(jjones)
Attached patch ppc-old-abi-v2.patch (obsolete) — Splinter Review

v2 with CC instead of gcc.

Attachment #9153100 - Attachment is obsolete: true
Attachment #9153100 - Flags: review?(jjones)
Attachment #9153128 - Flags: review?(jjones)

Mike, does this fix it for you?

Flags: needinfo?(mh+mozilla)

(In reply to J.C. Jones [:jcj] (he/him) [increased latency due to COVID-19] from comment #5)

Mike, does this fix it for you?

It does, but it breaks ppc64el.
The problem is the awk command using $3, which Make expands first. It needs to be $$3.
Note, I'd move the PPC_ABI under the USE_64 ifdef.

Flags: needinfo?(mh+mozilla)

Huh? I tested it on ppc64el only, and it worked correctly for me. I wonder how your env differs from mine.

I don't know how it can work. PPC_ABI is always #define _CALL_ELF 2 because the awk command becomes awk '{print }'

BTW, | grep _CALL_ELF | awk '{print $$3}' can be rewritten as | awk '$$2 == "_CALL_ELF" {print $$3}'

v3 addressing review comments. My v2 test must've been user error, touched the wrong file etc.

Attachment #9153128 - Attachment is obsolete: true
Attachment #9153128 - Flags: review?(jjones)
Attachment #9156182 - Flags: review?(jjones)
Attachment #9156182 - Flags: review?(jjones) → review?(mh+mozilla)

Thanks for fixing this. If you need a big-endian ppc64 machine, the GCC compile farm has the machine gcc203 free to use for every open source developer. I'm an admin on this machine, so I can install packages if necessary.

See: https://gcc.gnu.org/wiki/CompileFarm

I have tested the current patch and with it, nss builds fine both on ppc64 (old ABI) and ppc64le (new ABI).

The severity field is not set for this bug.
:jcj, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jjones)
Comment on attachment 9156182 [details] [diff] [review] ppc-old-abi-v3.patch Review of attachment 9156182 [details] [diff] [review]: ----------------------------------------------------------------- r=jcj. Approved for NSS 3.55, let's not try to slot it into the 3.54 betas.
Attachment #9156182 - Flags: review?(mh+mozilla) → review+
Assignee: nobody → cand
Severity: -- → S4
Status: NEW → ASSIGNED
Flags: needinfo?(jjones)
Priority: -- → P1
Whiteboard: checkin-needed, 3.55
Version: 3.53 → 3.55

Hi,

is there a reason why this patch has not been committed yet?

(In reply to J.C. Jones [:jcj] (he/him) [increased latency due to COVID-19] from comment #16)

Comment on attachment 9156182 [details] [diff] [review]
ppc-old-abi-v3.patch

Review of attachment 9156182 [details] [diff] [review]:

r=jcj.

Approved for NSS 3.55, let's not try to slot it into the 3.54 betas.

Hi, this patch is in buildroot since 5 months ago and it makes build correctly.
Maybe it's possible to commit now?

Sorry this fell off the radar. Pushed in https://hg.mozilla.org/projects/nss/rev/d806f7992b10aa9a4dd62d8bf1f1248ae1dab008

Thanks for patch and the follow up.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.60
Whiteboard: checkin-needed, 3.55
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: