Skip Menu |
Report information
Id: 133787
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: rich+perl [at] hyphen-dash-hyphen.info
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: 5.29.11
Fixed In: (no value)



Date: Mon, 21 Jan 2019 01:32:01 +0000
From: Richard Leach <rich+perl [...] hyphen-dash-hyphen.info>
To: perlbug [...] perl.org
Subject: perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
Download (untitled) / with headers
text/plain 4.3k
The CCTools app mentioned in README.android isn't currently available in the Google Play store, so I'm instead using the Termux app (https://termux.com/) to attempt a native build. (Termux does have a Perl package, but it looks to have been cross-compiled rather than natively built.)

The 4 build errors encountered when trying to "make minitest" are for "unknown type name 'nl_item'":

In file included from ./perl.h:5288:
./proto.h:4496:43: error: unknown type name 'nl_item'
STATIC const char*      S_my_nl_langinfo(const nl_item item, bool toggle);
                                               ^
./proto.h:4500:47: error: unknown type name 'nl_item'
PERL_CALLCONV const char*       Perl_langinfo(const nl_item item);
                                                    ^
locale.c:2416:21: error: unknown type name 'nl_item'
Perl_langinfo(const nl_item item)
                    ^
locale.c:2426:24: error: unknown type name 'nl_item'
S_my_nl_langinfo(const nl_item item, bool toggle)
                       ^

The Android C library has an apparently dummy definition for 'nl_item':

<langinfo.h> nl_langinfo/nl_langinfo_l functions entered Android's libc in Oreo 8.0 release

And the libandroid-support package (installed by default) attempts to supplement this functionality:

I'm new to troubleshooting the build process - and building on Android - so the solution might be something trivial. 

(kwh did suggest trying to build without locales (IIRC) on IRC before Christmas, but the switches he suggested (and I've since forgotten) did not result in a successful build at the time.)

Any suggestions gratefully received. 
---

Summary of my perl5 (revision 5 version 29 subversion 6) configuration:

  Platform:
    osname=android
    osvers=8.1.0
    archname=aarch64-android
    uname='linux localhost 4.4.114 #1 smp preempt thu nov 8 14:28:26 cst 2018 aarch64 android '
    config_args='-des -Dusedevel'
    hint=previous
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
    optimize='-O2'
    cppflags='-fno-strict-aliasing -pipe -fstack-protector-strong'
    ccversion=''
    gccversion='4.2.1 Compatible Clang 7.0.1 (tags/RELEASE_701/final)'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=1
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=
  Linker and Libraries:
    ld='cc'
    ldflags =' -L/system/lib -fstack-protector-strong'
    libpth=/system/lib /vendor/lib /data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/clang/7.0.0 /data/data/com.termux/files/usr/bin/../lib /data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib
    libs=-lpthread -ldb -ldl -lm -lutil -lc -landroid-support
    perllibs=-lpthread -ldl -lm -lutil -lc -landroid-support
    libc=/system/lib/libc.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/system/lib -fstack-protector-strong'


---

Environment:

LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
LANG=en_US.UTF-8
PREFIX=/data/data/com.termux/files/usr
USER=u0_a56
PWD=/data/data/com.termux/files/home
HOME=/data/data/com.termux/files/home
TMPDIR=/data/data/com.termux/files/usr/tmp
SHELL=/data/data/com.termux/files/usr/bin/bash
TERM=xterm
SHLVL=1
ANDROID_ROOT=/system
ANDROID_DATA=/data
LOGNAME=u0_a56
EXTERNAL_STORAGE=/sdcard
PATH=/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
_=/data/data/com.termux/files/usr/bin/env


---





RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.4k
On Mon, 21 Jan 2019 01:32:25 GMT, rich+perl@hyphen-dash-hyphen.info wrote: Show quoted text
> The CCTools app mentioned in README.android isn't currently available > in > the Google Play store, so I'm instead using the Termux app ( > https://termux.com/) to attempt a native build. (Termux does have a > Perl > package, but it looks to have been cross-compiled rather than natively > built.) > > The 4 build errors encountered when trying to "make minitest" are for > "unknown type name 'nl_item'": > > In file included from ./perl.h:5288: > ./proto.h:4496:43: error: unknown type name 'nl_item' > STATIC const char* S_my_nl_langinfo(const nl_item item, bool > toggle); > ^ > ./proto.h:4500:47: error: unknown type name 'nl_item' > PERL_CALLCONV const char* Perl_langinfo(const nl_item item); > ^ > locale.c:2416:21: error: unknown type name 'nl_item' > Perl_langinfo(const nl_item item) > ^ > locale.c:2426:24: error: unknown type name 'nl_item' > S_my_nl_langinfo(const nl_item item, bool toggle) > ^ > > The Android C library has an apparently dummy definition for > 'nl_item': > https://android.googlesource.com/platform/bionic/+/master/libc/include/nl_types.h > > <langinfo.h> nl_langinfo/nl_langinfo_l functions entered Android's > libc in > Oreo 8.0 release > https://github.com/aosp- > mirror/platform_bionic/blob/master/docs/status.md > > And the libandroid-support package (installed by default) attempts to > supplement this functionality: > https://github.com/termux/libandroid- > support/blob/master/include/langinfo.h > > I'm new to troubleshooting the build process - and building on Android > - so > the solution might be something trivial. > > (kwh did suggest trying to build without locales (IIRC) on IRC before > Christmas, but the switches he suggested (and I've since forgotten) > did not > result in a successful build at the time.) > > Any suggestions gratefully received.
Do you have any information as to whether any production version of perl (e.g., perl-5.28.0) built on this platform? If we knew that, we could at least distinguish between a regression and a "this has never been attempted before". (I suspect the latter. There were a few attempts to build on Android in 2014. Go to http://perl5.test-smoke.org/search and look for Android in the OS drop-down.) Thank you very much. -- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
On Sun, 20 Jan 2019 17:32:25 -0800, rich+perl@hyphen-dash-hyphen.info wrote: Show quoted text
> The CCTools app mentioned in README.android isn't currently available > in > the Google Play store, so I'm instead using the Termux app ( > https://termux.com/) to attempt a native build. (Termux does have a > Perl > package, but it looks to have been cross-compiled rather than natively > built.) > > The 4 build errors encountered when trying to "make minitest" are for > "unknown type name 'nl_item'": > > In file included from ./perl.h:5288: > ./proto.h:4496:43: error: unknown type name 'nl_item' > STATIC const char* S_my_nl_langinfo(const nl_item item, bool > toggle); > ^ > ./proto.h:4500:47: error: unknown type name 'nl_item' > PERL_CALLCONV const char* Perl_langinfo(const nl_item item); > ^ > locale.c:2416:21: error: unknown type name 'nl_item' > Perl_langinfo(const nl_item item) > ^ > locale.c:2426:24: error: unknown type name 'nl_item' > S_my_nl_langinfo(const nl_item item, bool toggle) > ^ > > The Android C library has an apparently dummy definition for > 'nl_item': > https://android.googlesource.com/platform/bionic/+/master/libc/include/nl_types.h > > <langinfo.h> nl_langinfo/nl_langinfo_l functions entered Android's > libc in > Oreo 8.0 release > https://github.com/aosp- > mirror/platform_bionic/blob/master/docs/status.md > > And the libandroid-support package (installed by default) attempts to > supplement this functionality: > https://github.com/termux/libandroid- > support/blob/master/include/langinfo.h
It looks like something is wrong with your build environment. The libandroid-support langinfo.h uses the nl_item type: https://github.com/termux/libandroid-support/blob/08ad732aa81f0109410c362eb817fbac50c73b06/include/langinfo.h#L105 as does the bionic header: https://github.com/aosp-mirror/platform_bionic/blob/822326db922ac5d0e4dea8cff1d774e8f04db94a/libc/include/langinfo.h#L95 Could you please attach the complete config.sh generated by Configure? Thanks, Tony
Date: Tue, 22 Jan 2019 22:22:31 +0000
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
From: Richard Leach <rich [...] hyphen-dash-hyphen.info>
To: perlbug-followup [...] perl.org
Download (untitled) / with headers
text/plain 668b
On Tue, Jan 22, 2019 at 12:32 AM James E Keenan via RT <perlbug-followup@perl.org> wrote: Show quoted text
> > Do you have any information as to whether any production version of perl (e.g., perl-5.28.0) built on this platform?
perl-5.28.1 doesn't build on this setup (Oreo + Termux) out of the box either. Show quoted text
> If we knew that, we could at least distinguish between a regression and a "this has never been attempted before".
I'm not aware of any successful native builds under Termux on Oreo. Native builds under CCTools for earlier versions of Android look to have been successful, as per README.android and https://corion.net/talks/perl-on-android/perl-on-android.en.html Thanks.
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
Date: Tue, 22 Jan 2019 22:26:27 +0000
To: perlbug-followup [...] perl.org
From: Richard Leach <rich [...] hyphen-dash-hyphen.info>
Download (untitled) / with headers
text/plain 963b
On Tue, Jan 22, 2019 at 2:41 AM Tony Cook via RT <perlbug-followup@perl.org> wrote: Show quoted text
> > It looks like something is wrong with your build environment. > > The libandroid-support langinfo.h uses the nl_item type: > > https://github.com/termux/libandroid-support/blob/08ad732aa81f0109410c362eb817fbac50c73b06/include/langinfo.h#L105 > > as does the bionic header: > > https://github.com/aosp-mirror/platform_bionic/blob/822326db922ac5d0e4dea8cff1d774e8f04db94a/libc/include/langinfo.h#L95 > > Could you please attach the complete config.sh generated by Configure?
config.sh attached. This was generated by following the "Native Builds" instructions in README.android (which are for CCTools not Termux, but seemed like a good place to start): export SYSROOT=/data/data/com.termux/files export LD_LIBRARY_PATH="$SYSROOT/lib:`pwd`:`pwd`/lib:`pwd`/lib/auto:$LD_LIBRARY_PATH" sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel Thanks.
Download config.sh
text/x-sh 43k

Message body is not shown because sender requested not to inline it.

From: Tony Cook <tony [...] develop-help.com>
Date: Wed, 23 Jan 2019 09:53:39 +1100
CC: perlbug-followup [...] perl.org
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
To: Richard Leach <rich [...] hyphen-dash-hyphen.info>
On Tue, Jan 22, 2019 at 10:26:27PM +0000, Richard Leach wrote: Show quoted text
> On Tue, Jan 22, 2019 at 2:41 AM Tony Cook via RT > <perlbug-followup@perl.org> wrote:
> > > > It looks like something is wrong with your build environment. > > > > The libandroid-support langinfo.h uses the nl_item type: > > > > https://github.com/termux/libandroid-support/blob/08ad732aa81f0109410c362eb817fbac50c73b06/include/langinfo.h#L105 > > > > as does the bionic header: > > > > https://github.com/aosp-mirror/platform_bionic/blob/822326db922ac5d0e4dea8cff1d774e8f04db94a/libc/include/langinfo.h#L95 > > > > Could you please attach the complete config.sh generated by Configure?
> > config.sh attached. > > This was generated by following the "Native Builds" instructions in > README.android (which are for CCTools not Termux, but seemed like a > good place to start): > > export SYSROOT=/data/data/com.termux/files > export LD_LIBRARY_PATH="$SYSROOT/lib:`pwd`:`pwd`/lib:`pwd`/lib/auto:$LD_LIBRARY_PATH" > sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib > /vendor/lib" -Dusedevel
... Show quoted text
> i_langinfo='undef'
... Show quoted text
> incpth='/data/data/com.termux/files/usr/lib/clang/7.0.1/include /data/data/com.termux/files/usr/include'
... It looks like Configure isn't finding your langinfo.h header. There's a couple of options, first, try adding the directory containing langinfo.h to incpth: sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel -Aincpth=/whereever/it/is You may need to add the existing names too: sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel -Dincpth="/data/data/com.termux/files/usr/lib/clang/7.0.1/include /data/data/com.termux/files/usr/include /whereever/it/is" If langinfo.h is already in one of the those directories, check it's preprocessable: echo '#include <langinfo.h>' >test.c cc -E test.c >/dev/null && echo Success If the file is preprocessable, but adding the directory to incpth didn't help, try forcing i_langinfo on: sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel -Di_langinfo Tony
Date: Wed, 23 Jan 2019 01:48:32 +0000
CC: perlbug-followup [...] perl.org
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
From: Richard Leach <rich [...] hyphen-dash-hyphen.info>
To: Tony Cook <tony [...] develop-help.com>
Download (untitled) / with headers
text/plain 1.3k
On Tue, Jan 22, 2019 at 10:53 PM Tony Cook <tony@develop-help.com> wrote: Show quoted text
> It looks like Configure isn't finding your langinfo.h header. > > There's a couple of options, first, try adding the directory > containing langinfo.h to incpth: > > sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel -Aincpth=/whereever/it/is > > You may need to add the existing names too: > > sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel -Dincpth="/data/data/com.termux/files/usr/lib/clang/7.0.1/include /data/data/com.termux/files/usr/include /whereever/it/is"
No joy on either of those two, although "make minitest" got further: In file included from locale.c:48: ./perl_langinfo.h:10:13: fatal error: 'langinfo.h' file not found # include <langinfo.h> ^~~~~~~~~~~~ 1 error generated. make: *** [makefile:245: locale.o] Error 1 The preprocessor check needed "-I/data/data/com.termux/files/usr/include/libandroid-support" to succeed, and then adding that path to locincpth instead of incpth was enough to build miniperl: sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel -Alocincpth=/data/data/com.termux/files/usr/include/libandroid-support Is that enough? Or should the path be added to BOTH locincpth and incpth? Many thanks for the help so far. I'll try a full build later this week.
To: Richard Leach <rich [...] hyphen-dash-hyphen.info>
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
CC: perlbug-followup [...] perl.org
Date: Wed, 23 Jan 2019 13:29:27 +1100
From: Tony Cook <tony [...] develop-help.com>
Download (untitled) / with headers
text/plain 1.4k
On Wed, Jan 23, 2019 at 01:48:32AM +0000, Richard Leach wrote: Show quoted text
> On Tue, Jan 22, 2019 at 10:53 PM Tony Cook <tony@develop-help.com> wrote:
> > It looks like Configure isn't finding your langinfo.h header. > > > > There's a couple of options, first, try adding the directory > > containing langinfo.h to incpth: > > > > sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel -Aincpth=/whereever/it/is > > > > You may need to add the existing names too: > > > > sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel -Dincpth="/data/data/com.termux/files/usr/lib/clang/7.0.1/include /data/data/com.termux/files/usr/include /whereever/it/is"
> > No joy on either of those two, although "make minitest" got further: > > In file included from locale.c:48: > ./perl_langinfo.h:10:13: fatal error: 'langinfo.h' file not found > # include <langinfo.h> > ^~~~~~~~~~~~ > 1 error generated. > make: *** [makefile:245: locale.o] Error 1 > > > The preprocessor check needed > "-I/data/data/com.termux/files/usr/include/libandroid-support" to > succeed, and then adding that path to locincpth instead of incpth was > enough to build miniperl: > > sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib > /vendor/lib" -Dusedevel > -Alocincpth=/data/data/com.termux/files/usr/include/libandroid-support > > Is that enough? Or should the path be added to BOTH locincpth and incpth?
That should be enough. Tony
CC: perlbug-followup [...] perl.org
Date: Thu, 24 Jan 2019 02:32:27 +0000
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
From: Richard Leach <rich [...] hyphen-dash-hyphen.info>
To: Tony Cook <tony [...] develop-help.com>
Download (untitled) / with headers
text/plain 3.8k
On Wed, Jan 23, 2019 at 2:29 AM Tony Cook <tony@develop-help.com> wrote: Show quoted text
> On Wed, Jan 23, 2019 at 01:48:32AM +0000, Richard Leach wrote:
> > The preprocessor check needed > > "-I/data/data/com.termux/files/usr/include/libandroid-support" to > > succeed, and then adding that path to locincpth instead of incpth was > > enough to build miniperl: > > > > sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib > > /vendor/lib" -Dusedevel > > -Alocincpth=/data/data/com.termux/files/usr/include/libandroid-support > > > > Is that enough? Or should the path be added to BOTH locincpth and incpth?
> > That should be enough.
Next problem is that although the miniperl executable does get built, @INC contents are duff, preventing the build from getting much further: ./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' ./miniperl -Ilib -f write_buildcustomize.pl Use of uninitialized value in -x at dist/PathTools/Cwd.pm line 174. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. Use of uninitialized value $_[0] in join or string at dist/PathTools/lib/File/Spec/Unix.pm line 87. rm -f pod/perl5296delta.pod /data/data/com.termux/files/usr/bin/ln -s perldelta.pod pod/perl5296delta.pod ./miniperl -Ilib autodoc.pl Can't locate Exporter.pm in @INC (you may need to install the Exporter module) (@INC contains: /cpan/AutoLoader/lib /dist/Carp/lib /dist/PathTools /dist/PathTools/lib /cpan/ExtUtils-Install/lib /cpan/ExtUtils-MakeMaker/lib /cpan/ExtUtils-Manifest/lib /cpan/File-Path/lib /ext/re /dist/Term-ReadLine/lib /dist/Exporter/lib /ext/File-Find/lib /cpan/Text-Tabs/lib /dist/constant/lib /cpan/version/lib /cpan/Getopt-Long/lib /lib /data/data/com.termux/files/home/PerlSource/perl/lib .) at /data/data/com.termux/files/home/PerlSource/perl/lib/File/Compare.pm line 8. Compilation failed in require at ./regen/regen_lib.pl line 4. BEGIN failed--compilation aborted at ./regen/regen_lib.pl line 4. Compilation failed in require at autodoc.pl line 32. make: *** [makefile:405: pod/perlintern.pod] Error 2 The @INC paths are missing the pwd ("/data/data/com.termux/files/home/PerlSource/perl") prefix, but I can't figure out from INSTALL how to fix that at this point of the build process (i.e. prior to install). Thanks, Richard
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
Date: Tue, 5 Feb 2019 02:01:13 +0000
To: perlbug-followup [...] perl.org
From: Richard Leach <rich [...] hyphen-dash-hyphen.info>
Download (untitled) / with headers
text/plain 2.2k
On Thu, Jan 24, 2019 at 2:33 AM Richard Leach via RT <perlbug-followup@perl.org> wrote: Show quoted text
> Next problem is that although the miniperl executable does get built, > @INC contents are duff, preventing the build from getting much > further: > > ./miniperl -Ilib -f write_buildcustomize.pl > Use of uninitialized value in -x at dist/PathTools/Cwd.pm line 174. > Use of uninitialized value $_[0] in join or string at > dist/PathTools/lib/File/Spec/Unix.pm line 87. > ... > rm -f pod/perl5296delta.pod > /data/data/com.termux/files/usr/bin/ln -s perldelta.pod > pod/perl5296delta.pod > ./miniperl -Ilib autodoc.pl > Can't locate Exporter.pm in @INC (you may need to install the > Exporter module) (@INC contains: /cpan/AutoLoader/lib /dist/Carp/lib > /dist/PathTools /dist/PathTools/lib /cpan/ExtUtils-Install/lib > /cpan/ExtUtils-MakeMaker/lib /cpan/ExtUtils-Manifest/lib > /cpan/File-Path/lib /ext/re /dist/Term-ReadLine/lib /dist/Exporter/lib > /ext/File-Find/lib /cpan/Text-Tabs/lib /dist/constant/lib > /cpan/version/lib /cpan/Getopt-Long/lib /lib > /data/data/com.termux/files/home/PerlSource/perl/lib .) at > /data/data/com.termux/files/home/PerlSource/perl/lib/File/Compare.pm > line 8. > Compilation failed in require at ./regen/regen_lib.pl line 4. > BEGIN failed--compilation aborted at ./regen/regen_lib.pl line 4. > Compilation failed in require at autodoc.pl line 32. > make: *** [makefile:405: pod/perlintern.pod] Error 2 > > > The @INC paths are missing the pwd > ("/data/data/com.termux/files/home/PerlSource/perl") prefix, but I > can't figure out from INSTALL how to fix that at this point of the > build process (i.e. prior to install).
This problem arises in write_buildcustomize.pl, where an empty string is assigned to $cwd: my $cwd = Cwd::getcwd(); Discussion in https://rt.cpan.org/Ticket/Display.html?id=13851 suggests that's to be expected when building as a non-root user lacking some access to (grand)parent directories. That is in fact what the Termux environment seems to give you. Modifying the above line to fallback to Cwd::cwd(), as per the attached patch, works in this instance. I haven't tested it further and am unsure whether this change would be detrimental to other platforms. Regards, Richard

Message body is not shown because sender requested not to inline it.

Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
Date: Tue, 5 Feb 2019 02:08:38 +0000
To: perlbug-followup [...] perl.org
From: Richard Leach <rich+perl [...] hyphen-dash-hyphen.info>
Download (untitled) / with headers
text/plain 2.3k
On Tue, Feb 5, 2019 at 2:01 AM Richard Leach <rich@hyphen-dash-hyphen.info> wrote: Show quoted text
> > On Thu, Jan 24, 2019 at 2:33 AM Richard Leach via RT > <perlbug-followup@perl.org> wrote:
> > Next problem is that although the miniperl executable does get built, > > @INC contents are duff, preventing the build from getting much > > further: > > > > ./miniperl -Ilib -f write_buildcustomize.pl > > Use of uninitialized value in -x at dist/PathTools/Cwd.pm line 174. > > Use of uninitialized value $_[0] in join or string at > > dist/PathTools/lib/File/Spec/Unix.pm line 87. > > ... > > rm -f pod/perl5296delta.pod > > /data/data/com.termux/files/usr/bin/ln -s perldelta.pod > > pod/perl5296delta.pod > > ./miniperl -Ilib autodoc.pl > > Can't locate Exporter.pm in @INC (you may need to install the > > Exporter module) (@INC contains: /cpan/AutoLoader/lib /dist/Carp/lib > > /dist/PathTools /dist/PathTools/lib /cpan/ExtUtils-Install/lib > > /cpan/ExtUtils-MakeMaker/lib /cpan/ExtUtils-Manifest/lib > > /cpan/File-Path/lib /ext/re /dist/Term-ReadLine/lib /dist/Exporter/lib > > /ext/File-Find/lib /cpan/Text-Tabs/lib /dist/constant/lib > > /cpan/version/lib /cpan/Getopt-Long/lib /lib > > /data/data/com.termux/files/home/PerlSource/perl/lib .) at > > /data/data/com.termux/files/home/PerlSource/perl/lib/File/Compare.pm > > line 8. > > Compilation failed in require at ./regen/regen_lib.pl line 4. > > BEGIN failed--compilation aborted at ./regen/regen_lib.pl line 4. > > Compilation failed in require at autodoc.pl line 32. > > make: *** [makefile:405: pod/perlintern.pod] Error 2 > > > > > > The @INC paths are missing the pwd > > ("/data/data/com.termux/files/home/PerlSource/perl") prefix, but I > > can't figure out from INSTALL how to fix that at this point of the > > build process (i.e. prior to install).
> > This problem arises in write_buildcustomize.pl, where an empty string > is assigned to $cwd: > my $cwd = Cwd::getcwd(); > > Discussion in https://rt.cpan.org/Ticket/Display.html?id=13851 > suggests that's to be expected when building as a non-root user > lacking some access to (grand)parent directories. That is in fact what > the Termux environment seems to give you.
"Modifying the above line to fallback to Cwd::cwd(), as per the attached patch, works in this instance." That is to say, it addresses the bulk of errors seen at this stage. More to do to get the build to run to completion.
Date: Tue, 16 Apr 2019 20:43:11 +0100
To: perlbug-followup [...] perl.org, perl5 porters <perl5-porters [...] perl.org>
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
From: Richard Leach <rich [...] hyphen-dash-hyphen.info>
Download (untitled) / with headers
text/plain 2.3k
On Tue, Feb 5, 2019 at 2:01 AM Richard Leach <rich@hyphen-dash-hyphen.info> wrote: Show quoted text
> This problem arises in write_buildcustomize.pl, where an empty string > is assigned to $cwd: > my $cwd = Cwd::getcwd(); > > Discussion in https://rt.cpan.org/Ticket/Display.html?id=13851 > suggests that's to be expected when building as a non-root user > lacking some access to (grand)parent directories. That is in fact what > the Termux environment seems to give you.
Now getting further in the build process with a fresh copy of blead (including Tony's Getcwd patch from RT#133951) and updated Termux packages, using the following commands: export SYSROOT=/data/data/com.termux/files export LD_LIBRARY_PATH="$SYSROOT/lib:`pwd`:`pwd`/lib:`pwd`/lib/auto:$LD_LIBRARY_PATH" sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib /vendor/lib" -Dusedevel -Ud_newlocale Current status is: * "make miniperl" - succeeds * "make minitest" - fails with only 1 error (due to absence of /tmp: discussed on IRC, see RT#134039 for patch) * "make" - the perl executable gets built, but the following fatal error is then encountered: /data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../miniperl "-I/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- B.bs /data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib/auto/B/B.bs 644 "../../miniperl" "-I/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib" "/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib/ExtUtils/xsubpp" -typemap '/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib/ExtUtils/typemap' -typemap '/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/typemap' B.xs > B.xsc mv B.xsc B.c cc -c -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -DVERSION=\"1.76\" -DXS_VERSION=\"1.76\" -fPIC --sysroot=/data/data/com.termux/files "-I../.." B.c In file included from B.xs:13: ../../perl.h:697:10: fatal error: 'sys/types.h' file not found I'm not sure which sys/types.h is being looked for. There's one under /data/data/com.termux/files/usr/include, but trying to pass that path in -Alocincpth made no difference. Any suggestions? Regards, Richard
To: Richard Leach <rich [...] hyphen-dash-hyphen.info>, perlbug-followup [...] perl.org, perl5 porters <perl5-porters [...] perl.org>
From: Karl Williamson <public [...] khwilliamson.com>
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
Date: Fri, 19 Apr 2019 12:09:30 -0600
Download (untitled) / with headers
text/plain 2.5k
On 4/16/19 1:43 PM, Richard Leach wrote: Show quoted text
> On Tue, Feb 5, 2019 at 2:01 AM Richard Leach > <rich@hyphen-dash-hyphen.info> wrote:
>> This problem arises in write_buildcustomize.pl, where an empty string >> is assigned to $cwd: >> my $cwd = Cwd::getcwd(); >> >> Discussion in https://rt.cpan.org/Ticket/Display.html?id=13851 >> suggests that's to be expected when building as a non-root user >> lacking some access to (grand)parent directories. That is in fact what >> the Termux environment seems to give you.
> > > Now getting further in the build process with a fresh copy of blead > (including Tony's Getcwd patch from RT#133951) and updated Termux > packages, using the following commands: > > export SYSROOT=/data/data/com.termux/files > export LD_LIBRARY_PATH="$SYSROOT/lib:`pwd`:`pwd`/lib:`pwd`/lib/auto:$LD_LIBRARY_PATH" > sh Configure -des -Dsysroot=$SYSROOT -Alibpth="/system/lib > /vendor/lib" -Dusedevel -Ud_newlocale > > > Current status is: > * "make miniperl" - succeeds > * "make minitest" - fails with only 1 error (due to absence of /tmp: > discussed on IRC, see RT#134039 for patch) > * "make" - the perl executable gets built, but the following fatal > error is then encountered: > > /data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../miniperl > "-I/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib" > -MExtUtils::Command::MM -e 'cp_nonempty' -- B.bs > /data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib/auto/B/B.bs > 644 > "../../miniperl" > "-I/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib" > "/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib/ExtUtils/xsubpp" > -typemap '/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib/ExtUtils/typemap' > -typemap '/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/typemap' > B.xs > B.xsc > mv B.xsc B.c > cc -c -fno-strict-aliasing -pipe -fstack-protector-strong > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall > -Werror=declaration-after-statement -Werror=pointer-arith -Wextra > -Wc++-compat -Wwrite-strings -O2 -DVERSION=\"1.76\" > -DXS_VERSION=\"1.76\" -fPIC --sysroot=/data/data/com.termux/files > "-I../.." B.c > In file included from B.xs:13: > ../../perl.h:697:10: fatal error: 'sys/types.h' file not found > > > I'm not sure which sys/types.h is being looked for. There's one under > /data/data/com.termux/files/usr/include, but trying to pass that path > in -Alocincpth made no difference. > > Any suggestions? > > Regards, > Richard >
Is this ticket closable?
Date: Fri, 19 Apr 2019 20:55:42 +0100
CC: perlbug-followup [...] perl.org, perl5 porters <perl5-porters [...] perl.org>
To: Karl Williamson <public [...] khwilliamson.com>
From: Richard Leach <rich [...] hyphen-dash-hyphen.info>
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
Download (untitled) / with headers
text/plain 1.3k
On Fri, Apr 19, 2019 at 7:09 PM Karl Williamson <public@khwilliamson.com> wrote: Show quoted text
> Is this ticket closable?
Not quite, I'd like to be able to run "make" without any fatal errors before it gets closed. (Seem to be nearly there.) Need some help with this failure to build B: /data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../miniperl "-I/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- B.bs /data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib/auto/B/B.bs 644 "../../miniperl" "-I/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib" "/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib/ExtUtils/xsubpp" -typemap '/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/../../lib/ExtUtils/typemap' -typemap '/data/data/com.termux/files/home/PerlSource/perl4/perl/ext/B/typemap' B.xs > B.xsc mv B.xsc B.c cc -c -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -DVERSION=\"1.76\" -DXS_VERSION=\"1.76\" -fPIC --sysroot=/data/data/com.termux/files "-I../.." B.c In file included from B.xs:13: ../../perl.h:697:10: fatal error: 'sys/types.h' file not found
CC: perlbug-followup [...] perl.org, perl5 porters <perl5-porters [...] perl.org>
Date: Thu, 25 Apr 2019 00:38:06 +0100
Subject: Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo) under Termux app environment
From: Richard Leach <rich [...] hyphen-dash-hyphen.info>
To: Karl Williamson <public [...] khwilliamson.com>
Download (untitled) / with headers
text/plain 1.2k
On Fri, Apr 19, 2019 at 8:55 PM Richard Leach <rich@hyphen-dash-hyphen.info> wrote: Show quoted text
> On Fri, Apr 19, 2019 at 7:09 PM Karl Williamson <public@khwilliamson.com> wrote:
> > Is this ticket closable?
> > Not quite, I'd like to be able to run "make" without any fatal errors > before it gets closed. (Seem to be nearly there.)
This ticket is now closable. \o/ Looks like setting sysroot is unnecessary in this environment. "make" now runs to completion without it. Will do some more testing, then submit an update patch for README.android. It might also be possible to revert 19abaf5c0cfc9d2967c43999e14f952574f0fced due to better support for locales nowadays, but need to do a cross-compile build before submitting any patch. (Also, I've no idea which Android flavour brought in the locales support and therefore if such a change would cause anyone problems....) FYI There are only a few test failures: * cpan/ExtUtils-MakeMaker/t/02-xsdynamic.t - haven't investigated this yet * cpan/Sys-Syslog/t/<multiple> - will shortly submit a patch for hints/linux-android.sh to ensure that -llog is compiled in * cpan/version/t/07locale.t - patch submitted upstream * dist/Net-Ping/t/<multiple> - covered by https://rt.perl.org/Ticket/Display.html?id=134043 Thanks again to all who assisted!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org