Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#54746 closed defect (fixed)

[Patch] libgpg-error +universal fix

Reported by: ccorn Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: libgpg-error

Description

On my darwin9-powerpc64 (G5) platform, I use universal archs ppc and ppc64. Recently I have noticed runtime crashes with ports dependent on libgpg-error, such as KeePassX. Symptoms were log messages like

Fatal: failed to acquire the pool lock: Invalid argument 

and crash dumps pointing to one of libgcrypt's lock_pool functions. It turns out that the lock gets initialized by the macro GPGRT_LOCK_DEFINE from gpg-error.h. That one depends on gpgrt_lock_t and GPGRT_LOCK_INITIALIZER both of which are architecture-specific and figured out in libgpg-error's build phase by means of a helper program built from src/gen-posix-lock-obj.c.

First step was to use PortGroup muniversal. Then I found that muniversal's merger does not handle \-continued lines properly when adding #if directives to header files. A fix for muniversal would be far from trivial, so I simply added a patch to gen-posix-lock-obj.c that does not create such line continuations.

Patch files attached. Note that the fix affects typedefs and macros in gpg-error.h and therefore the ports dependentof:libgpg-error should be revbumped so that they get recompiled.

After that, KeePassX runs fine and succeeds in opening my password database, so I am now able to file this ticket.

Attachments (2)

libgpg-error-Portfile.diff (867 bytes) - added by ccorn 7 years ago.
libgpg-error/Portfile patch for +universal
patch-gen-posix-lock-obj_c.diff (416 bytes) - added by ccorn 7 years ago.
devel/libgpg-error/files/patch-gen-posix-lock-obj_c: optionally avoid line continuations

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by ccorn

Attachment: libgpg-error-Portfile.diff added

libgpg-error/Portfile patch for +universal

Changed 7 years ago by ccorn

devel/libgpg-error/files/patch-gen-posix-lock-obj_c: optionally avoid line continuations

comment:1 Changed 7 years ago by ccorn

Ports that should be revbumped according to port echo dependentof:libgpg-error on my installation:

devel/libassuan
devel/libgcrypt
devel/libksba
security/dirmngr
security/pinentry
security/gpg-agent
mail/gnupg2
devel/gpgme

comment:2 in reply to:  1 ; Changed 7 years ago by Schamschula (Marius Schamschula)

Replying to ccorn:

That is a subset. Use

port file all | xargs grep port:libgpg-error

to find all dependents.

Ports that should be revbumped according to port echo dependentof:libgpg-error on my installation:

devel/libassuan
devel/libgcrypt
devel/libksba
security/dirmngr
security/pinentry
security/gpg-agent
mail/gnupg2
devel/gpgme

comment:3 in reply to:  1 Changed 7 years ago by ccorn

... and devel/libgpg-error itself of course (not included in the Portfile patch, as such diffs tend to create conflicts).

comment:4 in reply to:  2 Changed 7 years ago by ccorn

Replying to Schamschula:

That is a subset. Use

port file all | xargs grep port:libgpg-error

to find all dependents.

Thanks for the hint. Adding -l to the grep lists 22 Portfiles here.

comment:5 Changed 7 years ago by Schamschula (Marius Schamschula)

Owner: set to Schamschula
Resolution: fixed
Status: newclosed

In c5d009a417a235a0777f101b23b09c19943614ee/macports-ports:

libgpg-error: fix universal for PPC platforms

Closes: #54746

comment:6 Changed 7 years ago by mf2k (Frank Schima)

Cc: mps@… removed
Keywords: haspatch added; patch universal removed
Note: See TracTickets for help on using tickets.