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

v3.6.0 crashes on Ubuntu 14.04 when compiling gRPC v1.15.0 #5353

Closed
mpoullet opened this issue Nov 14, 2018 · 6 comments
Closed

v3.6.0 crashes on Ubuntu 14.04 when compiling gRPC v1.15.0 #5353

mpoullet opened this issue Nov 14, 2018 · 6 comments
Assignees

Comments

@mpoullet
Copy link

What version of protobuf and what language are you using?
Version: v3.6.0 (this issue does not happen with v3.5.2)
Language: C++

What operating system (Linux, Windows, ...) and version?
Ubuntu 14.04 (this issue does not happen on 16.04 and 18.04)

What runtime / compiler are you using (e.g., python version or gcc version)
Default versions provided by Ubuntu 14.04 like g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

What did you do?
I build gRPC v1.15.0 on Ubuntu 14.04 in Travis CI (log) using this script. It builds protobuf v3.6.0 in the third_party/protobufdirectory. Then it uses it.

What did you expect to see
gRPC v1.15.0 build using protobuf v3.6.0 works.

What did you see instead?

[GRPC]    Generating gRPC's protobuf service CC file from src/proto/grpc/channelz/channelz.proto
terminate called after throwing an instance of 'std::system_error'
  what():  Unknown error -1
--grpc_out: protoc-gen-grpc: Plugin killed by signal 6.
make: *** [/home/travis/build/mpoullet/grpc/gens/src/proto/grpc/channelz/channelz.grpc.pb.cc] Error 1

Anything else we should know about your project / environment

@mpoullet mpoullet changed the title v3.6.0 crashes on Ubuntu 14.04 when compiling gRPC v3.6.0 crashes on Ubuntu 14.04 when compiling gRPC v1.15.0 Nov 14, 2018
@acozzette acozzette self-assigned this Nov 19, 2018
@aduskett
Copy link

aduskett commented Jul 26, 2020

I am going to bump this, as Buildroot is also having this issue when trying to cross-compile grpc with protobuf. We have tried the latest two versions, and I have personally tried with 4.0-rc2 as well.

We are receiving the exact same error as @mpoullet and it's kind of sad that this bug has been ignored. :(

Edit:

If anybody wants to duplicate the error, you can easily do so with the following steps:

git clone https://github.com/aduskett/buildroot-docker-devel/
cd buildroot-docker-devel/Ubuntu/14.04/
docker-compose build
cd ~/Downloads
git clone git://git.buildroot.net/buildroot
docker run --rm --name br-ubuntu14.04 -v $(pwd):/mnt:Z -ti br-ubuntu14.04:latest /bin/bash
cd /mnt/buildroot/

At this point, copy the following and save it as configs/grpc_defconfig:

BR2_aarch64=y
# BR2_STRIP_strip is not set
# BR2_COMPILER_PARANOID_UNSAFE_PATH is not set
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64=y
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
# BR2_TARGET_GENERIC_GETTY is not set
# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
# BR2_ENABLE_LOCALE_PURGE is not set
BR2_PACKAGE_GRPC=y
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
# BR2_PACKAGE_URANDOM_SCRIPTS is not set
# BR2_TARGET_ROOTFS_TAR is not set
make grpc_defconfig
make grpc

This will puke out the above errors.

@yann-morin-1998
Copy link

I am going to bump this, as Buildroot is also having this issue when trying to cross-compile grpc with protobuf.

Nit: we are having the problem when building the native variant, i.e. a native build, not a cross-build.

The cross-build is OK in Buildroot.

@aduskett
Copy link

I am going to bump this, as Buildroot is also having this issue when trying to cross-compile grpc with protobuf.

Nit: we are having the problem when building the native variant, i.e. a native build, not a cross-build.

The cross-build is OK in Buildroot.

Sorry, yeah, this is the issue.

@heinemml
Copy link

heinemml commented Sep 15, 2020

In #5923 @snnn gave a good explanation what's going wrong.

To fix the grpc build (when upgrading the toolchain is not an option) pass this to the initial cmake command when building grpc:

cmake -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-as-needed" ../..

I submitted a patch to the buildroot Mailinglist.

Related issue:

@gt945
Copy link

gt945 commented May 21, 2021

@elharo
Copy link
Contributor

elharo commented Sep 20, 2021

grpc issue, and probably fixed there

@elharo elharo closed this as completed Sep 20, 2021
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

7 participants