Bug 621626 - mutt: DSO linkage needs -lgpg-error when built --with gpgme
Summary: mutt: DSO linkage needs -lgpg-error when built --with gpgme
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mutt
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-05 17:17 UTC by Michael Elkins
Modified: 2010-09-21 10:32 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-09-21 10:32:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
fix dso linkage when building --with gpgme (1.41 KB, patch)
2010-08-05 19:33 UTC, Rex Dieter
no flags Details | Diff

Description Michael Elkins 2010-08-05 17:17:41 UTC
Description of problem:

"gpgme-config --libs" does not included -lgpg-error, which is required for programs using the gpgme API for proper error reporting.

Version-Release number of selected component (if applicable):


How reproducible:

Always.

Steps to Reproduce:
1. Run "gpgme-config --libs"
2.
3.
  
Actual results:

Returns: -lgpgme

Expected results:

Should return: -lgpgme -lgpg-error

Additional info:

Comment 1 Rex Dieter 2010-08-05 18:27:39 UTC
This is intentional.  

IMHO, apps that use libgpg-error should link it explicitly, and not depend on it being pulled in from elsewhere (like libgpgme)

Which apps/pkgs depend on this that require fixing? (I'll be happy to help fix/patch things as required).

Comment 2 Michael Elkins 2010-08-05 18:46:45 UTC
Try building mutt:

$ rpmbuild --with gpgme mutt.spec
...
/usr/bin/ld: crypt-gpgme.o: undefined reference to symbol 'gpg_strerror'
/usr/bin/ld: note: 'gpg_strerror' is defined in DSO /lib/libgpg-error.so.0 so try adding it to the linker command line
/lib/libgpg-error.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [mutt] Error 1
make[2]: Leaving directory `/home/melkins/rpmbuild/BUILD/mutt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/melkins/rpmbuild/BUILD/mutt'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.x2hPO9 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.x2hPO9 (%build)

Comment 3 Michael Elkins 2010-08-05 19:13:29 UTC
Just as a note, Fedora's current behavior diverges from the default behavior of the upstream gpgme 1.3.0 version.  This creates as issue for those of us building software that is host OS/distribution agnostic.

Comment 4 Rex Dieter 2010-08-05 19:30:08 UTC
I've sent the gpgme 'behavior change' patch upstream, but it seems to not have been acted upon yet.  I guess I'll have to re-ping them, and consider dropping it if they outright reject it.

In the meantime, I stand by my claim that apps that actively use any library should explictly link them, and not depend on external dependancies.

Initial patch for mutt forthcoming.

Comment 5 Rex Dieter 2010-08-05 19:33:58 UTC
Created attachment 436954 [details]
fix dso linkage when building --with gpgme

This patch before './prepare -V' step, plus
BuildRequires: libgpg-error-devel

should do the trick.

Comment 6 Miroslav Lichvar 2010-08-06 10:15:33 UTC
Hm, so is the mutt patch only temporary or should it go upstream? It's not needed in our default configuration, so I'm not sure it makes sense to include it if it will be dropped later.

Comment 7 Rex Dieter 2010-08-06 11:19:00 UTC
Hopefully my opinion is clear enough ( see comment #1 and comment #4 )

Comment 8 Miroslav Lichvar 2010-09-21 10:32:43 UTC
Should be fixed in mutt-1.5.21-1.fc15.


Note You need to log in before you can comment on or make changes to this bug.