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

Undefined reference to GC_throw_bad_alloc() #77

Open
HertzDevil opened this issue Aug 19, 2020 · 0 comments
Open

Undefined reference to GC_throw_bad_alloc() #77

HertzDevil opened this issue Aug 19, 2020 · 0 comments

Comments

@HertzDevil
Copy link
Contributor

Today I started receiving this error in Bindgen after performing a system update which bumps my libgc's version to 8.0.4:

/usr/bin/ld: ... /spec/integration/tmp/../tmp/instance_properties.o: in function `operator new(unsigned long, GCPlacement, void (*)(void*, void*), void*)':
instance_properties.cpp:(.text._Znwm11GCPlacementPFvPvS0_ES0_[_Znwm11GCPlacementPFvPvS0_ES0_]+0xc6): undefined reference to `GC_throw_bad_alloc()'
collect2: error: ld returned 1 exit status

This is due to ivmai/bdwgc#268 (comment). According to that issue there are 3 solutions:

  • Add -lgccpp to everywhere in Bindgen that has -lgc;
  • Add -lgctba to everywhere in Bindgen that has -lgc;
  • Add #define GC_NEW_ABORTS_ON_OOM prior to #include <gc/gc_cpp.h>.
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

1 participant