Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.84k stars 524 forks source link

Failure in ARM-Linux cross compile #8741

Open p5pRT opened 17 years ago

p5pRT commented 17 years ago

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

Searchable as RT41275$

p5pRT commented 17 years ago

From liu.wu@intel.com

Dear Sir\,

I want to port perl to embedded Linux . my environment is : ARM-Linux \,use xscale_be-gcc C compile .

I according to the steps in "Cross-compilation" section in INSTALL in ~/perl-5.8.8

Like this :

  sh ./Configure -des -Dusecrosscompile \

  -Dtargethost=*.*.*.*\

  -Dtargetdir=/tar/get/dir \

  -Dtargetuser=wuliu \

  -Dtargetarch=arm-linux \

  -Dcc=xscale_be-gcc \

  -Dusrinc=/opt/Perl_install/usr/local/include\

  -Dincpth=/opt/Perl_install/usr/local/include \

  -Dlibpth=/opt/Perl_install/usr/local/lib \

  -D...

Our host that running redhat 's ip address is *.*.*.*

But this is can't run success

The error :

I've tried to compile and run the following simple program​:

#include \<stdio.h>

int main() { printf("Ok\n"); return(0); }

I used the command​:

  xscale_be-gcc -o try -O2 -DOVR_DBL_DIG=14 try.c

  /home/roger/Perl/perl-5.8.8/Cross/run-ssh ./try

and I got the following output​:

Permission denied\, please try again.

bash​: line 1​: ././try​: cannot execute binary file

The program compiled OK\, but exited with status 126.

You have a problem. Shall I abort Configure [y]

Ok. Stopping Configure.

I don't know what is wrong \,

Our target machine that my program run on it and host machine that my program compile and build on it should be connect use SSH?

Thank you

Wu Liu

cubical​:PD3-2II-B11

email​:liu.wu@​intel.com

phone​:86-21-387-37917

p5pRT commented 11 years ago

From @jkeenan

On Mon Jan 15 19​:01​:43 2007\, liu.wu@​intel.com wrote​:

Dear Sir\,

I want to port perl to embedded Linux . my environment is : ARM-Linux \,use xscale_be-gcc C compile .

I according to the steps in "Cross-compilation" section in INSTALL in ~/perl-5.8.8

Like this :

sh \./Configure \-des \-Dusecrosscompile \\

    \-Dtargethost=\*\.\*\.\*\.\*\\

    \-Dtargetdir=/tar/get/dir \\

    \-Dtargetuser=wuliu \\

    \-Dtargetarch=arm\-linux \\

    \-Dcc=xscale\_be\-gcc \\

    \-Dusrinc=/opt/Perl\_install/usr/local/include\\

    \-Dincpth=/opt/Perl\_install/usr/local/include \\

    \-Dlibpth=/opt/Perl\_install/usr/local/lib \\

    \-D\.\.\.

Our host that running redhat 's ip address is *.*.*.*

But this is can't run success

The error :

I've tried to compile and run the following simple program​:

#include \<stdio.h>

int main() { printf("Ok\n"); return(0); }

I used the command​:

    xscale\_be\-gcc \-o try \-O2 \-DOVR\_DBL\_DIG=14 try\.c

    /home/roger/Perl/perl\-5\.8\.8/Cross/run\-ssh \./try

and I got the following output​:

Permission denied\, please try again.

bash​: line 1​: ././try​: cannot execute binary file

The program compiled OK\, but exited with status 126.

You have a problem. Shall I abort Configure [y]

Ok. Stopping Configure.

I don't know what is wrong \,

Our target machine that my program run on it and host machine that my program compile and build on it should be connect use SSH?

Thank you

Wu Liu

Do we have anyone familiar with cross-compilation issues who could take a look at this ticket?

Thank you very much. Jim Keenan

p5pRT commented 11 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 10 years ago

From @jkeenan

On Thu May 24 18​:38​:52 2012\, jkeenan wrote​:

On Mon Jan 15 19​:01​:43 2007\, liu.wu@​intel.com wrote​:

Dear Sir\,

I want to port perl to embedded Linux . my environment is : ARM-Linux \,use xscale_be-gcc C compile .

I according to the steps in "Cross-compilation" section in INSTALL in ~/perl-5.8.8

Like this :

sh \./Configure \-des \-Dusecrosscompile \\

    \-Dtargethost=\*\.\*\.\*\.\*\\

    \-Dtargetdir=/tar/get/dir \\

    \-Dtargetuser=wuliu \\

    \-Dtargetarch=arm\-linux \\

    \-Dcc=xscale\_be\-gcc \\

    \-Dusrinc=/opt/Perl\_install/usr/local/include\\

    \-Dincpth=/opt/Perl\_install/usr/local/include \\

    \-Dlibpth=/opt/Perl\_install/usr/local/lib \\

    \-D\.\.\.

Our host that running redhat 's ip address is *.*.*.*

But this is can't run success

The error :

I've tried to compile and run the following simple program​:

#include \<stdio.h>

int main() { printf("Ok\n"); return(0); }

I used the command​:

    xscale\_be\-gcc \-o try \-O2 \-DOVR\_DBL\_DIG=14 try\.c

    /home/roger/Perl/perl\-5\.8\.8/Cross/run\-ssh \./try

and I got the following output​:

Permission denied\, please try again.

bash​: line 1​: ././try​: cannot execute binary file

The program compiled OK\, but exited with status 126.

You have a problem. Shall I abort Configure [y]

Ok. Stopping Configure.

I don't know what is wrong \,

Our target machine that my program run on it and host machine that my program compile and build on it should be connect use SSH?

Thank you

Wu Liu

Do we have anyone familiar with cross-compilation issues who could take a look at this ticket?

Thank you very much. Jim Keenan

Re-posing the question 15 months later​: Is there someone familiar with cross-compilation issues who could take a look at this ticket?

Thank you very much. Jim Keenan

p5pRT commented 10 years ago

From @Hugmeir

On Thu\, Sep 12\, 2013 at 9​:50 PM\, James E Keenan via RT \< perlbug-followup@​perl.org> wrote​:

On Thu May 24 18​:38​:52 2012\, jkeenan wrote​:

On Mon Jan 15 19​:01​:43 2007\, liu.wu@​intel.com wrote​:

Dear Sir\,

I want to port perl to embedded Linux . my environment is : ARM-Linux \,use xscale_be-gcc C compile .

I according to the steps in "Cross-compilation" section in INSTALL in ~/perl-5.8.8

It's been quite a long time\, but if you're still interested in cross-compiling perl\, the first recommendation would be to use castaway's branch​: https://github.com/castaway/perl/tree/jrobinson/configure-for-cross Since that simplifies the process considerably.

Like this :

sh \./Configure \-des \-Dusecrosscompile \\

    \-Dtargethost=\*\.\*\.\*\.\*\\

    \-Dtargetdir=/tar/get/dir \\

    \-Dtargetuser=wuliu \\

    \-Dtargetarch=arm\-linux \\

    \-Dcc=xscale\_be\-gcc \\

    \-Dusrinc=/opt/Perl\_install/usr/local/include\\

    \-Dincpth=/opt/Perl\_install/usr/local/include \\

    \-Dlibpth=/opt/Perl\_install/usr/local/lib \\

    \-D\.\.\.

Our host that running redhat 's ip address is *.*.*.*

Hm\, unless I'm reading this wrong\, it sounds like you used that IP address in -Dtargethost\, rather than setting it to the target's IP? This sounds like a "did you turn it off and on again" sort of question\, but it's worth checking.

But this is can't run success

The error :

I've tried to compile and run the following simple program​:

#include \<stdio.h>

int main() { printf("Ok\n"); return(0); }

I used the command​:

    xscale\_be\-gcc \-o try \-O2 \-DOVR\_DBL\_DIG=14 try\.c

    /home/roger/Perl/perl\-5\.8\.8/Cross/run\-ssh \./try

and I got the following output​:

Permission denied\, please try again.

bash​: line 1​: ././try​: cannot execute binary file

The program compiled OK\, but exited with status 126.

It's possible that the user you're connecting to the device with doesn't have the necessary permissions for the targetdir you specified? Even if you do have the permissions\, can you try creating a simple shell script\, giving it an execute bit\, and trying to run it manually? Some OSs have partitions mounted with the no-exec bit set (hello\, Android's /sdcard)\, which trumps everything else.