Opened 17 months ago
Last modified 7 months ago
#71728 new defect
xxhashlib 0.8.3 broken on Rosetta
| Reported by: | barracuda156 | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.10.5 |
| Keywords: | rosetta, snowleopard | Cc: | mascguy (Christopher Nielsen), potmj (Michael Pot) |
| Port: | xxhashlib |
Description
---> Building xxhashlib Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/xxhash-0.8.3" && /usr/bin/make -j6 -w all CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cxx/usr/bin/g++-4.2" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/objc/usr/bin/gcc-4.2" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/objcxx/usr/bin/g++-4.2" INSTALL="/usr/bin/install -c" make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/xxhash-0.8.3' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2 -Os -arch ppc -Wall -Wextra -Wconversion -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 -Wstrict-overflow=2 -I/opt/local/include -c -o xxhash.o xxhash.c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2 -Os -arch ppc -Wall -Wextra -Wconversion -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 -Wstrict-overflow=2 -fPIC -I/opt/local/include xxhash.c -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -shared -install_name /opt/local/lib/libxxhash.0.dylib -compatibility_version 0 -current_version 0.8.3 -o libxxhash.0.8.3.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2 -Os -arch ppc -Wall -Wextra -Wconversion -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 -Wstrict-overflow=2 -I/opt/local/include -DXXHSUM_DISPATCH=1 -c -o cli/xxhsum.o cli/xxhsum.c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2 -Os -arch ppc -Wall -Wextra -Wconversion -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 -Wstrict-overflow=2 -I/opt/local/include -DXXHSUM_DISPATCH=1 -c -o cli/xsum_os_specific.o cli/xsum_os_specific.c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2 -Os -arch ppc -Wall -Wextra -Wconversion -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 -Wstrict-overflow=2 -I/opt/local/include -DXXHSUM_DISPATCH=1 -c -o cli/xsum_arch.o cli/xsum_arch.c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2 -Os -arch ppc -Wall -Wextra -Wconversion -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 -Wstrict-overflow=2 -I/opt/local/include -DXXHSUM_DISPATCH=1 -c -o cli/xsum_output.o cli/xsum_output.c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2 -Os -arch ppc -Wall -Wextra -Wconversion -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 -Wstrict-overflow=2 -I/opt/local/include -DXXHSUM_DISPATCH=1 -c -o cli/xsum_sanity_check.o cli/xsum_sanity_check.c In file included from xxhash.c:42: xxhash.h: In function ‘XXH64_mergeRound’: xxhash.h:3496: warning: passing argument 1 of ‘XXH64_round’ with different width due to prototype In file included from xxhash.c:42: xxhash.h: In function ‘XXH64_mergeRound’: xxhash.h:3496: warning: passing argument 1 of ‘XXH64_round’ with different width due to prototype xxhash.h: In function ‘XXH64_finalize’: xxhash.h:3616: warning: passing argument 1 of ‘XXH64_round’ with different width due to prototype xxhash.h: In function ‘XXH64_finalize’: xxhash.h:3616: warning: passing argument 1 of ‘XXH64_round’ with different width due to prototype xxhash.h: In function ‘XXH3_len_4to8_64b’: xxhash.h:4674: warning: passing argument 2 of ‘XXH3_rrmxmx’ with different width due to prototype cli/xxhsum.c: In function ‘XSUM_hashStream’: cli/xxhsum.c:261: warning: passing argument 2 of ‘XXH64_reset’ with different width due to prototype cli/xxhsum.c: In function ‘XSUM_printLine_BSD_internal’: cli/xxhsum.c:326: warning: comparison of unsigned expression >= 0 is always true cli/xxhsum.c: In function ‘XSUM_displayPrefix’: cli/xxhsum.c:352: warning: comparison of unsigned expression >= 0 is always true cli/xxhsum.c: In function ‘XSUM_printLine_GNU_internal’: cli/xxhsum.c:362: warning: comparison of unsigned expression >= 0 is always true xxhash.h: In function ‘XXH3_len_4to8_64b’: xxhash.h:4674: warning: passing argument 2 of ‘XXH3_rrmxmx’ with different width due to prototype cli/xxhsum.c: In function ‘XSUM_canonicalFromString’: cli/xxhsum.c:701: warning: passing argument 1 of ‘charToHex’ with different width due to prototype cli/xxhsum.c:704: warning: passing argument 1 of ‘charToHex’ with different width due to prototype /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2 -Os -arch ppc -Wall -Wextra -Wconversion -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 -Wstrict-overflow=2 -I/opt/local/include -DXXHSUM_DISPATCH=1 -c -o cli/xsum_bench.o cli/xsum_bench.c xxhash.h: In function ‘XXH3_64bits’: xxhash.h:6187: warning: passing argument 3 of ‘XXH3_64bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_64bits_withSecret’: xxhash.h:6194: warning: passing argument 3 of ‘XXH3_64bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_64bits_reset’: xxhash.h:6356: warning: passing argument 2 of ‘XXH3_reset_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_64bits_reset_withSecret’: xxhash.h:6365: warning: passing argument 2 of ‘XXH3_reset_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_64bits’: xxhash.h:6187: warning: passing argument 3 of ‘XXH3_64bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_64bits_withSecret’: xxhash.h:6194: warning: passing argument 3 of ‘XXH3_64bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_64bits_reset’: xxhash.h:6356: warning: passing argument 2 of ‘XXH3_reset_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_64bits_reset_withSecret’: xxhash.h:6365: warning: passing argument 2 of ‘XXH3_reset_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_128bits’: xxhash.h:6999: warning: passing argument 3 of ‘XXH3_128bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_128bits_withSecret’: xxhash.h:7008: warning: passing argument 3 of ‘XXH3_128bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_generateSecret’: xxhash.h:7196: warning: passing argument 3 of ‘XXH128’ with different width due to prototype xxhash.h:7198: warning: passing argument 3 of ‘XXH128’ with different width due to prototype xxhash.h: In function ‘XXH3_128bits’: xxhash.h:6999: warning: passing argument 3 of ‘XXH3_128bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH3_128bits_withSecret’: xxhash.h:7008: warning: passing argument 3 of ‘XXH3_128bits_internal’ with different width due to prototype /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_xxhash/xxhashlib/work/compwrap/cc/usr/bin/gcc-4.2 -Os -arch ppc -Wall -Wextra -Wconversion -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 -Wstrict-overflow=2 -I/opt/local/include -DXXHSUM_DISPATCH=1 -c -o xxh_x86dispatch.o xxh_x86dispatch.c xxhash.h: In function ‘XXH3_generateSecret’: xxhash.h:7196: warning: passing argument 3 of ‘XXH128’ with different width due to prototype xxhash.h:7198: warning: passing argument 3 of ‘XXH128’ with different width due to prototype cli/xsum_sanity_check.c: In function ‘XSUM_testXXH3_withSecret’: cli/xsum_sanity_check.c:473: warning: passing argument 5 of ‘XXH3_64bits_withSecretandSeed’ with different width due to prototype cli/xsum_sanity_check.c:502: warning: passing argument 4 of ‘XXH3_64bits_reset_withSecretandSeed’ with different width due to prototype cli/xsum_sanity_check.c: In function ‘XSUM_testXXH128_withSecret’: cli/xsum_sanity_check.c:622: warning: passing argument 5 of ‘XXH3_128bits_withSecretandSeed’ with different width due to prototype cli/xsum_sanity_check.c:650: warning: passing argument 4 of ‘XXH3_128bits_reset_withSecretandSeed’ with different width due to prototype xxh_x86dispatch.c:56:4: error: #error "Dispatching is currently only supported on x86 and x86_64." xxh_x86dispatch.c:159:36: error: emmintrin.h: No such file or directory cli/xsum_bench.c: In function ‘localXXH64’: cli/xsum_bench.c:122: warning: passing argument 3 of ‘XXH64’ with different width due to prototype cli/xsum_bench.c: In function ‘localXXH64_stream’: cli/xsum_bench.c:128: warning: passing argument 2 of ‘XXH64_reset’ with different width due to prototype cli/xsum_bench.c: In function ‘localXXH3_64b_seeded’: cli/xsum_bench.c:139: warning: passing argument 3 of ‘XXH3_64bits_withSeed_dispatch’ with different width due to prototype cli/xsum_bench.c: In function ‘localXXH3_128b_seeded’: cli/xsum_bench.c:153: warning: passing argument 3 of ‘XXH3_128bits_withSeed_dispatch’ with different width due to prototype In file included from xxh_x86dispatch.c:203: xxhash.h: In function ‘XXH64_mergeRound’: xxhash.h:3496: warning: passing argument 1 of ‘XXH64_round’ with different width due to prototype xxhash.h: In function ‘XXH64_finalize’: xxhash.h:3616: warning: passing argument 1 of ‘XXH64_round’ with different width due to prototype xxhash.h: In function ‘XXH3_len_4to8_64b’: xxhash.h:4674: warning: passing argument 2 of ‘XXH3_rrmxmx’ with different width due to prototype xxhash.h: At top level: xxhash.h:5177: warning: ‘__target__’ attribute directive ignored xxhash.h: In function ‘XXH3_accumulate_512_sse2’: xxhash.h:5180: error: ‘__m128i’ undeclared (first use in this function) xxhash.h:5180: error: (Each undeclared identifier is reported only once xxhash.h:5180: error: for each function it appears in.) xxhash.h:5180: error: expected expression before ‘const’ xxhash.h:5183: error: nested functions are disabled, use -fnested-functions to re-enable xxhash.h:5183: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token xxhash.h:5183: warning: ISO C90 forbids mixed declarations and code xxhash.h:5183: error: expected expression before ‘const’ xxhash.h:5186: error: nested functions are disabled, use -fnested-functions to re-enable xxhash.h:5186: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token xxhash.h:5186: warning: ISO C90 forbids mixed declarations and code xxhash.h:5186: error: expected expression before ‘const’ xxhash.h:5188: warning: ISO C90 forbids mixed declarations and code xxhash.h:5191: error: expected ‘;’ before ‘const’ xxhash.h:5193: error: expected ‘;’ before ‘const’ xxhash.h:5195: error: expected ‘;’ before ‘const’ xxhash.h:5197: error: expected ‘;’ before ‘const’ xxhash.h:5199: error: expected ‘;’ before ‘const’ xxhash.h:5201: error: expected ‘;’ before ‘const’ xxhash.h:5202: error: expected ‘;’ before ‘const’ xxhash.h:5204: error: ‘xacc’ undeclared (first use in this function) xxhash.h:5204: warning: implicit declaration of function ‘_mm_add_epi64’ xxhash.h:5204: error: ‘product’ undeclared (first use in this function) xxhash.h:5204: error: ‘sum’ undeclared (first use in this function) xxhash.h:5175: warning: unused parameter ‘input’ xxhash.h:5176: warning: unused parameter ‘secret’ xxhash.h: At top level: xxhash.h:5207: warning: ‘__target__’ attribute directive ignored xxhash.h:5211: warning: ‘__target__’ attribute directive ignored xxhash.h: In function ‘XXH3_scrambleAcc_sse2’: xxhash.h:5213: error: ‘__m128i’ undeclared (first use in this function) xxhash.h:5213: error: expected expression before ‘const’ xxhash.h:5216: error: nested functions are disabled, use -fnested-functions to re-enable xxhash.h:5216: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token xxhash.h:5216: warning: ISO C90 forbids mixed declarations and code xxhash.h:5216: error: expected expression before ‘const’ xxhash.h:5217: error: nested functions are disabled, use -fnested-functions to re-enable xxhash.h:5217: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘prime32’ xxhash.h:5217: warning: ISO C90 forbids mixed declarations and code xxhash.h:5217: error: ‘prime32’ undeclared (first use in this function) xxhash.h:5217: warning: implicit declaration of function ‘_mm_set1_epi32’ xxhash.h:5219: warning: ISO C90 forbids mixed declarations and code xxhash.h:5222: error: expected ‘;’ before ‘const’ xxhash.h:5223: error: expected ‘;’ before ‘const’ xxhash.h:5224: error: expected ‘;’ before ‘const’ xxhash.h:5226: error: expected ‘;’ before ‘const’ xxhash.h:5227: error: expected ‘;’ before ‘const’ xxhash.h:5230: error: expected ‘;’ before ‘const’ xxhash.h:5231: error: expected ‘;’ before ‘const’ xxhash.h:5232: error: expected ‘;’ before ‘const’ xxhash.h:5233: error: ‘xacc’ undeclared (first use in this function) xxhash.h:5233: error: ‘prod_lo’ undeclared (first use in this function) xxhash.h:5233: warning: implicit declaration of function ‘_mm_slli_epi64’ xxhash.h:5233: error: ‘prod_hi’ undeclared (first use in this function) xxhash.h:5210: warning: unused parameter ‘secret’ xxhash.h: At top level: xxhash.h:5239: warning: ‘__target__’ attribute directive ignored xxhash.h: In function ‘XXH3_initCustomSecret_sse2’: xxhash.h:5242: error: ‘__m128i’ undeclared (first use in this function) xxhash.h:5249: error: expected ‘;’ before ‘const’ xxhash.h:5251: warning: ISO C90 forbids mixed declarations and code xxhash.h:5254: error: ‘dst16’ undeclared (first use in this function) xxhash.h:5254: error: expected expression before ‘)’ token xxhash.h:5267: warning: implicit declaration of function ‘_mm_load_si128’ xxhash.h:5267: error: expected ‘)’ before ‘__m128i’ xxhash.h:5267: warning: type defaults to ‘int’ in declaration of ‘type name’ xxhash.h:5267: error: ‘seed’ undeclared (first use in this function) xxhash.h:5261: error: invalid lvalue in asm output 0 xxhash.h:5238: warning: unused parameter ‘customSecret’ xxhash.h:5238: warning: unused parameter ‘seed64’ xxhash.h: In function ‘XXH_INLINE_XXH3_64bits’: xxhash.h:6187: warning: passing argument 3 of ‘XXH3_64bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH_INLINE_XXH3_64bits_withSecret’: xxhash.h:6194: warning: passing argument 3 of ‘XXH3_64bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH_INLINE_XXH3_64bits_reset’: xxhash.h:6356: warning: passing argument 2 of ‘XXH3_reset_internal’ with different width due to prototype xxhash.h: In function ‘XXH_INLINE_XXH3_64bits_reset_withSecret’: xxhash.h:6365: warning: passing argument 2 of ‘XXH3_reset_internal’ with different width due to prototype xxhash.h: In function ‘XXH_INLINE_XXH3_128bits’: xxhash.h:6999: warning: passing argument 3 of ‘XXH3_128bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH_INLINE_XXH3_128bits_withSecret’: xxhash.h:7008: warning: passing argument 3 of ‘XXH3_128bits_internal’ with different width due to prototype xxhash.h: In function ‘XXH_INLINE_XXH3_generateSecret’: xxhash.h:7196: warning: passing argument 3 of ‘XXH_INLINE_XXH128’ with different width due to prototype xxhash.h:7198: warning: passing argument 3 of ‘XXH_INLINE_XXH128’ with different width due to prototype xxh_x86dispatch.c: At top level: xxh_x86dispatch.c:568: warning: ‘__target__’ attribute directive ignored xxh_x86dispatch.c:568: warning: ‘__target__’ attribute directive ignored xxh_x86dispatch.c:568: warning: ‘__target__’ attribute directive ignored xxh_x86dispatch.c:568: warning: ‘__target__’ attribute directive ignored xxh_x86dispatch.c:568: warning: ‘__target__’ attribute directive ignored xxh_x86dispatch.c:568: warning: ‘__target__’ attribute directive ignored xxh_x86dispatch.c:568: warning: ‘__target__’ attribute directive ignored xxh_x86dispatch.c: In function ‘XXH3_64bits_dispatch’: xxh_x86dispatch.c:715: warning: passing argument 3 of ‘XXH3_64bits_internal’ with different width due to prototype xxh_x86dispatch.c: In function ‘XXH3_64bits_withSecret_dispatch’: xxh_x86dispatch.c:745: warning: passing argument 3 of ‘XXH3_64bits_internal’ with different width due to prototype xxh_x86dispatch.c: In function ‘XXH3_128bits_dispatch’: xxh_x86dispatch.c:775: warning: passing argument 3 of ‘XXH3_128bits_internal’ with different width due to prototype xxh_x86dispatch.c: In function ‘XXH3_128bits_withSecret_dispatch’: xxh_x86dispatch.c:805: warning: passing argument 3 of ‘XXH3_128bits_internal’ with different width due to prototype make: *** [xxh_x86dispatch.o] Error 1 make: *** Waiting for unfinished jobs....
Attachments (2)
Change History (10)
Changed 17 months ago by barracuda156
comment:1 Changed 17 months ago by barracuda156
comment:2 follow-up: 3 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
This problem doesn't seem specific to Rosetta, but could occur in any cross-compiling scenario, because $(CC) -dumpmachine will tell you the machine you are building on not the machine you are building for. To get the latter, the right -arch flags would have to be added there, e.g. by adding $(CFLAGS).
comment:3 Changed 17 months ago by barracuda156
Replying to ryandesign:
This problem doesn't seem specific to Rosetta, but could occur in any cross-compiling scenario, because
$(CC) -dumpmachinewill tell you the machine you are building on not the machine you are building for. To get the latter, the right-archflags would have to be added there, e.g. by adding$(CFLAGS).
I do not know what is an easy way to get build arch in a Makefile. Is there one? Here the issue is not that arch flags are wrong, they are not, the problem is that the build adds Intel-specific files, assuming that physical architecture=build=host=target.
comment:4 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
Does changing the line to
detect_x86_arch = $(shell $(CC) $(CFLAGS) -dumpmachine | grep -E 'i[3-6]86|x86_64')
not work? I haven't tested it, but I have verified that e.g. cc -arch arm64 -dumpmachine on my x86_64 machine produces arm64-apple-darwin21.6.0 which seems promising.
Changed 7 months ago by potmj (Michael Pot)
| Attachment: | rosetta.patch added |
|---|
Ryan's fix as a makefile diff
comment:5 Changed 7 months ago by potmj (Michael Pot)
Yes this fix works nicely on x86 Leopard for making fat libraries. Many thanks.
% port -v installed xxhashlib The following ports are currently installed: xxhashlib @0.8.1_2+universal requested_variants='+universal' platform='darwin 9' archs='i386 ppc' date='2023-06-21T04:30:24+1200' xxhashlib @0.8.2_3+universal requested_variants='+universal' platform='darwin 9' archs='i386 ppc' date='2023-11-27T23:54:55+1300' xxhashlib @0.8.3_3+universal (active) requested_variants='+universal' platform='darwin 9' archs='i386 ppc ppc64 x86_64' date='2025-11-09T14:11:50+1300' %
Do we need to make another patch file to add to the port? Or do we update the makefile patch that is already there? Have attached a diff
comment:6 Changed 7 months ago by potmj (Michael Pot)
| Cc: | potmj added |
|---|
comment:7 follow-up: 8 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
It should be reported to the developers so that they can fix it so that we don't need to maintain a patch forever.
comment:8 Changed 7 months ago by potmj (Michael Pot)
Replying to ryandesign:
It should be reported to the developers so that they can fix it so that we don't need to maintain a patch forever.
Have filled an issue on the project https://github.com/Cyan4973/xxHash/issues/1081 :-)

Okay, I guess it is due to this attempt to do a guesswork in the source:
# automatically enable runtime vector dispatch on x86/64 targets detect_x86_arch = $(shell $(CC) -dumpmachine | grep -E 'i[3-6]86|x86_64') ifneq ($(strip $(call detect_x86_arch)),) #note: can be overridden at compile time, by setting DISPATCH=0 DISPATCH ?= 1 endifHere is the fix:
if {${os.arch} eq "i386" && ${configure.build_arch} eq "ppc"} { # Only needed for Rosetta, since Makefile misdetects build arch. build.cmd-prepend DISPATCH=0 }