potats0 / lua-resty-coraza

16 stars 2 forks source link

m2 build failed #2

Open Sn0rt opened 1 year ago

Sn0rt commented 1 year ago

hi . I want try install this lib at Macos M2 machine. but it's failed.

~/w/coraza main> sudo make install
Password:
make[1]: Nothing to be done for `install-exec-am'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[2]: Nothing to be done for `all-am'.
  CC       tests/simple_get.o
tests/simple_get.c:20:25: warning: passing arguments to 'coraza_new_waf' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
    waf = coraza_new_waf(NULL);
                        ^
tests/simple_get.c:26:28: warning: incompatible function pointer types passing 'void (void *, const void *)' to parameter of type 'coraza_log_cb' (aka 'void (*)(const void *)') [-Wincompatible-function-pointer-types]
    coraza_set_log_cb(waf, logcb);
                           ^~~~~
cgo-gcc-export-header-prolog:89:63: note: passing argument to parameter 'cb' here
extern void coraza_set_log_cb(coraza_waf_t waf, coraza_log_cb cb);
                                                              ^
2 warnings generated.
  CCLD     tests/simple_get
Undefined symbols for architecture arm64:
  "_SecCertificateCopyData", referenced from:
      _crypto/x509/internal/macos.x509_SecCertificateCopyData_trampoline.abi0 in libcoraza.a(go.o)
  "_SecCertificateCreateWithData", referenced from:
      _crypto/x509/internal/macos.x509_SecCertificateCreateWithData_trampoline.abi0 in libcoraza.a(go.o)
  "_SecPolicyCreateSSL", referenced from:
      _crypto/x509/internal/macos.x509_SecPolicyCreateSSL_trampoline.abi0 in libcoraza.a(go.o)
  "_SecTrustCreateWithCertificates", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustCreateWithCertificates_trampoline.abi0 in libcoraza.a(go.o)
  "_SecTrustEvaluateWithError", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustEvaluateWithError_trampoline.abi0 in libcoraza.a(go.o)
  "_SecTrustGetCertificateAtIndex", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustGetCertificateAtIndex_trampoline.abi0 in libcoraza.a(go.o)
  "_SecTrustGetCertificateCount", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustGetCertificateCount_trampoline.abi0 in libcoraza.a(go.o)
  "_SecTrustSetVerifyDate", referenced from:
      _crypto/x509/internal/macos.x509_SecTrustSetVerifyDate_trampoline.abi0 in libcoraza.a(go.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [tests/simple_get] Error 1
make: *** [install-am] Error 2