develooper Front page | perl.perl5.porters | Postings from September 2018

[perl #133500] h2xs failing during 'make'; lacking xlocale.h

Thread Previous
From:
James E Keenan
Date:
September 5, 2018 01:10
Subject:
[perl #133500] h2xs failing during 'make'; lacking xlocale.h
Message ID:
rt-4.0.24-13145-1536109822-1935.133500-75-0@perl.org
# New Ticket Created by  James E Keenan 
# Please include the string:  [perl #133500]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133500 >


In an admittedly naive attempt to create a module using XS, I say (based on
the h2xs) documentation:

#####
$ h2xs -n Alpha::Beta
Defaulting to backwards compatibility with perl 5.28.0
If you intend this module to be compatible with earlier perl versions, 
please
specify a minimum perl version with the -b option.

Writing Alpha-Beta/ppport.h
Writing Alpha-Beta/lib/Alpha/Beta.pm
Writing Alpha-Beta/Beta.xs
Writing Alpha-Beta/fallback/const-c.inc
Writing Alpha-Beta/fallback/const-xs.inc
Writing Alpha-Beta/Makefile.PL
Writing Alpha-Beta/README
Writing Alpha-Beta/t/Alpha-Beta.t
Writing Alpha-Beta/Changes
Writing Alpha-Beta/MANIFEST

$ cd Alpha-Beta/

$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Alpha::Beta
Writing MYMETA.yml and MYMETA.json
#####

I then say:

#####
$ make
cp lib/Alpha/Beta.pm blib/lib/Alpha/Beta.pm
AutoSplitting blib/lib/Alpha/Beta.pm (blib/lib/auto/Alpha/Beta)
Running Mkbootstrap for Beta ()
chmod 644 "Beta.bs"
"/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/bin/perl" 
-MExtUtils::Command::MM -e 'cp_nonempty' -- Beta.bs 
blib/arch/auto/Alpha/Beta/Beta.bs 644
"/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/bin/perl" 
"/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/ExtUtils/xsubpp" 
  -typemap 
'/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/ExtUtils/typemap' 
  Beta.xs > Beta.xsc
Please specify prototyping behavior for Beta.xs (see perlxs manual)
mv Beta.xsc Beta.c
cc -c  -I. -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 
-DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC 
"-I/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE" 
   Beta.c
In file included from Beta.xs:3:0:
/home/jkeenan/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux/CORE/perl.h:719:13: 
fatal error: xlocale.h: No such file or directory
  #   include <xlocale.h>
              ^~~~~~~~~~~
compilation terminated.
Makefile:334: recipe for target 'Beta.o' failed
make: *** [Beta.o] Error 1
#####

Is this a bug which has emerged in h2xs?  Inadequate documentation? 
What am I
missing?

Thank you very much.
Jim Keenan

(perl -V info not relevant; this was run on perl-5.28.0)


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About