Bug 237904 - devel/p5-Locale-libintl: build failure
Summary: devel/p5-Locale-libintl: build failure
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Sunpoet Po-Chuan Hsieh
Depends on:
Reported: 2019-05-15 07:11 UTC by oz42
Modified: 2020-02-08 16:17 UTC (History)
3 users (show)

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

Failed build log without symlink (15.27 KB, text/plain)
2019-05-16 01:41 UTC, Laurence 'GreenReaper' Parry
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description oz42 2019-05-15 07:11:52 UTC
'make' stops here:

Installing /usr/ports/devel/p5-Locale-libintl/work/stage/usr/local/lib/perl5/site_perl/man/man3/Locale::RecodeData::_Encode.3
Installing /usr/ports/devel/p5-Locale-libintl/work/stage/usr/local/lib/perl5/site_perl/man/man3/Locale::libintlFAQ.3
/usr/bin/strip /usr/ports/devel/p5-Locale-libintl/work/stage/usr/local/lib/perl5/site_perl/mach/5.28/auto/Locale/gettext_xs/gettext_xs.so
strip: open /usr/ports/devel/p5-Locale-libintl/work/stage/usr/local/lib/perl5/site_perl/mach/5.28/auto/Locale/gettext_xs/gettext_xs.so failed: No such file or directory

Obviously there is something missing:

# ls -l /usr/ports/devel/p5-Locale-libintl/work/stage/usr/local/lib/perl5/site_perl/mach/5.28/auto
total 12
drwxr-xr-x  3 root  wheel  512 May 15 09:09 ./
drwxr-xr-x  3 root  wheel  512 May 15 09:09 ../
drwxr-xr-x  2 root  wheel  512 May 15 09:09 libintl-perl/
Comment 1 Laurence 'GreenReaper' Parry 2019-05-16 01:40:29 UTC
I imagine because the build of gettext_xs.o is failing?

After upgrading to Perl 5.28 on FreeBSD 11.2, I rebuilt all dependent ports:
nice portupgrade -f `pkg shlib -qR libperl.so.5.24`

The only one to fail was devel/p5-Locale-libintl as described by another person:

when manually updating with:
nice portupgrade -f devel/p5-Locale-libintl

I ended up with:
gettext_xs.xs:25:10: fatal error: 'libintl.h' file not found

It can be worked around with:
ln -s /usr/local/include/libintl.h /usr/include/libintl.h
Comment 2 Laurence 'GreenReaper' Parry 2019-05-16 01:41:41 UTC
Created attachment 204396 [details]
Failed build log without symlink
Comment 3 Sunpoet Po-Chuan Hsieh freebsd_committer 2019-05-25 15:38:17 UTC
I cannot reproduce this failure. The build log should looks like:

--- gettext_xs.o ---
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing    -DVERSION=\"1.31\"  -DXS_VERSION=\"1.31\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.28/mach/CORE"   gettext_xs.c
--- pm_to_blib ---
cp gettext_xs.pm ../blib/lib/Locale/gettext_xs.pm
--- ../blib/arch/auto/Locale/gettext_xs/gettext_xs.bs ---
"/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- gettext_xs.bs ../blib/arch/auto/Locale/gettext_xs/gettext_xs.bs 644
--- dynamic ---
--- linkext ---
--- subdirs ---
--- ../blib/arch/auto/Locale/gettext_xs/gettext_xs.so ---
rm -f ../blib/arch/auto/Locale/gettext_xs/gettext_xs.so
LD_RUN_PATH="/usr/local/lib" cc  -shared  -L/usr/local/lib/perl5/5.28/mach/CORE -lperl -L/usr/local/lib -fstack-protector-strong  gettext_xs.o  -o ../blib/arch/auto/Locale/gettext_xs/gettext_xs.so    -lintl -liconv
chmod 755 ../blib/arch/auto/Locale/gettext_xs/gettext_xs.so
Comment 4 Sunpoet Po-Chuan Hsieh freebsd_committer 2019-06-06 13:44:28 UTC
USES=localbase (added in r503457) should fix this PR.
Comment 5 Dirk Meyer freebsd_committer 2020-02-08 16:17:18 UTC
Still fails on a clean FreeBSD 12.1 amd64

cc -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -pthread -Wl,-E  -fstack-protector-strong -L/usr/local/lib -lpthread -lm -lcrypt -lutil -liconv -o gettest.exe gettest.c
gettest.c:4:10: fatal error: 'libintl.h' file not found
#include <libintl.h>

-I/usr/local/include is still missing.

1 error generated.

devel/p5-Locale-libintl# make -v CONFIGURE_ARGS
INSTALLDIRS="site" CC="cc" CCFLAGS="-O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing " LD="cc" PREFIX="/usr/local"  INSTALLPRIVLIB="/usr/local/lib" INSTALLARCHLIB="/usr/local/lib"

adding " -I/usr/local/include " to CONFIGURE_ARGS does not fix it.
btw CCFLAGS differ, are they not passed to the build?

Last successful build on FreeBSD 12.0:
Nov 21 18:09 /usr/ports/packages12-amd64/All/p5-Locale-libintl-1.31.txz