Open ryandesign opened 1 year ago
It can be worked around by adding
ac_cv_lib_resolv_res_mkquery=yes
as an argument when running./configure
.
This workaround no longer works in bahamut 2.2.3 due to 42b67ff7218877934abed2a738e164c0dea171b0. Instead, I now use ac_cv_search_res_mkquery=-lresolv
.
On macOS 12.6.7 (and other versions), bahamut fails to determine that
res_mkquery
is in fact located in libresolv:As a result of this failure, the required
-lresolv
flag is not added when linking.It can be worked around by adding
ac_cv_lib_resolv_res_mkquery=yes
as an argument when running./configure
.This problem was previously reported to MacPorts for version 2.0.7 back in 2014 but the problem remains with version 2.2.2.
The problem seems to be that the configure test compiles and links this program:
The config.log shows that the configure test failed because:
And this is true: There is no symbol
_res_mkquery
in libresolv on macOS; the symbol is actually called_res_9_mkquery
. You're expected to#include <resolv.h>
which contains the#define
s that make this work:It seems like the fix would be for the configure test to
#include <resolv.h>
rather than declaring a fakeres_mkquery
function, but I'm not sufficiently well versed in autoconf to make that change myself.This is not the only fix needed to compile this code on macOS; I'll file additional tickets for the rest.