Hi,

I just run update on my box...

On 2018-11-14 20:55:58 +0100 Ryan Schmidt <ryandes...@macports.org> wrote:



On Nov 14, 2018, at 11:17, Riccardo Mottola wrote:

I wonder if this will cause issues on my 10.5 at the next upgrade, since it is 32bit form me.. I'll see.

zstd and tiff built successfully on our 10.5 PowerPC builder. The problem may be specific to 32-bit Intel, or it may be specific to Snow Leopard.


It fails for me on 10.5 32bit intel this way:

/usr/bin/gcc-4.2 -Os -arch i386 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings -Wredundant-decls -I. -I./common -DXXH_NAMESPACE=ZSTD_ -I./legacy -DZSTD_LEGACY_SUPPORT=4 -c -o compress/huf_compress.o compress/huf_compress.c /usr/bin/gcc-4.2 -Os -arch i386 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings -Wredundant-decls -I. -I./common -DXXH_NAMESPACE=ZSTD_ -I./legacy -DZSTD_LEGACY_SUPPORT=4 -c -o compress/zstd_compress.o compress/zstd_compress.c
In file included from compress/zstd_compress.c:24:
./common/cpu.h: In function ?ZSTD_cpuid?:
./common/cpu.h:76: error: expected string literal before ?)? token
make[1]: *** [compress/zstd_compress.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/zstd-1.3.4/lib'
make: *** [allzstd] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/zstd-1.3.4'

clearly the apple compiler doesn't like some code there... specifically it is asm code there.

Checking that, I have backported a small fix.
I attach it!

It makes things compile, but fail a little later:

/usr/bin/gcc-4.2 -Os -arch i386 -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings -Wredundant-decls -I. -I./common -DXXH_NAMESPACE=ZSTD_ -I./legacy -DZSTD_LEGACY_SUPPORT=4 -c -o compress/zstd_fast.o compress/zstd_fast.c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/.tmp/cc).co70.s:899:Junk character 13 ( /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/.tmp/cc8Vco70.s:899:Rest of line ignored. 1st junk character valued 112 (p). /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/.tmp/cc).co70.s:2502:Junk character 13 ( /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_zstd/zstd/work/.tmp/cc8Vco70.s:2502:Rest of line ignored. 1st junk character valued 112 (p).
make[1]: *** [compress/zstd_compress.o] Error 1
make[1]: *** Waiting for unfinished jobs....


now here I am at loss, perhaps there is another fix, but... something in the generated source?
I cannot access the failures so I can't see it.

Riccardo


<zstd-backport.patch>
--- lib/common/cpu.h	2018-03-27 00:19:34.000000000 +0200
+++ /Users/multix/cpu.h	2018-11-16 01:25:35.000000000 +0100
@@ -72,8 +72,7 @@
           "cpuid\n\t"
           "popl %%ebx\n\t"
           : "=a"(f1a), "=c"(f1c), "=d"(f1d)
-          : "a"(1)
-          :);
+          : "a"(1));
     }
     if (n >= 7) {
       __asm__(

Reply via email to