Front page | perl.perl5.porters |
Postings from September 2013
Re: Question on porting perl 5.16 to Android (no /bin/sh)
Thread Previous
|
Thread Next
From:
Brian Fraser
Date:
September 5, 2013 15:52
Subject:
Re: Question on porting perl 5.16 to Android (no /bin/sh)
Message ID:
CA+nL+naNe5BRbj1y8sxvTPY4e30h_XrpJWVOfBAWdgA632PkZQ@mail.gmail.com
On Thu, Sep 5, 2013 at 2:23 AM, Ben Greear <greearb@candelatech.com> wrote:
> On 09/04/2013 05:06 PM, Ben Greear wrote:
>
>> On 09/04/2013 04:28 PM, Ben Greear wrote:
>>
>>> On 09/04/2013 03:57 PM, Brian Fraser wrote:
>>>
>>>> On Wed, Sep 4, 2013 at 7:13 PM, Ben Greear <greearb@candelatech.com<mailto:
>>>> greearb@candelatech.**com <greearb@candelatech.com>>> wrote:
>>>>
>>>> On 09/04/2013 03:04 PM, Ben Greear wrote:
>>>>
>>>> ...//../lib/perl5/5.18.0/pod/_**_perltooc.pod
>>>> ...//../lib/perl5/5.18.0/pod/_**_perltoot.pod
>>>> ...//../lib/perl5/5.18.0/pod/_**_a2p.pod
>>>>
>>>>
>>>> This bit is suspicious. For me, it looks like:
>>>>
>>>> [...]
>>>> /usr/local/lib/perl5/5.18.0/**pod/perltooc.pod
>>>> /usr/local/lib/perl5/5.18.0/**pod/perltoot.pod
>>>> /usr/local/lib/perl5/5.18.0/**pod/a2p.pod
>>>> host/miniperl installman --destdir=/tmp/androidperl
>>>> Can't load module Encode, dynamic loading not available in this perl.
>>>> [...]
>>>>
>>>> Looks like it's trying to use installprefixexp instead of
>>>> installprefix. But I'm way out of my depth here -- hopefully someone more
>>>> versed in this area of the
>>>> code can chime in.
>>>>
>>>>
>>>>
>>> I have things like this in my config.sh:
>>>
>>> archlib='.../../lib/perl5/5.**18.0/linux-androideabi'
>>> archlibexp='.../../lib/perl5/**5.18.0/linux-androideabi'
>>> archname64=''
>>> archname='linux-androideabi'
>>> archobjs=''
>>> asctime_r_proto='0'
>>> awk='awk'
>>> baserev='5.0'
>>> bash=''
>>> bin='.../'
>>> bin_ELF='define'
>>> binexp='.../'
>>>
>>> I suspect they are to blame, but I'm not sure how Configure came up with
>>> them...
>>>
>>>
>>> Maybe this relocatable-inc thing?
>>>
>>> initialinstalllocation="$**binexp"
>>> : Default prefix is now "up one level from where the binaries are"
>>> case "$userelocatableinc" in
>>> $define|true|[yY]*)
>>> bin=".../"
>>> binexp=".../"
>>> prefix=".../.."
>>> prefixexp=".../.."
>>> installprefixexp=".../.."
>>> ;;
>>> esac
>>>
>>
>> I disabled relocatableinc, re-ran Configure, and problem remained. BUT:
>> If
>> I clone a new tree and run Configure with relocateableinc disabled, then
>> I get
>> something that looks right. Will test it out later.
>>
>> I guess Configure remembers old stuff and is not easily persuaded to start
>> fresh.
>>
>> ./Configure -des -Duserelocatableinc -A undef:versiononly -U versiononly
>> -Dusedevel -DDEBUGGING -Dusecrosscompile -Dcc=arm-linux-androideabi-gcc
>> -Dtargethost=$DEVICE -Dsysroot=$ANDROID_TOOLCHAIN/**sysroot
>> -Dtargetdir=$TARGETDIR
>>
>
> A simple test to make sure it handles `complex shell comman` works, but in
> a more advanced
> script, I'm getting this error:
>
> Can't load '/data/data/candela.lanforge//**local/lib/perl5/5.18.0/linux-**
> androideabi/auto/Fcntl/Perl_**Fcntl.so' for module Fcntl: dlopen failed:
> cannot locate symbol "Perl_stack_grow" referenced by "Perl_Fcntl.so"... at
> /data/data/candela.lanforge//**local/lib/perl5/5.18.0/**XSLoader.pm line
> 69.
> at /data/data/candela.lanforge//**local/lib/perl5/5.18.0/linux-**androideabi/Fcntl.pm
> line 66.
> Compilation failed in require at /data/data/candela.lanforge//**
> local/lib/perl5/5.18.0/linux-**androideabi/POSIX.pm line 11.
> BEGIN failed--compilation aborted at /data/data/candela.lanforge//**
> local/lib/perl5/5.18.0/linux-**androideabi/POSIX.pm line 17.
>
Stab in the dark, did you perhaps forget to run the
perl -i -wlnpe "s{^libpth=\K.+}{'/tmp/tmpandroidlib'}" config.sh
Line after configure but before running make?
If not, I'm a tad stumped. You can try setting LD_LIBRARY_PATH to something
relevant, like pointing at the CORE directory, or try building a shared
perl (more on that in a moment)
>
> I noticed that there is a ...../CORE/libperl.a file, but there is no
> libperl.so anywhere to be found
> in the install directory.
>
> On the older perl I tried from the perldroid project there was a
> libperl.so in the CORE directory.
>
> Do I actually need the libperl.so to be created somehow or is that symbol
> supposed
> to be located elsewhere?
By default, perl builds a static perl, so this should be fine, but you can
try building a shared libperl by running Configure with
-Uuserelocatableinc -Duseshrplib
And checking if that works any differently? You'll have to set both
LD_LIBRARY_PATH and PERL5LIB to use that, though.
Thread Previous
|
Thread Next