Skip to content

Warning when linking libsecp256k1 exhaustive tests after building with depends #20225

Description

@fanquake

Just making a note of this, as I can't remember seeing it before. After building on macOS, when using depends, you may see:

  CC       src/exhaustive_tests-tests_exhaustive.o
  CCLD     exhaustive_tests
  CCLD     tests
ld: warning: dylib (/usr/local/Cellar/openssl@1.1/1.1.1h/lib/libcrypto.dylib) was built for newer macOS version (10.15) than being linked (10.12)
/Applications/Xcode.app/Contents/Developer/usr/bin/make  check-TESTS
PASS: exhaustive_tests
PASS: tests

This is due to us passing -mmacosx-version-min=10.12 when building depends, and the libcrypto.dylib on my machine being built for macOS 10.15. I say may as this should depend on the version of the dylib on your machine, how it's been built by homebrew etc.

Can otherwise be replicated with:

int main() {
    return 0;
}
clang++ test.cpp -lcrypto -L/usr/local/opt/openssl@1.1/lib -mmacosx-version-min=10.12
ld: warning: dylib (/usr/local/opt/openssl@1.1/lib/libcrypto.dylib) was built for newer macOS version (10.15) than being linked (10.12)

Note that /usr/local/opt/openssl@1.1 is a symlink to /usr/local/Cellar/openssl@1.1/1.1.1h.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions