Open Kasuax opened 1 year ago
Hi @Kasuax -- out of curiosity, does this work if you link it directly instead of using dlopen()
? Want to see if it's an issue with dynamic loading...
You are correct! If I link the library during compile with gcc by specifying -L and -lfoo then manually define the extern "C" it all works as advertised.
Out of curiosity, has there been any resolution yet with this? Thank you!
[OL8 Red Hat Enterprise Linux release 8.6] [GCC 8.5.0] [Codon Prebuild 0.16.3]
I am able to link my libfoo.so into my application if I wire it up during compile with gcc and provide the appropriate extern "C" prototype; however, I'm unable to properly dynamically load my codon foo librarie on Centos7 or Oracle Linux 8. Just focusing on OL8 for now because I get the same error.
Garbage collector freaks out during debug dlopen() call => SIGSEGV. If I run release it crashes calling the function.
The following is what I'm working with. Please let me know if I'm being short sighted somewhere.
foo.codon
main.cpp
build.sh
Stack Trace
ldd
objdump libfoo.so -T | grep foo
gdb debug