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 9, 2013 19:17
Subject:
Re: Question on porting perl 5.16 to Android (no /bin/sh)
Message ID:
CA+nL+nZTyGVR7FFOrG4bUbF=tyQze-UGHK73MWoN0QZDkBNsCg@mail.gmail.com
On Mon, Sep 9, 2013 at 4:01 PM, Ben Greear <greearb@candelatech.com> wrote:
> On 09/09/2013 11:54 AM, Brian Fraser wrote:
>
>> On Thu, Sep 5, 2013 at 1:23 PM, Ben Greear <greearb@candelatech.com<mailto:
>> greearb@candelatech.**com <greearb@candelatech.com>>> wrote:
>>
>> On 09/05/2013 08:52 AM, Brian Fraser wrote:
>>
>> On Thu, Sep 5, 2013 at 2:23 AM, Ben Greear <
>> greearb@candelatech.com <mailto:greearb@candelatech.**com<greearb@candelatech.com>>
>> <mailto:greearb@candelatech.__**com
>>
>> <mailto:greearb@candelatech.**com <greearb@candelatech.com>>>>
>> wrote:
>>
>>
>> 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
>>
>>
>>
>> That was not the problem.
>>
>>
>>
>> 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.
>>
>>
>> Building shared did fix the problem. I've yet more testing to
>> complete, but so far
>> it seems OK. In case anyone else tries this, here are my notes. I
>> think these
>> are free of typos, but I'll need to do another full build from clean
>> repository
>> to know for sure.
>>
>>
>> Awesome! Thanks for the notes and for trying things out. Congrats on your
>> shiny new perl, too :D Tangentially related, could you check your device's
>> android
>> version? I want to try reproducing & fixing the error you got with static
>> libraries, since those really ought to be working everywhere.
>>
>
> It's a 'Nexus 4'. It has been rooted, and I installed the update that was
> automatically
> pushed over the air, but aside from that it was stock when I started on
> it..
Hm.. 4.3 maybe? Getting the specific version would still be helpful, but
that's a good starting point, thanks you. In my phone, I can get the
android version by going to Preferences -> About Phone, although that might
be different in newer devices.
>
>
> And if you have the time, seeing if you can reproduce the error with the
>> android emulator would be pretty helpful in narrowing this down -- it might
>> be that
>> Configure is picking things "right" in my ubuntu and mac, but gets
>> confused in Fedora somehow.
>> ...Or maybe it's yet another android linker fun to work around.
>>
>
> Might be a bit before I can get back to this porting effort.
>
> I suspect that removing the config.sh and Policy.sh before doing any
> testing
> would be the biggest help. Nothing is reliably reproducible without that
> from what I can tell, since many of the options you might give to configure
> are either ignored outright or have different effects since previous
> defaults
> were set differently.
>
> At least in my opinion, that behaviour from Configure is a bug.
I don't know what the rationale for having Configure prefer previous builds
by default; I've been bitten by this before more than I've made use of it,
so I personally agree that for the common case it's unhelpful. One option
is passing the -O flag to Configure, but generally I just git clean -dfx
and go from scratch.
Thread Previous
|
Thread Next