From dd05d43cab4095b5771340fc1ff4d3df8e211ecf Mon Sep 17 00:00:00 2001 From: lotherk Date: Sun, 22 Nov 2026 13:51:31 +0100 Subject: [PATCH] libDtChat: link libiconv libDtChat's text.c converts the session charset with iconv, and AM_ICONV finds GNU libiconv, but libDtChat_la_LIBADD did not carry LTLIBICONV: the library kept libiconv_open/-close/- undefined, and dtchat, dtchat-headless and dtchat-irc failed to link ("undefined reference to libiconv_open", measured 2026-11-22 on the MacBook). The library carries the dependency now, so every program that links it gets it too. Measured: after the change lib/libDtChat/libDtChat.la lists /usr/pkg/lib/libiconv.la in dependency_libs; make -C programs/dtchat rc=0, 0 errors (dtchat-build3.log). --- lib/libDtChat/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libDtChat/Makefile.am b/lib/libDtChat/Makefile.am index 1f39f9ec..422da891 100644 --- a/lib/libDtChat/Makefile.am +++ b/lib/libDtChat/Makefile.am @@ -14,7 +14,10 @@ libDtChat_la_SOURCES = core.c loop.c store.c conv.c text.c adapter.c instance.c irc.c identity.c peers.c local.c filexfer.c pair.c i18n.c media_audio.c \ media_packet.c media_call.c media_video.c media_video_packet.c \ media_render.c media_sync.c media_capture.c dc_internal.h -libDtChat_la_LIBADD = libDtChatIpc.la $(CRYPTOLIB) $(LIBTLS) $(OPUSLIB) $(VPXLIB) +# iconv: text.c converts the session's charset with it (AM_ICONV). A library +# carries the dependency so every program that links it gets it too; +# without it dtchat fails with "undefined reference to libiconv_open". +libDtChat_la_LIBADD = libDtChatIpc.la $(LTLIBICONV) $(CRYPTOLIB) $(LIBTLS) $(OPUSLIB) $(VPXLIB) libDtChat_la_LDFLAGS = -version-info 1:0:0 # Built by make mcde-host as well, so tools/mcde-tests.sh finds them in