Page MenuHome GnuPG

gpgscm needs to link against libintl on Mac OS
Closed, ResolvedPublic

Description

clang -imacros scheme-config.h -I/Users/kk/sw/include -I/Users/kk/sw/include -
I/Users/kk/sw/include -Wall -Wno-pointer-sign -Wpointer-arith -I/Users/kk/sw/include -
lresolv -L/Users/kk/sw/lib -o gpgscm gpgscm-main.o gpgscm-ffi.o gpgscm-scheme.o
../../common/libcommon.a -liconv -L/Users/kk/sw/lib -lgcrypt -lgpg-error -
L/Users/kk/sw/lib -lgpg-error
Undefined symbols for architecture x86_64:

"_libintl_bind_textdomain_codeset", referenced from:
    _i18n_switchto_utf8 in libcommon.a(libcommon_a-i18n.o)
    _i18n_switchback in libcommon.a(libcommon_a-i18n.o)
"_libintl_bindtextdomain", referenced from:
    _i18n_init in libcommon.a(libcommon_a-i18n.o)
    _i18n_localegettext in libcommon.a(libcommon_a-i18n.o)
"_libintl_gettext", referenced from:
    _my_strusage in gpgscm-main.o
    _create_pipe_and_estream in libcommon.a(libcommon_a-exechelp-posix.o)
    _gnupg_spawn_process in libcommon.a(libcommon_a-exechelp-posix.o)
    _gnupg_spawn_process_fd in libcommon.a(libcommon_a-exechelp-posix.o)
    _gnupg_wait_processes in libcommon.a(libcommon_a-exechelp-posix.o)
    _gnupg_spawn_process_detached in libcommon.a(libcommon_a-exechelp-posix.o)
    _disable_core_dumps in libcommon.a(libcommon_a-sysutils.o)
    ...
"_libintl_setlocale", referenced from:
    _i18n_init in libcommon.a(libcommon_a-i18n.o)
    _i18n_localegettext in libcommon.a(libcommon_a-i18n.o)
"_libintl_textdomain", referenced from:
    _i18n_init in libcommon.a(libcommon_a-i18n.o)

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gnumake[3]: *** [gpgscm] Error 1

The following simple patch solves the issue:

  • tests/gpgscm/Makefile.am.orig 2016-08-20 18:00:13.000000000 +0200

+++ tests/gpgscm/Makefile.am 2016-08-20 17:59:52.000000000 +0200
@@ -46,7 +46,7 @@

	scheme-config.h opdefines.h scheme.c scheme.h scheme-private.h

gpgscm_LDADD = $(LDADD) $(common_libs) \

	$(NETLIBS) $(LIBICONV) $(LIBREADLINE) \
  • $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS)

+ $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL)

t_child_SOURCES = t-child.c

Related Objects

Event Timeline

bsiegert set Version to 2.1.14.
bsiegert set External Link to https://mail-index.netbsd.org/pkgsrc-users/2016/08/15/msg023624.html.
bsiegert added a subscriber: bsiegert.

This has been fixed in July with c49c43d7.