Bug 201292 - security/gnupg: Fails to link with NLS option disabled
Summary: security/gnupg: Fails to link with NLS option disabled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jun Kuriyama
URL: https://bugs.g10code.com/gnupg/issue2032
Keywords: patch, patch-ready, regression
: 201375 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-02 19:56 UTC by Trond Endrestøl
Modified: 2015-08-11 22:49 UTC (History)
7 users (show)

See Also:
bugzilla: maintainer-feedback? (kuriyama)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2015-07-02 19:56:30 UTC
/usr/ports at r391178. System is stable/10, amd64, r284296.
Compiling with NLS turned on produces no failure.
With option NLS set to off, linking gpg-agent produces these error messages:

cc -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -O2 -pipe -fno-omit-frame-pointer  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -4Wall -Wno-pointer-sign -Wpointer-arith  -fstack-protector -L/usr/lib -o gpg-agent gpg_agent-gpg-agent.o gpg_agent-command.o gpg_agent-command-ssh.o gpg_agent-call-pinentry.o gpg_agent-cache.o gpg_agent-trans.o gpg_agent-findkey.o gpg_agent-pksign.o gpg_agent-pkdecrypt.o gpg_agent-genkey.o gpg_agent-protect.o gpg_agent-trustlist.o gpg_agent-divert-scd.o gpg_agent-cvt-openpgp.o gpg_agent-call-scd.o gpg_agent-learncard.o ../common/libcommonpth.a -L/usr/local/lib -lgcrypt -lgpg-error -lassuan -L/usr/local/lib -lgpg-error -L/usr/local/lib -lnpth -lpthread -L/usr/local/lib -lgpg-error
gpg_agent-command-ssh.o: In function `ssh_handler_add_identity':
command-ssh.c:(.text+0x1f73): undefined reference to `gettext'
command-ssh.c:(.text+0x210f): undefined reference to `gettext'
command-ssh.c:(.text+0x2235): undefined reference to `gettext'
gpg_agent-command-ssh.o: In function `data_sign':
command-ssh.c:(.text+0x4168): undefined reference to `gettext'
command-ssh.c:(.text+0x41d1): undefined reference to `gettext'
gpg_agent-command-ssh.o:command-ssh.c:(.text+0x41e0): more undefined references to `gettext' follow
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:666: recipe for target 'gpg-agent' failed
gmake[4]: *** [gpg-agent] Error 1
gmake[4]: *** Waiting for unfinished jobs....
mv -f .deps/gpg_protect_tool-protect.Tpo .deps/gpg_protect_tool-protect.Po
mv -f .deps/protect.Tpo .deps/protect.Po
gmake[4]: Leaving directory '/usr/ports/workdirs/usr/ports/security/gnupg/work/gnupg-2.1.6/agent'
Makefile:574: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/workdirs/usr/ports/security/gnupg/work/gnupg-2.1.6'
Makefile:493: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/workdirs/usr/ports/security/gnupg/work/gnupg-2.1.6'
===> Compilation failed unexpectedly.
Comment 1 mjl 2015-07-06 09:59:52 UTC
on 10.1-RELEASE-p14 i386 I get a different build error in the same place, solved by selecting the NLS option as suggested by this PR:

cc -I/usr/local/include -I/usr/local/include -O2 -pipe  -DLIBICONV_PLUG -fstack-protector -DLDAP_DEPRECATED -fno-strict-aliasing -Wall -Wno-pointer-sign -Wpointer-arith  -fstack-protector -L/usr/lib -o gpg-preset-passphrase preset-passphrase.o ../common/libsimple-pwquery.a ../common/libcommon.a -L/usr/local/lib -lgcrypt -lgpg-error -L/usr/local/lib -lgpg-error    -L/usr/local/lib
/usr/bin/ld: //usr/local/lib/libintl.so.8: invalid DSO for symbol `gettext' definition
//usr/local/lib/libintl.so.8: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:666: recipe for target 'gpg-agent' failed
gmake[4]: *** [gpg-agent] Error 1
gmake[4]: *** Waiting for unfinished jobs....
mv -f .deps/gpg_protect_tool-protect.Tpo .deps/gpg_protect_tool-protect.Po
mv -f .deps/protect.Tpo .deps/protect.Po
gmake[4]: Leaving directory '/usr/ports/security/gnupg/work/gnupg-2.1.6/agent'
Makefile:574: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/security/gnupg/work/gnupg-2.1.6'
Makefile:493: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/security/gnupg/work/gnupg-2.1.6'
===> Compilation failed unexpectedly.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-07-06 14:38:56 UTC
Confirming the same error as comment 0 on CURRENT
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2015-07-06 14:42:28 UTC
See upstream issue: 

https://bugs.g10code.com/gnupg/issue2032

Commit referencing commit that caused regression in non-NLS builds:

http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=232af382e563fcbe15589a3ccae7d6908a17c44d
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2015-07-06 14:52:31 UTC
*** Bug 201375 has been marked as a duplicate of this bug. ***
Comment 5 Andre 2015-07-09 15:14:55 UTC
patch from upstream bug fixes this build issue:
https://bugs.g10code.com/gnupg/file653/gpg-agent-no-nls.diff
Comment 6 Michelle Sullivan 2015-07-13 11:28:14 UTC
Confirming this is still present on 93i386...
Comment 7 Andre 2015-07-13 14:02:07 UTC
earlier linked patch has been merged upstream: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=b3286af36d452fc801be573a057b0838d53a2edd
Comment 8 Phil Pennock 2015-07-15 03:46:37 UTC
Found same patch independently of this bug and confirmed that local poudriere build with `OPTIONS_FILE_UNSET+=NLS` is fixed by adding this patch locally.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2015-07-15 10:36:26 UTC
Review pending approval: 

https://reviews.freebsd.org/D3096
Comment 10 Andre 2015-07-21 19:33:49 UTC
current version from ports now builds fine, thanks
Comment 11 Jun Kuriyama freebsd_committer freebsd_triage 2015-08-11 22:49:24 UTC
mat@ committed this.  Thanks!