One remark thus far: In libspscan, I respectfully suggest using git submodule for secp256k1.
I'll consider this. The main thing I was worried about was exporting libsecp256k1 symbols from the library. As anyone who has worked with C knows
, this has nothing whatsoever to do with source code management. Files are in the exact same place on the filesystem, only different to
git.

this can cause quite frustrating problems for programs using such libraries and the system's libsecp256k1. As I had painfully learned over the last couple of years.
But I don't think submodules will interfere with this.
Indeed. Is that the cause of your
-Wl,-Bsymbolic?
Is it still the situation that linking to a system libsecp256k1 yourself is a bad idea? I know it was, something like nine years ago; I’d hoped then that that would change someday.
I figured out an
ad hoc scheme for handling this myself (with in-tree copy, sorry!), before I discovered that
libwally did it better than I did. It’s been a long time since I looked at that code; I guess it could probably still be a handy guide.
To
prevent export of secp256k1 symbols and thus, avoid clashes when your library is linked by something that links secp256k1 itself,
linker version scripts (
LDFLAGS+=-Wl,--version-script=spscan.map in Makefile) may be used to control
symbol visibility—but then, if you’re linking secp256k1 statically into a shared library, other
dark arts may be required. I don’t know all the right knobs off the top of my head. I also don’t know off the top of my head if it would also solve the problem that you stated. To control symbol visibility and runtime binding is sometimes a major pain point, with platform-dependent pitfalls.