perl5-dbi / DBD-MariaDB

Perl MariaDB driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xlocale.h

valcomm opened this issue · comments

commented
cpanp
t DBD::MariaDB
Testing DBD::MariaDB (1.00)
...
/opt/perl5/perls/perl-5.26.1/lib/5.26.1/x86_64-linux/CORE/perl.h:738:13: fatal error: xlocale.h: No such file or directory
 #   include <xlocale.h>
              ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:352: MariaDB.o] Error 1

Found the page https://ahelpme.com/linux/compiling/glibc-2-26-and-failure-to-compile-because-of-xlocale-h/ saying:
Since release of glibc 2.26 there is no xlocale.h file any more, because there was never intended to be as separate file! According to the Release notes of glibc 2.26 this file

was a strict subset of the standard header locale.h

Apparently this file had had to be used only internally for the glibc, but many programs used it directly and now they fail to compile with:
-cut-

By the advice from the same page (ln -s /usr/include/locale.h /usr/include/xlocale.h) I got DBD::MariaDB successfully compiled and passed tests, but probably would be nice not to have to do that and rely that there is root that could create that link.

Thanks

commented

Oops, just realized that it might be not DBD::MariaDB issue but perl itself.
Planning to get perl upgraded soon and will check if this is still an issue.

commented

Yes, it is perl itself. After updating glibc header files you should reconfigure and recompile perl. Perl's Configure automatically detects presence of xlocale.h and if it is not present then it would not be used.