tabixpp icon indicating copy to clipboard operation
tabixpp copied to clipboard

Fix building shared object on macOS

Open alexreg opened this issue 3 years ago • 3 comments

PR #10 helped with several things, but the command to compile the shared object is still slightly problematic, in that it leaves out some flags, and it assumes gcc is being used rather than clang. This PR adds the necessary flags to that command, and detects the compiler to adjust it accordingly.

If you could make a v1.1.2 release after merging this, that would be great.

alexreg avatar Apr 29 '22 16:04 alexreg

Note: I've also updated the name of the binaries to libtabixpp.a and libtabixpp.so.1 (rather than merely libtabix) — this is both more accurate and enables vcflib to correctly locate tabixpp, whereas it was not before.

alexreg avatar Apr 29 '22 20:04 alexreg

Note that building .so on macOS is likely not what you really want. Instead, it should be a dylib and follow platform conventions as libtabixpp.1.dylib (instead of libtabixpp.so.1). In general libtool will help with these platform specific differences vs trying to detect the correct behavior in a Makefile.

jonchang avatar Apr 29 '22 22:04 jonchang

@jonchang Yeah quite possibly. I believe so files are perfectly legal on macOS, but non-standard as you say. If someone can help with a patch here, that would be great.

alexreg avatar Apr 29 '22 22:04 alexreg