Summary: | games/punchy: fix build on armv7 (preliminary) | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Robert Clausecker <fuz> | ||||
Component: | Individual Port(s) | Assignee: | Jan Beich <jbeich> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | jbeich | ||||
Priority: | --- | Flags: | jbeich:
maintainer-feedback+
jbeich: merge-quarterly+ |
||||
Version: | Latest | ||||||
Hardware: | arm | ||||||
OS: | Any | ||||||
URL: | https://pkg-status.freebsd.org/ampere1/data/131releng-armv7-quarterly/60e7cbc83321/logs/errors/punchy-0.3.0_2.log | ||||||
Attachments: |
|
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5acf5a02777bd9c6cce20980859c4316b267f6f2 commit 5acf5a02777bd9c6cce20980859c4316b267f6f2 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-04-26 00:36:30 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-04-28 20:44:40 +0000 games/punchy: unbreak build on armv7 Fix files/patch-v8 to compile on armv7 by refactoring it to use ELF auxilliary vectors in the CPU detection code and by adding some missing includes. cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:137:20: warning: implicit declaration of function 'READ_SPECIALREG' is invalid in C99 [-Wimplicit-function-declaration] id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:137:36: error: use of undeclared identifier 'id_aa64isar0_el1'; did you mean 'id_aa64isar0'? id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); ^~~~~~~~~~~~~~~~ id_aa64isar0 cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:136:14: note: 'id_aa64isar0' declared here uint64_t id_aa64isar0; ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:138:9: warning: implicit declaration of function 'ID_AA64ISAR0_AES' is invalid in C99 [-Wimplicit-function-declaration] if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:42:30: note: expanded from macro 'ID_AA64ISAR0_AES_VAL' #define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:138:47: error: use of undeclared identifier 'ID_AA64ISAR0_AES_PMULL'; did you mean 'ID_AA64ISAR0_AES'? if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) ^~~~~~~~~~~~~~~~~~~~~~ ID_AA64ISAR0_AES cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:138:9: note: 'ID_AA64ISAR0_AES' declared here if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:42:30: note: expanded from macro 'ID_AA64ISAR0_AES_VAL' #define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:140:9: warning: implicit declaration of function 'ID_AA64ISAR0_CRC32' is invalid in C99 [-Wimplicit-function-declaration] if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:45:32: note: expanded from macro 'ID_AA64ISAR0_CRC32_VAL' #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:140:49: error: use of undeclared identifier 'ID_AA64ISAR0_CRC32_BASE'; did you mean 'ID_AA64ISAR0_CRC32'? if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ^~~~~~~~~~~~~~~~~~~~~~~ ID_AA64ISAR0_CRC32 cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:140:9: note: 'ID_AA64ISAR0_CRC32' declared here if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:45:32: note: expanded from macro 'ID_AA64ISAR0_CRC32_VAL' #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 ^ PR: 271076 Reported by: pkg-fallout games/punchy/Makefile | 2 +- games/punchy/files/patch-v8 | 50 +++++++++++++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 19 deletions(-) A commit in branch 2023Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=16a3aa5cb9e71ff22cbdceb0bd56b1d61e4d53ce commit 16a3aa5cb9e71ff22cbdceb0bd56b1d61e4d53ce Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-04-26 00:36:30 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-04-28 20:45:57 +0000 games/punchy: unbreak build on armv7 Fix files/patch-v8 to compile on armv7 by refactoring it to use ELF auxilliary vectors in the CPU detection code and by adding some missing includes. cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:137:20: warning: implicit declaration of function 'READ_SPECIALREG' is invalid in C99 [-Wimplicit-function-declaration] id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:137:36: error: use of undeclared identifier 'id_aa64isar0_el1'; did you mean 'id_aa64isar0'? id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); ^~~~~~~~~~~~~~~~ id_aa64isar0 cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:136:14: note: 'id_aa64isar0' declared here uint64_t id_aa64isar0; ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:138:9: warning: implicit declaration of function 'ID_AA64ISAR0_AES' is invalid in C99 [-Wimplicit-function-declaration] if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:42:30: note: expanded from macro 'ID_AA64ISAR0_AES_VAL' #define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:138:47: error: use of undeclared identifier 'ID_AA64ISAR0_AES_PMULL'; did you mean 'ID_AA64ISAR0_AES'? if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) ^~~~~~~~~~~~~~~~~~~~~~ ID_AA64ISAR0_AES cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:138:9: note: 'ID_AA64ISAR0_AES' declared here if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:42:30: note: expanded from macro 'ID_AA64ISAR0_AES_VAL' #define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:140:9: warning: implicit declaration of function 'ID_AA64ISAR0_CRC32' is invalid in C99 [-Wimplicit-function-declaration] if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:45:32: note: expanded from macro 'ID_AA64ISAR0_CRC32_VAL' #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:140:49: error: use of undeclared identifier 'ID_AA64ISAR0_CRC32_BASE'; did you mean 'ID_AA64ISAR0_CRC32'? if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ^~~~~~~~~~~~~~~~~~~~~~~ ID_AA64ISAR0_CRC32 cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:140:9: note: 'ID_AA64ISAR0_CRC32' declared here if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ^ cargo-crates/v8-0.47.1/third_party/zlib/cpu_features.c:45:32: note: expanded from macro 'ID_AA64ISAR0_CRC32_VAL' #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 ^ PR: 271076 Reported by: pkg-fallout (cherry picked from commit 5acf5a02777bd9c6cce20980859c4316b267f6f2) games/punchy/Makefile | 2 +- games/punchy/files/patch-v8 | 50 +++++++++++++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 19 deletions(-) Thanks. Landed without "make makepatch" noise.
> Unfortunately, the build then crashes during the final link with what looks like an address space exhaustion.
How much RAM do you have? The package cluster builds armv7 on aarch64, so a single process can use up to 4GB but many processes can use up to 1TB together. Assuming LPAE on armv7 works similar to PAE on i386.
Cargo.toml has lto=true, so try adding CARGO_ENV+=CARGO_PROFILE_RELEASE_LTO="false" to Makefile.local
(In reply to Jan Beich from comment #3) I have 32 GB of memory. I specifically say "address space exhaustion" to indicate that the rustc process probably ran out of virtual address space. This is not fixable by adding more memory. Building with CARGO_ENV+=CARGO_PROFILE_RELEASE_LTO="false" did not help. I'm beginning to suspect that this may really be a bug in the rust toolchain. |
Created attachment 241755 [details] games/punchy: fix build on armv7 The attached patch fixes build issues on armv7. Unfortunately, the build then crashes during the final link with what looks like an address space exhaustion.