Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ld-memory #229

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add ld-memory #229

wants to merge 2 commits into from

Conversation

kaspar030
Copy link
Contributor

@kaspar030 kaspar030 commented May 31, 2023

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

Needed for RIOT-OS/RIOT#19692.

(adds ~800kB to the image)

@kaspar030
Copy link
Contributor Author

bors merge

bors bot added a commit that referenced this pull request May 31, 2023
229: add ld-memory r=kaspar030 a=kaspar030

This adds [ld-memory](https://github.com/kaspar030/ld-memory), a utility I wrote that creates GNU ld MEMORY sections from command line parameters.

Needed for RIOT-OS/RIOT#19692.

(adds ~800kB to the image)

Co-authored-by: Kaspar Schleiser <[email protected]>
@bors
Copy link
Contributor

bors bot commented May 31, 2023

Build failed:

  • Build and Test

@kaspar030
Copy link
Contributor Author

bors merge

bors bot added a commit that referenced this pull request May 31, 2023
229: add ld-memory r=kaspar030 a=kaspar030

This adds [ld-memory](https://github.com/kaspar030/ld-memory), a utility I wrote that creates GNU ld MEMORY sections from command line parameters.

Needed for RIOT-OS/RIOT#19692.

(adds ~800kB to the image)

Co-authored-by: Kaspar Schleiser <[email protected]>
@bors
Copy link
Contributor

bors bot commented May 31, 2023

Build failed:

  • Build and Test

@kaspar030
Copy link
Contributor Author

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

@kaspar030
Copy link
Contributor Author

@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
Copy link
Contributor Author

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

@kaspar030
Copy link
Contributor Author

this is the build issue

@maribu
Copy link
Member

maribu commented Jun 8, 2023

Since this seems to be relatively reliable in reproducing the issue in RIOT-OS/RIOT#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>.' ;\

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants