getdnsapi / getdns

A modern asynchronous DNS API https://getdnsapi.net/
Other
468 stars 126 forks source link

Cross compiling targeting musl #540

Open clauderobi opened 1 year ago

clauderobi commented 1 year ago

Hi, I am trying to cross-compile (crosstool-ng 1.25.0) targeting gcc + musl (for Alpine and for fully static link, since glibc is not fully static).

I am getting this error during the configuration phase:

Could NOT find Threads (missing: Threads_FOUND)

In the tool chain location, phtread.h can be found.

I am using crosstool-ng, and thus cross-compile successfully, to target gcc + glibc

Anyone successfully compile with musl?

I am using the following arguments for cmake:

  ENABLE_DEBUG_ALL: "OFF"
  ENABLE_DEBUG_SERVER: "OFF"
  ENABLE_DEBUG_STUB: "OFF"
  ENABLE_DEBUG_REQ: "OFF"
  BUILD_LIBEV: "OFF"
  BUILD_LIBEVENT2: "OFF"
  BUILD_LIBUV: "OFF"
  BUILD_STUBBY: "OFF"
  BUILD_TESTING: "OFF"
  BUILD_GETDNS_SERVER_MON: "OFF"
  ENABLE_SHARED: "OFF"
  ENABLE_STATIC: "ON"
  ENABLE_STUB_ONLY: "ON"
  USE_LIBIDN2: "OFF"

and a few others related to openSSL

saradickinson commented 1 year ago

Haven't done this myself but I found this older issue: https://github.com/getdnsapi/stubby/issues/245 relating to building 1.6.0 successfully which might be some help?