grpc / grpc

The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io
Apache License 2.0
41.83k stars 10.54k forks source link

Build fails on TruffleRuby for >= 1.57.0 #34625

Open carsomyr opened 1 year ago

carsomyr commented 1 year ago

What version of gRPC and what language are you using?

1.57.0 and above

What operating system (Linux, Windows,...) and version?

aarch64-darwin/3.1.3.23.0.0

What runtime / compiler are you using (e.g. python version or version of gcc)

TruffleRuby 23.0.0's internal LLVM toolchain

What did you do?

Tried to install gem versions >= 1.57.0. I already bisected this for you and noticed that <= 1.56.0 worked fine.

What did you expect to see?

A successful installation.

What did you see instead?

/usr/local/var/rbenv/versions/truffleruby-23.0.0/lib/llvm-toolchain/bin/llvm-strip: error: '/usr/local/var/rbenv/versions/truffleruby-23.0.0/lib/gems/gems/grpc-1.57.0/src/ruby/ext/grpc/libs/opt/libaddress_sorting.a(address_sorting.o)': The file was not recognized as a valid object file
*** extconf.rb failed ***

See attached.

Anything else we should know about your project / environment?

A build failure would be consistent with previous reports of build failures which were fixed, since:

alto-ruby commented 11 months ago

I finally was able setup my environment with truffleruby-dev (needs https://github.com/oracle/truffleruby/pull/3308) and was able to reproduce this issue, will continue the investigation

alto-ruby commented 11 months ago

Looks like llvm-strip in truffleruby cannot strip .a files. #34632 happened to removed the strip, I have verified I can build grpc trunk and v1.60.0.pre1 with truffleruby-dev.