I’m having issues with creating a native extension, namely around setting a minimum mac version and undefined symbols using a statically build library. It is worth mentioning this is a rust based library, so building from source is not really an option.
Currently, the major problems are these errors:
OSX:
ld: warning: object file was built for newer OSX version (10.10) than being linked (10.7)
duplicate symbol ___muloti4
Linux:
undefined reference to `__syscall_error’
I stripped out the path names as they are mostly irrelevant. Any help with this would be greatly appreciated. I tried setting the flag -mmacosx-version-min=10.10 but the build server seems to reject it as an invalid flag for some reason?
I know it’s defined in glibc, but I don’t know if it’s something that people are normally supposed to call. I suspect that wasmer is staticly linking some library but not others.
Is there a way to get the full build log of an extension, rather than just the filtered errors list?
Just wanted to let you both know it all works now, by using a couple hacks which are probably not a long term solution.
I found out that it is a glibc internal macro, and rather than pollute everything by including a GPL library, I just created a stub function, according to everything I’ve read about it this is fine, it just means I won’t be able to recover the error number in the future. I’m not actually quite sure what the long term implications are for this.
As far as my linking error for OSX, I just manually modified the archive and removed the duplicate symbol. I just have to hope that they library and the compiler built in for ___muloti4 have the same calling convention.