Message ID | 20230529094211.756085-1-sundeep.kokkonda@gmail.com |
---|---|
State | New |
Headers | show |
Series | Cargo: build failure on 32-bit machine when DEBUG enabled | expand |
On Mon, 2023-05-29 at 15:12 +0530, Sundeep KOKKONDA wrote: > Cargo build is failing on 32-bit machines with a 'signal: 11, SIGSEGV: invalid memory reference error'. > This is a workaround to disable the Debug builds for 32-bit machines. > > Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> > --- > meta/classes-recipe/cargo.bbclass | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass > index 7a8cc1e751..bc5ca4fdc6 100644 > --- a/meta/classes-recipe/cargo.bbclass > +++ b/meta/classes-recipe/cargo.bbclass > @@ -38,6 +38,11 @@ CARGO_SRC_DIR ??= "" > MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" > > RUSTFLAGS ??= "" > +DEBUG_BUILD:qemuarm = '0' > +DEBUG_BUILD:qemuppc = '0' > +DEBUG_BUILD:qemumips = '0' > +DEBUG_BUILD:qemux86 = '0' > +DEBUG_BUILD:virtclass-multilib-lib32 = '0' > BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" > CARGO_BUILD_FLAGS = "-v --offline --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" > Whilst I understand the intent here, I'm not sure this is a good idea, The reasons coming to mind are: a) We don't set DEBUG_BUILD in OE-Core or do testing of that afaik b) We should really be fixing cargo, not hacking around it c) This "fixes" those machines but not any other 32 bit machine. Should it be target-arch specific if we do want to do it? Do we know why this is breaking? Cheers, Richard
I still did not get this reproduced on rust sources (Since it is occurring only on 32-bit builds, the rust build is giving some unknown errors which are yet to be analyzed...). Until then, to avoid DEBUG_BUILD failures this workaround is sent.
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 7a8cc1e751..bc5ca4fdc6 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass @@ -38,6 +38,11 @@ CARGO_SRC_DIR ??= "" MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" RUSTFLAGS ??= "" +DEBUG_BUILD:qemuarm = '0' +DEBUG_BUILD:qemuppc = '0' +DEBUG_BUILD:qemumips = '0' +DEBUG_BUILD:qemux86 = '0' +DEBUG_BUILD:virtclass-multilib-lib32 = '0' BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" CARGO_BUILD_FLAGS = "-v --offline --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}"
Cargo build is failing on 32-bit machines with a 'signal: 11, SIGSEGV: invalid memory reference error'. This is a workaround to disable the Debug builds for 32-bit machines. Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> --- meta/classes-recipe/cargo.bbclass | 5 +++++ 1 file changed, 5 insertions(+)