riotdocker icon indicating copy to clipboard operation
riotdocker copied to clipboard

add ld-memory

Open kaspar030 opened this issue 2 years ago • 9 comments

This adds ld-memory, a utility I wrote that creates GNU ld MEMORY sections from command line parameters.

Needed for https://github.com/RIOT-OS/RIOT/pull/19692.

(adds ~800kB to the image)

kaspar030 avatar May 31 '23 14:05 kaspar030

bors merge

kaspar030 avatar May 31 '23 19:05 kaspar030

Build failed:

  • Build and Test

bors[bot] avatar May 31 '23 19:05 bors[bot]

bors merge

kaspar030 avatar May 31 '23 22:05 kaspar030

Build failed:

  • Build and Test

bors[bot] avatar May 31 '23 22:05 bors[bot]

@chrysn could you take a look here? seems like an unrelated Rust build error.

kaspar030 avatar Jun 01 '23 07:06 kaspar030

@chrysn could you take a look here? seems like an unrelated Rust build error.

--- stderr
  /data/***build/***base/sys/include/auto_init_utils.h:35:10: fatal error: 'preprocessor_successor.h' file not found
  thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("/data/***build/***base/sys/include/auto_init_utils.h:35:10: fatal error: 'preprocessor_successor.h' file not found\n")', /data/***build/.cargo/git/checkouts/rust-***-sys-d12733b89271907c/b4bd4bd/build.rs:224:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make: *** [/data/***build/***base/makefiles/cargo-targets.inc.mk:53: /data/***build/***base/examples/rust-hello-world/bin/native/target/i686-unknown-linux-gnu/release/librust_hello_world.a] Error 101

kaspar030 avatar Jun 02 '23 09:06 kaspar030

(Why does the pull request "build" succeed?)

kaspar030 avatar Jun 02 '23 09:06 kaspar030

this is the build issue

kaspar030 avatar Jun 08 '23 07:06 kaspar030

Since this seems to be relatively reliable in reproducing the issue in https://github.com/RIOT-OS/RIOT/issues/19714, would this help:

diff --git a/makefiles/cargo-targets.inc.mk b/makefiles/cargo-targets.inc.mk
index 118cb83f7a..b23e8f6990 100644
--- a/makefiles/cargo-targets.inc.mk
+++ b/makefiles/cargo-targets.inc.mk
@@ -17,6 +17,7 @@ ifneq (,$(filter shell_democommands,$(USEMODULE)))
   CARGO_OPTIONS += --features rust_riotmodules/riot-module-shell-democommands
 endif
 
+.PHONY: $(CARGO_COMPILE_COMMANDS)
 # This is duplicating the compile-commands rule because unlike in the use case
 # when a $(RIOTBASE)/compile_commands.json is built, we *want* this to be
 # per-board and per-application. (The large mechanisms are shared anyway).
@@ -40,7 +41,6 @@ $(CARGO_COMPILE_COMMANDS): $(BUILDDEPS)
             -e 's/"riscv-none-embed"/"riscv32"/g' \
       | $(LAZYSPONGE) $@
 
-
 $(CARGO_LIB): $(RIOTBUILD_CONFIG_HEADER_C) $(BUILDDEPS) $(CARGO_COMPILE_COMMANDS) FORCE
     $(Q)command -v cargo >/dev/null || ($(COLOR_ECHO) \
         '$(COLOR_RED)Error: `cargo` command missing to build Rust modules.$(COLOR_RESET) Please install as described on <https://doc.riot-os.org/using-rust.html>.' ;\

?

maribu avatar Jun 08 '23 09:06 maribu