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

rules_foreign_cc make build failure #24880

Open
bashtavenko opened this issue Jan 9, 2025 · 0 comments
Open

rules_foreign_cc make build failure #24880

bashtavenko opened this issue Jan 9, 2025 · 0 comments
Labels

Comments

@bashtavenko
Copy link

Description of the bug:

Basic hello world on make build fails. Here's the reporoduction. It is possible that I messed something up, but based on make_simple example I don't know what's wrong.

Which category does this issue belong to?

C++ Rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

git clone https://github.com/bashtavenko/bazel_exp.git
cd bazel_exp
bazel build //:makefile_hello_lib --verbose_failures --sandbox_debug --subcommands

What I am seeing is

ERROR: /home/s15o/bazel_exp/BUILD.bazel:17:5: output 'makefile_hello_lib/lib/hello.a' was not created
ERROR: /home/s15o/bazel_exp/BUILD.bazel:17:5: Foreign Cc - Make: Building makefile_hello_lib failed: not all outputs were created or valid

Which operating system are you running Bazel on?

Ubuntu

What is the output of bazel info release?

release 8.0.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

https://github.com/bashtavenko/bazel_exp.git
c6531276c5f6594cc2e558d91d3c0b96619f85d9

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

I hope not.

Have you found anything relevant by searching the web?

Not a whole lot on this topic

Any other information, logs, or outputs that you want to share?

bazel_dep(name = "rules_foreign_cc", version = "0.13.0")

This make rule failed on a real project and I provided a simple reproduction. On my real make project the errors were

pack sl_lidar_driver.o->libsl_lidar_sdk.a
/usr/bin/ar: unable to copy file '/home/s15o/.cache/bazel/_bazel_s15o/bc3e4c3173142068c146209670cc9ef2/sandbox/linux-sandbox/14/execroot/_main/external/+_repo_rules+rplidar_sdk/output/Linux/Release/libsl_lidar_sdk.a'; reason: Read-only file system

Maybe it is a slightly different issue, but in anyway I cannot integrate the makefile project into bazel.

Thank you

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

No branches or pull requests

4 participants