Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#52897 closed defect (fixed)

libgpg-error @1.25_0: breaks gnupg21

Reported by: jdswinbank (John Swinbank) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: larryv (Lawrence Velázquez), cederom (CeDeROM), jann, Ionic (Mihai Moldovan)
Port: gnupg21 libgpg-error

Description

Following an upgrade to libgpg-error 1.25, I see the following:

$ port installed libgpg-error gnupg21
The following ports are currently installed:
  gnupg21 @2.1.15_0+pinentry_mac (active)
  libgpg-error @1.25_0 (active)

$ gpg-agent
Assertion failed: (res == 0), function enter_npth, file npth.c, line 123.
Abort trap: 6

The backtrace from gpg-agent shows this is coming from libgpg-error:

  * frame #0: 0x00007fff923fadda libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff924e6787 libsystem_pthread.dylib`pthread_kill + 90
    frame #2: 0x00007fff92360420 libsystem_c.dylib`abort + 129
    frame #3: 0x00007fff92327893 libsystem_c.dylib`__assert_rtn + 320
    frame #4: 0x00000001001bb566 libnpth.0.dylib`enter_npth + 53
    frame #5: 0x0000000100196284 libgpg-error.0.dylib`_gpgrt_lock_lock + 29
    frame #6: 0x0000000100197923 libgpg-error.0.dylib`_gpgrt__get_std_stream + 48
    frame #7: 0x000000010002987c gpg-agent`_init_common_subsystems + 93

Unsurprisingly, this breaks any attempt by gpg2 to talk to the agent:

gpg: using pgp trust model
gpg: no running gpg-agent - starting '/opt/local/bin/gpg-agent'
gpg: removing stale lockfile (created by 49256)
gpg: waiting for the agent to come up ... (5s)
gpg: waiting for the agent to come up ... (4s)
gpg: waiting for the agent to come up ... (3s)
gpg: waiting for the agent to come up ... (2s)
gpg: waiting for the agent to come up ... (1s)
gpg: can't connect to the agent: IPC connect call failed
gpg: no running gpg-agent - starting '/opt/local/bin/gpg-agent'

(etc etc)

Change History (15)

comment:1 Changed 8 years ago by Schamschula (Marius Schamschula)

Cc: mps@… removed
Owner: changed from macports-tickets@… to Schamschula
Status: newassigned

comment:2 Changed 8 years ago by Schamschula (Marius Schamschula)

Also see https://lists.gnupg.org/pipermail/gnupg-devel/2016-November/032183.html

Hopefully, this soon will be fixed upstream.

comment:3 Changed 8 years ago by larryv (Lawrence Velázquez)

Cc: larryv added

comment:4 Changed 8 years ago by cederom (CeDeROM)

the same here :-(

Version 0, edited 8 years ago by cederom (CeDeROM) (next)

comment:5 Changed 8 years ago by cederom (CeDeROM)

Cc: cederom added

comment:6 Changed 8 years ago by jdswinbank (John Swinbank)

Confirmed that this no longer seems to be a problem with GnuPG 2.1.16. Should this ticket now become an upgrade request against gnupg21?

comment:7 in reply to:  6 Changed 8 years ago by Schamschula (Marius Schamschula)

Cc: Ionic added
Port: gnupg21 added

Replying to jdswinbank:

Confirmed that this no longer seems to be a problem with GnuPG 2.1.16. Should this ticket now become an upgrade request against gnupg21?

As long as it does not break anything else...

gnupg21 and maintainer.

comment:8 Changed 8 years ago by Schamschula (Marius Schamschula)

Cc: jann added

comment:9 Changed 8 years ago by sbooth (Stephen F. Booth)

Is there an estimated release date for 2.1.16?

comment:10 Changed 8 years ago by cederom (CeDeROM)

ping?

comment:11 Changed 8 years ago by Ionic (Mihai Moldovan)

I can update the port, but will be unable to test.

comment:12 Changed 8 years ago by larryv (Lawrence Velázquez)

I tried updating gnupg21 the other day, but the build failed.

comment:13 Changed 8 years ago by cederom (CeDeROM)

I have tried to simply bump the port number and checksums with:

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem          1.0

name                gnupg21
version             2.1.16
categories          mail security
maintainers         jann ionic openmaintainer
license             GPL-3+
installs_libs       no

description         GNU Privacy Guard version 2.1
long_description    GnuPG is a complete and free replacement for PGP. Because       \
                    it does not use the patented IDEA algorithm, it can be used     \
                    without any restrictions. GnuPG is a RFC4880 (OpenPGP)          \
                    compliant application.
homepage            http://www.gnupg.org
platforms           darwin freebsd sunos
conflicts           gnupg2 gnupg gpg-agent dirmngr
distname            gnupg-${version}
master_sites        gnupg:gnupg

use_bzip2           yes

checksums           rmd160  39ed72f52bae352893da7da7b191e1fc6ba4e6df \
                    sha256  49b9a6a6787ad00d4d2d69d8c7ee8905923782583f06078a064a0c80531d8844 \
                    sha1    67540161c9fe289153c4a5ea60f7cdce0ef48897

notes               "GPG 2.1 uses a new format for its key files. Therefore you cannot\
                    use it together with any earlier version of GPG. Neither can you easily go\
                    back to an older version as the old version cannot read the new format."

configure.args      --with-adns

platform darwin {
    if {![variant_isset pinentry] && ![variant_isset pinentry_mac]} {
        # Automatically switch between pinentry and pinentry-mac, with pinentry-mac being
        # preferred.
        # 10.7 and below are not supported by pinentry-mac, though, and will default to
        # pinentry. Just like pure darwin without OS X will.
        if {${os.subplatform} ne "macosx" ||
            ${xcodeversion} eq "none" ||
            [vercmp ${xcodeversion} {5.0}] < 0 ||
            ${os.major} < 12 || (![catch {registry_active pinentry}] &&
                                 [catch {registry_active pinentry-mac}])} {
            default_variants-append +pinentry
        } else {
            default_variants-append +pinentry_mac
        }
    }
}

depends_lib         port:libiconv           \
                    port:gettext            \
                    port:zlib               \
                    port:bzip2              \
                    port:bison              \
                    port:libassuan          \
                    port:libksba            \
                    port:libgcrypt          \
                    port:libgpg-error       \
                    port:openldap           \
                    port:readline           \
                    port:gnutls             \
                    port:libusb-compat      \
                    port:npth               \
                    port:adns

variant pinentry conflicts pinentry_mac description {Handle user input via pinentry.} {
    depends_lib-append      port:pinentry
    configure.args-append   --with-pinentry-pgm=${prefix}/bin/pinentry
}

variant pinentry_mac conflicts pinentry description {Handle user input via pinentry-mac. Only compatible with OS X 10.8+.} {
    depends_lib-append      port:pinentry-mac
    configure.args-append   --with-pinentry-pgm=${applications_dir}/pinentry-mac.app/Contents/MacOS/pinentry-mac
}

test.run            yes
test.dir            ${worksrcpath}/tests
test.target         check

livecheck.type      regex
livecheck.url       ftp://ftp.gnupg.org/gcrypt/gnupg/
livecheck.regex     gnupg-(2\\.1\\.\\d+)

This results in build error caused bu libintl:

:info:build /usr/bin/clang -I/opt/local/include -I/opt/local/include  -Wall -Wno-pointer-sign -Wpointer-arith  -pipe -Os -arch x86_64  -L/opt/local/lib -Wl,-headerpad_max_install_na
mes -arch x86_64 -o gpg-check-pattern gpg_check_pattern-gpg-check-pattern.o ../common/libcommon.a -L/opt/local/lib -lgcrypt -lgpg-error -L/opt/local/lib -lgpg-error -lintl -Wl,-fram
ework -Wl,CoreFoundation  -liconv  -liconv
:info:build /usr/bin/clang -I/opt/local/include -I/opt/local/include -I/opt/local/include -Wall -Wno-pointer-sign -Wpointer-arith  -pipe -Os -arch x86_64  -L/opt/local/lib -Wl,-head
erpad_max_install_names -arch x86_64 -o clean-sat clean-sat.o
:info:build Undefined symbols for architecture x86_64:
:info:build   "_libintl_bind_textdomain_codeset", referenced from:
:info:build       _i18n_switchto_utf8 in libcommon.a(libcommon_a-i18n.o)
:info:build       _i18n_switchback in libcommon.a(libcommon_a-i18n.o)
:info:build   "_libintl_bindtextdomain", referenced from:
:info:build       _i18n_init in libcommon.a(libcommon_a-i18n.o)
:info:build       _i18n_localegettext in libcommon.a(libcommon_a-i18n.o)
:info:build   "_libintl_gettext", referenced from:
:info:build       _main in gpg_wks_client-gpg-wks-client.o
:info:build       _wrong_args in gpg_wks_client-gpg-wks-client.o
:info:build       _connect_dirmngr in gpg_wks_client-call-dirmngr.o
:info:build       __init_common_subsystems in libcommon.a(libcommon_a-init.o)
:info:build       _disable_core_dumps in libcommon.a(libcommon_a-sysutils.o)
:info:build       _gnupg_rename_file in libcommon.a(libcommon_a-sysutils.o)
:info:build       _i18n_utf8 in libcommon.a(libcommon_a-i18n.o)
:info:build       ...
:info:build   "_libintl_setlocale", referenced from:
:info:build       _i18n_init in libcommon.a(libcommon_a-i18n.o)
:info:build       _i18n_localegettext in libcommon.a(libcommon_a-i18n.o)
:info:build       _send_pinentry_environment in libcommon.a(libcommon_a-asshelp.o)
:info:build   "_libintl_textdomain", referenced from:
:info:build       _i18n_init in libcommon.a(libcommon_a-i18n.o)
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [gpg-wks-client] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build mv -f .deps/gpgsplit.Tpo .deps/gpgsplit.Po
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_mail_gnupg21/gnupg21/work/gnupg-2.1.16/tools'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_mail_gnupg21/gnupg21/work/gnupg-2.1.16'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_mail_gnupg21/gnupg21/work/gnupg-2.1.16'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_mail_gnupg21/gnupg21/work/gnupg-2.1.16" && /usr/bin/make -j4 -w all
:info:build Exit code: 2
:error:build org.macports.build for port gnupg21 returned: command execution failed

Current libintl version in ports and project is 0.51.0 (https://launchpad.net/intltool/+download). Any ideas where does the linker problem comes from?

Last edited 8 years ago by cederom (CeDeROM) (previous) (diff)

comment:14 Changed 8 years ago by Ionic (Mihai Moldovan)

Resolution: fixed
Status: assignedclosed

Updated to 2.1.16 in 736a0a71/macports-ports.

Last edited 8 years ago by Ionic (Mihai Moldovan) (previous) (diff)

comment:15 Changed 8 years ago by cederom (CeDeROM)

GnuPG 2.1.16 is now part of the tree. port selfupdate and port upgrade outdated builds the 2.1.16 port properly. GPG-AGENT works fine again with smartcard keys. SSH-AGENT emulation works fine as well. THANK YOU! :-)

Note: See TracTickets for help on using tickets.