Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#63847 closed defect (fixed)

openssl @3 cannot build on PPC Tiger, Mac OS X 10.4.11, because assembler does not understand the code

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: evanmiller (Evan Miller)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: tiger Cc: larryv (Lawrence Velázquez), cal@…, evanmiller (Evan Miller), Gcenx
Port: openssl


CC="/opt/local/bin/gcc-apple-4.2" /opt/local/bin/perl5 crypto/aes/asm/ "osx32" -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include -fPIC -fno-common -arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL -pipe -Os -arch ppc -DB_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/opt/local/libexec/openssl3/etc/openssl\"" -DENGINESDIR="\"/opt/local/libexec/openssl3/lib/engines-3\"" -DMODULESDIR="\"/opt/local/libexec/openssl3/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG -I/opt/local/include -DAES_ASM -DOPENSSL_BN_ASM_MONT -DOPENSSL_CPUID_OBJ -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DVPAES_ASM  crypto/aes/aesp8-ppc.s
/opt/local/bin/gcc-apple-4.2 -fPIC -fno-common -arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL -pipe -Os -arch ppc -DB_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/opt/local/libexec/openssl3/etc/openssl\"" -DENGINESDIR="\"/opt/local/libexec/openssl3/lib/engines-3\"" -DMODULESDIR="\"/opt/local/libexec/openssl3/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG -I/opt/local/include -c -o crypto/aes/libcrypto-lib-aesp8-ppc.o crypto/aes/aesp8-ppc.s
crypto/aes/aesp8-ppc.s:68:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:83:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:103:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:120:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:133:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:148:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:153:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:181:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:191:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:207:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:224:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:235:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:249:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:272:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:381:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:388:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:391:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:448:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:455:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:458:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:498:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:545:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:594:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:603:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:609:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:616:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:619:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:1219:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:1241:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:1287:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:1300:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:1842:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:1915:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:2002:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:2004:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:2058:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:2132:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:2254:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:2256:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:2782:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:2784:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:3470:Parameter syntax error (parameter 1)
crypto/aes/aesp8-ppc.s:3472:Parameter syntax error (parameter 1)
make[1]: *** [crypto/aes/libcrypto-lib-aesp8-ppc.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/'
make: *** [build_sw] Error 2
make: Leaving directory `/opt/local/var/macports/build/'
Command failed:  cd "/opt/local/var/macports/build/" && /usr/bin/make -j1 -w all 

Attachments (1)

main.log (35.7 KB) - added by ballapete (Peter "Pete" Dyballa) 9 months ago.
Main.log from PPC Tiger, Mac OS X 10.4.11

Download all attachments as: .zip

Change History (11)

Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger, Mac OS X 10.4.11

comment:1 Changed 9 months ago by mascguy (Christopher Nielsen)

Cc: evanmiller Gcenx added

FYI, Dean has an open PR to fix 32-bit Intel builds. I'm not sure whether that would be applicable here, but certainly can't hurt:

PR 12848 - openssl3: fix i386 compile

comment:2 Changed 9 months ago by evanmiller (Evan Miller)

Tiger ships with an old assembler and AFAIK there is not a drop-in replacement available. It's possible the syntax fix is an easy one, but someone will need to dig into it. (I don't think the atomic lock stuff is relevant here.)

comment:3 Changed 9 months ago by silicontrip (Mark Heath)

This error also occurs on Leopard (10.5.8)

comment:4 in reply to:  1 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

Replying to mascguy:

PR 12848 - openssl3: fix i386 compile

Is it possible to download something else than garbage? That's how patch describe the downloaded files.

comment:5 Changed 9 months ago by jmroot (Joshua Root)

What are you downloading and how?

comment:6 Changed 9 months ago by evanmiller (Evan Miller)

OpenSSL is generating broken PPC assembler code, with invalid instructions such as:

    vsel    0,0,0,0

I have not verified but I believe the bug was introduced in this commit:

It looks like the vsr2vr1 function is expecting an integer register name but on OSX the register names are prefixed with a v.

comment:7 in reply to:  5 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

Replying to jmroot:

I am trying to download the two patch sets, the one for Portfile and the other for source code files.

comment:9 Changed 9 months ago by evanmiller (Evan Miller)

Owner: set to evanmiller
Resolution: fixed
Status: newclosed

In 00aa6edefafa42a25a79710e7b39dd8399f919ef/macports-ports (master):

openssl3: fix PowerPC assembly generation

Closes: #63847

comment:10 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

It built this evening.

Note: See TracTickets for help on using tickets.