I came across this last night and it took a little tracking down. Since introducing #364, the build system will automatically determine whether JNI can be built. If the environment supports it, the java library is built, but without checking if the necessary modules are also being compiled.
My situation was: only build the library with the pubkey recovery module and install it, compile my bindings for another language.. I ran into a configure
error that no usable version of libsecp256k1 could be found. I could coax things to compile all the same (run configure first against bd2895fd - the commit before JNI) but using my bindings resulted in an error that secp256k1_schnorr
wasn’t found.
My bindings didn’t have this dependency previously, nor did the default install presume that all modules were to be compiled, so something about JNI building/requiring everything seemed to lead to this.
To fix this, I had to disable JNI, or enable every module to satisfy the JNI libraries dependencies.