Solved Not able to build gnupg

I'm attempting to build security/gnupg on FreeBSD 10.1
I'm getting the following error:
Code:
Making all in agent
gmake[4]: Entering directory '/usr/ports/security/gnupg/work/gnupg-2.1.6/agent'
cc -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -O2 -pipe -march=core2  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -Wall -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
cc -I/usr/local/include -I/usr/local/include -O2 -pipe -march=core2  -DLIBICONV_PLUG -fstack-protector -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
gpg_agent-command-ssh.o: In function `ssh_handler_add_identity':
command-ssh.c:(.text+0x1f83): undefincc -I/usr/local/include -I/usr/local/include -O2 -pipe -march=core2  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -Wall -Wno-pointer-sign -Wpointer-arith  -fstack-protector -L/usr/lib -o t-protect t-protect.o protect.o ../common/libcommon.a  -L/usr/local/lib -lgcrypt -lgpg-error -L/usr/local/lib -lgpg-error
ed reference to `gettext'
command-ssh.c:(.text+0x211f): undefined reference to `gettext'
command-ssh.c:(.text+0x2245): undefined reference to `gettext'
gpg_agent-command-ssh.o: In function `data_sign':
command-ssh.c:(.text+0x4058): undefined reference to `gettext'
command-ssh.c:(.text+0x40c1): undefined reference to `gettext'
gpg_agent-command-ssh.o:command-ssh.c:(.text+0x40d0): 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....
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.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/security/gnupg
*** Error code 1

Stop.
make: stopped in /usr/ports/security/gnupg

I have the following in /etc/make.conf
Code:
# more /etc/make.conf
CPUTYPE?=core2
WRKDIRPREFIX=/ram
WITH_CCACHE_BUILD=yes
CCACHE_CPP2=1
WITH_BDB_VER=6
QT4_OPTIONS=QGTKSTYLE
QT5_OPTIONS=QGTKSTYLE
OVERRIDE_LINUX_BASE_PORT=c6
OVERRIDE_LINUX_NONBASE_PORTS=c6
WITH_CUPS=yes
CUPS_OVERWRITE_BASE=yes
 
Have you been updating all your ports at the same time or selectively picking port updates? Also, have you been following usr/ports/UPDATING before updating each time?
 
Have you been updating all your ports at the same time or selectively picking port updates? Also, have you been following usr/ports/UPDATING before updating each time?
I update all the ports frequently with portsnap fetch update followed by a reading of /usr/ports/UPDATING. If there no special instructions there, that' s followed by portmaster -aD. I saw nothing special in /usr/ports/UPDATING . Could be I missed something?
 
I update all the ports frequently with portsnap fetch update followed by a reading of /usr/ports/UPDATING. If there no special instructions there, that' s followed by portmaster -aD. I saw nothing special in /usr/ports/UPDATING . Could be I missed something?
Possibly. What is the output of pkg info gettext\* on your machine?
 
Possibly. What is the output of pkg info gettext\* on your machine?

Code:
~> pkg info gettext\*
gettext-0.19.4
gettext-runtime-0.19.4
gettext-tools-0.19.4

The first is a meta-port for the other two. After your first post I was reading the gettext note from 20141130 in /usr/ports/UPDATING. I tried deleting and reinstalling devel/gettext per the instruction there. But the subsequent build of security/gnupg had the same result.
 
Code:
~> pkg info gettext\*
gettext-0.19.4
gettext-runtime-0.19.4
gettext-tools-0.19.4

The first is a meta-port for the other two. After your first post I was reading the gettext note from 20141130 in /usr/ports/UPDATING. I tried deleting and reinstalling devel/gettext per the instruction there. But the subsequent build of security/gnupg had the same result.
Hmm... as you mentioned devel/gettext is just a metaport and as such doesn't directly install anything so that can be ruled out. Have you tried deleting all the gettext ports with pkg delete -f gettext\* and then installing security/gnupg with portmaster(8)? That would pull in the gettext ports automatically. If that doesn't work, try running pkg_libchk from ports-mgmt/bsdadminscripts and fix any problem ports that come up first and then try again.
 
Hmm... as you mentioned devel/gettext is just a metaport and as such doesn't directly install anything so that can be ruled out. Have you tried deleting all the gettext ports with pkg delete -f gettext\* and then installing security/gnupg with portmaster(8)? That would pull in the gettext ports automatically. If that doesn't work, try running pkg_libchk from ports-mgmt/bsdadminscripts and fix any problem ports that come up first and then try again.
pkg_libchk reports no problems. I tried pkg delete -f gettext\* prior to another portmaster -D security/gnupg and it failed with the same error, but I also noticed that it didn't pull in the gettext ports.
 
No, I wasn't. I had disabled DOCS and NLS. I enabled each of them. Apparently, it required NLS to compile. I had emailed the maintainer. I will follow up with another email to him with this detail. Thank You for your help.
Great! Additionally if you don't receive a reply from the port maintainer, maybe creating a PR is in order also so it gets more eyes and doesn't get forgotten.
 
Create a PR. When you add the security/gnupg tag it will automatically generate the notification so consider that the offical notification of the issue along with the best way to get more eyes on it and ensure it doesn't get forgotten.
 
Back
Top