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

grpcio-sys libabsl_bad_optional_access.a: file too small to be an archive #606

Open
nuttert opened this issue Jan 12, 2023 · 6 comments
Open

Comments

@nuttert
Copy link

nuttert commented Jan 12, 2023

Describe the bug
When I build my project with grpcio-sys I get the error:

Compiling grpcio v0.10.2
error: failed to add native library /myproject/target/debug/build/grpcio-sys-7a42ed9199705f9f/out/build/third_party/abseil-cpp/absl/types/libabsl_bad_optional_access.a: file too small to be an archive

error: could not compile `grpcio-sys` due to previous error
warning: build failed, waiting for other jobs to finish...
make[1]: *** [run] Error 101

To Reproduce
Just build grpcio-sys

System information
MacOs Ventura(13.1), M1, rustc 1.66.0, grpcio v0.10.2

I tried to put arch -arm64 before Cargo, but it didn't help.

@BusyJay
Copy link
Member

BusyJay commented Jan 12, 2023

This error usually due to arch conflict. That is building the library as arm64/x86_64 architect while link it to x86_64/arm64.

@nuttert
Copy link
Author

nuttert commented Jan 12, 2023

@BusyJay how can i fix it? I tried to build under Rosetta and without it, put arch -arm64, but it does not work.

@BusyJay
Copy link
Member

BusyJay commented Jan 12, 2023

You may try to use a different terminal/shell that is built for aarch64.

@nuttert
Copy link
Author

nuttert commented Jan 12, 2023

You may try to use a different terminal/shell that is built for aarch64.

Unfortunately it didn't help : (

@nuttert
Copy link
Author

nuttert commented Jan 18, 2023

@BusyJay any other ideas? I would expect that in any terminal (not under the rosette) on M1 there should not be such assembly problems

@BusyJay
Copy link
Member

BusyJay commented Feb 7, 2023

I'm afraid no. The solution I know is making sure all the toolchains like terminal/shell/cmake/compilers including C/C++/Rust are based on the same arch.

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

No branches or pull requests

2 participants