Solved /usr/ports/misc/help2man and other packages won't build

Again perl error's while updating.

Tried different things.

1. Rebuild all perl modules and p5- modules using portmaster -r
2. set DEFAULT_VERSIONS= perl5=5.22 in /etc/make.conf
3. deinstalled perl 5.22 and installed 5.20, also tried 5.18
4. reinstalled p5-Locale-gettext

Nothing seems to help.

Who can help me out?

Regards,
Donald.

Code:
root@donald:/usr/ports/misc/help2man # make install
===>   help2man-1.43.3_1 depends on package: p5-Locale-gettext>=0 - found
===>   help2man-1.43.3_1 depends on executable: gmake-lite - found
===>   help2man-1.43.3_1 depends on executable: msgfmt - found
===>   help2man-1.43.3_1 depends on file: /usr/local/bin/perl5.22.0 - found
===>   help2man-1.43.3_1 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>  Configuring for help2man-1.43.3_1
configure: loading site script /usr/ports/Templates/config.site
checking for perl... perl
checking for module Locale::gettext... no
checking for msgfmt... /usr/local/bin/msgfmt
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for library containing dlsym... none required
checking for library containing bindtextdomain... none required
configure: error: perl module Locale::gettext required
===>  Script "configure" failed unexpectedly.
Please read UPDATING entry 20130612
(http://svnweb.freebsd.org/ports/head/UPDATING?r1=320405&r2=320679) and
PR/184276 (http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184276) to fix
your Perl installation if you got the error message "configure: error: perl
module Locale::gettext required".
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/misc/help2man
*** Error code 1

Stop.
make: stopped in /usr/ports/misc/help2man
root@donald:/usr/ports/misc/help2man #
 
deinstalled perl 5.22 and installed 5.20, also tried 5.18

Don't know if you do this but if you change the perl version you have to do:
portmaster -o lang/new_installed_perl_version lang/previous_installed_perl_version

e.g portmaster -o lang/perl5.20 lang/perl5.22 (if perl5.20 is the new one).

It seems you changed it more times. If you don't do this command each time, I think you had to this:
If I understand your post right, perl5.22 was first version and the last one is perl5.18, the first parameter should be the recent installed version, the second parameter the first.
 
Yes,

Last time I did:

portmaster -o lang/perl5.22 lang/perl5.20

perl5.20 is installed, after above command perl5.22 got installed. (I want perl5.22)

But still the same error by make install in for example /usr/ports/misc/help2man
 
gettext deinstalled and reinstalled.
p5-Locale-gettext deinstalled and reinstalled.

Same error
 
Still no go :-(

Code:
root@donald:/usr/ports/misc/help2man # cat /etc/make.conf
#CPUTYPE=core2
#CFLAGS=-O2 -pipe -fno-strict-aliasing
#COPTFLAGS=-O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing
#KERNCONF=FILESERVER
#BUILD_OPTIMIZED=YES
#WITH_CPUFLAGS=YES
#WITHOUT_DEBUG=YES
#BUILD_STATIC=YES
#NO_PROFILE=YES
#WITH_PKGNG=yes
#WITH_BDB_VER=6
#WITH_OPENSSL_PORT=YES
#DEFAULT_VERSIONS= perl5=5.22 php=5.6 python=2.7 python2=2.7
#OPTIONS_SET=OPTIMIZED_CFLAGS
#OPTIONS_UNSET= X11 DOCS EXAMPLES
root@donald:/usr/ports/misc/help2man # make deinstall
===>  Deinstalling for help2man
===>   help2man not installed, skipping
root@donald:/usr/ports/misc/help2man # make reinstall
===>   help2man-1.43.3_1 depends on package: p5-Locale-gettext>=0 - found
===>   help2man-1.43.3_1 depends on executable: gmake-lite - found
===>   help2man-1.43.3_1 depends on executable: msgfmt - found
===>   help2man-1.43.3_1 depends on file: /usr/local/bin/perl5.22.0 - found
===>   help2man-1.43.3_1 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>  Configuring for help2man-1.43.3_1
configure: loading site script /usr/ports/Templates/config.site
checking for perl... perl
checking for module Locale::gettext... no
checking for msgfmt... /usr/local/bin/msgfmt
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for library containing dlsym... none required
checking for library containing bindtextdomain... none required
configure: error: perl module Locale::gettext required
===>  Script "configure" failed unexpectedly.
Please read UPDATING entry 20130612
(http://svnweb.freebsd.org/ports/head/UPDATING?r1=320405&r2=320679) and
PR/184276 (http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184276) to fix
your Perl installation if you got the error message "configure: error: perl
module Locale::gettext required".
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/misc/help2man
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/misc/help2man
*** Error code 1

Stop.
make: stopped in /usr/ports/misc/help2man
root@donald:/usr/ports/misc/help2man #
 
Please do not set CFLAGS or COPTFLAGS or anything relating to them, they are the FreeBSD equivalent of "kick me" signs. CPUTYPE is okay, but be cautious with it. Every addition made to /etc/make.conf should be seen as a chance to make things a little less solid. Don't add things unless you know for a fact they are needed. That applies to DEFAULT_VERSIONS and a lot of the other things you have, like BUILD_STATIC. Try reducing it to just this:
Code:
CPUTYPE=core2
KERNCONF=FILESERVER
WITH_BDB_VER=6
WITH_OPENSSL_PORT=YES
OPTIONS_SET=OPTIMIZED_CFLAGS
OPTIONS_UNSET= X11 DOCS EXAMPLES

It might be necessary to rebuild a lot of things to get back to normal. Depending on the number of ports installed on that system, it is often quicker to just rebuild everything. See Thread rebuilding-all-ports-with-portmaster.51210/ for a procedure that will preserve the existing list of ports and configuration.
 
Had similar problem, manually fixing perl symlinks in /usr/bin/ helped, not sure why they were not updated. Might be helpful to someone.

Code:
root@server:/usr/bin # perl -v

This is perl 5, version 16, subversion 3

root@server:/usr/bin # pkg version -v | grep perl
perl5-5.26.2_1                     =   up-to-date with index
root@server:/usr/bin # ls -l | grep perl
lrwxr-xr-x   1 root  wheel         25 Dec 31  2015 perl -> /usr/local/bin/perl5.16.3
lrwxr-xr-x   1 root  wheel         25 Dec 31  2015 perl5 -> /usr/local/bin/perl5.16.3

root@server:/usr/bin # rm perl
root@server:/usr/bin # rm perl5
root@server:/usr/bin # ln -s /usr/local/bin/perl5.26.2 perl
root@server:/usr/bin # ln -s /usr/local/bin/perl5.26.2 perl5

root@server:/usr/bin # perl -v

This is perl 5, version 26, subversion 2
 
rm /usr/bin/perl*. They shouldn't exist and have been removed a long time ago.
 
Back
Top