Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong $^X on native Android #13898

Open
p5pRT opened this issue Jun 2, 2014 · 7 comments
Open

Wrong $^X on native Android #13898

p5pRT opened this issue Jun 2, 2014 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 2, 2014

Migrated from rt.perl.org#122019 (status was 'open')

Searchable as RT122019$

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2014

From dexter@cpan.org

On native Android​:

$ perl -le 'print $^X'
perl

d_procselfexec is not detected because in my setup ls is a symlink to busybox.

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2014

From dexter@cpan.org

On Pon 02 Cze 2014, 13​:30​:41, dexter@​cpan.org wrote​:

d_procselfexec is not detected because in my setup ls is a symlink to
busybox.

Patch included. It changes the heuristic for /proc/self/exe.

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2014

From dexter@cpan.org

0001-Fix-for-perl-122019-Wrong-X-on-native-Android.patch
From f7ec4cf11c55167bffbfc77e9961304c1620febb Mon Sep 17 00:00:00 2001
From: Piotr Roszatycki <piotr.roszatycki@gmail.com>
Date: Mon, 2 Jun 2014 22:32:23 +0200
Subject: [PATCH] Fix for [perl #122019] Wrong $^X on native Android

d_procselfexec was not detected because in some setup ls is a symlink to
busybox
---
 Configure | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Configure b/Configure
index 293ef61..5e92bcd 100755
--- a/Configure
+++ b/Configure
@@ -16473,8 +16473,14 @@ case "$d_readlink" in
 	    type=$1; try=$2
 	    shift; shift
 	    if $issymlink $try; then
+		$ls -l $ls > ls_l_ls
+		if $contains "[-][>]" ls_l_ls; then
+		    real_ls=`cat ls_l_ls | sed -e 's/.* -> //'`
+		else
+		    real_ls=`basename $ls`
+		fi
 		$ls -l $try > reflect
-		if $contains /`basename $ls` reflect >/dev/null 2>&1; then
+		if $contains /$real_ls reflect >/dev/null 2>&1; then
 		    echo "You have $type-like $try."
 		    procselfexe='"'$try'"'
 		    val="$define"
@@ -16485,7 +16491,7 @@ case "$d_readlink" in
 	done
 	;;
 esac
-$rm -f reflect
+$rm -f ls_l_ls reflect
 set d_procselfexe
 eval $setvar
 
-- 
1.8.1.2

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2014

From [Unknown Contact. See original ticket]

On Pon 02 Cze 2014, 13​:30​:41, dexter@​cpan.org wrote​:

d_procselfexec is not detected because in my setup ls is a symlink to
busybox.

Patch included. It changes the heuristic for /proc/self/exe.

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2014

From @Tux

On Mon, 2 Jun 2014 13​:36​:15 -0700, "Piotr Roszatycki via RT"
<perlbug-comment@​perl.org> wrote​:

On Pon 02 Cze 2014, 13​:30​:41, dexter@​cpan.org wrote​:

d_procselfexec is not detected because in my setup ls is a symlink to
busybox.

Patch included. It changes the heuristic for /proc/self/exe.

Can this be done in hints?

--
H.Merijn Brand http​://tux.nl Perl Monger http​://amsterdam.pm.org/
using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE
http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org/
http​://qa.perl.org http​://www.goldmark.org/jeff/stupid-disclaimers/

@p5pRT
Copy link
Author

p5pRT commented Jun 2, 2014

From dexter@cpan.org

On Pon 02 Cze 2014, 13​:44​:22, hmbrand wrote​:

Can this be done in hints?

It could be, but I belive it might be useful for other embeded systems with busybox as main system toolkit.

@p5pRT
Copy link
Author

p5pRT commented Jun 3, 2014

@jkeenan - Status changed from 'new' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants