develooper Front page | perl.perl5.porters | Postings from February 2019

Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo)under Termux app environment

Thread Previous | Thread Next
From:
Richard Leach
Date:
February 5, 2019 02:01
Subject:
Re: [perl #133787] perl-5.29.6 fails to build on Android 8.1 (Oreo)under Termux app environment
Message ID:
CADWSe2cbouJiTHhX+3-S1Kk+kWNNue18vUDVPniS51RVUPDgBQ@mail.gmail.com
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. I haven't tested it further
and am unsure whether this change would be detrimental to other
platforms.

Regards,
Richard

Thread Previous | Thread Next


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