Open lostmsu opened 4 years ago
I can't repro on macOS here, which Mono version did you test?
@akoeplinger I can not reproduce it on a new macOS VM either, but it might be related to gcc
pointing to clang
.
Let me remove macOS from repro platforms until I can get instructions for it.
On Ubuntu 16.04 I reproed it just yesterday with build-essential
and Mono 6.8.0.105 from the official apt repo.
@akoeplinger can't repro on macOS with gcc-9 or gcc-5 from brew. Let's keep it scoped to Ubuntu 16.04 for now.
ok, I guess it's related to how we're building the Linux packages then. @directhex any ideas?
Presumably related to any .cpp files, that are there for LLVM interop.
It might help to say -fno-exceptions -fno-rtti
.
$ gcc testmono.c `pkg-config --libs --cflags mono-2` -fno-exceptions -fno-rtti
cc1: warning: command line option ‘-fno-rtti’ is valid for C++/ObjC++ but not for C
/usr/lib/pkgconfig/../../lib/libmono-2.0.so: undefined reference to `__cxa_end_catch'
/usr/lib/pkgconfig/../../lib/libmono-2.0.so: undefined reference to `typeinfo for int*'
/usr/lib/pkgconfig/../../lib/libmono-2.0.so: undefined reference to `__gxx_personality_v0'
/usr/lib/pkgconfig/../../lib/libmono-2.0.so: undefined reference to `__cxa_begin_catch'
Or did you mean those flags should be added to Mono build itself?
Yeah I think we'd need to add that flag to the mono build itself.
@akoeplinger not sure it would be useful, but just wanted to remind, that this problem did not affect macOS for some reason on either Clang or GCC, so there seems to be some inconsistency.
@akoeplinger hi! I'm having the same error with mono 6.12.0.122, I'm trying to build the latest nightly but I don't know if I have to add any flags to solve this error. Could you clarify it for me? Thanks!
I am having this issue as well
I am following the official embedding doc on compiling and linking.
Here's my
.c
file:Steps to Reproduce
Current Behavior
Expected Behavior
No error should occur
On which platforms did you notice this
[ ] macOS [x] Linux (Ubuntu 16.04) [ ] Windows
Version Used: 6.8.0.105
GCC Version: 5.4.0
Workaround
Use g++ instead of gcc: