FAQ

On Sun 03 Oct 2004 19:42, "Alexander Povolotsky" wrote:

Hi,


I am trying to use perl for "vanilla" Linux 2.6, (not
on any "managed' distributions such as Debian, SUSE, Red Hat, etc.). I am not sure really does it make any difference or not - but want to avoid "dead ends" and wanted to "short cut" this effort (perl is not
my direct "subject" and I do not want to loose a lot of time on it ).
Obviously I am not 'up to snuff' on all perl related activities,
flavors and (free ) organizations, which pursue it - so I am somewhat
"lost" about "what is where" when it comes to perl.
The Cc'd perl5-porters is the place for this
So far I did not find any 'precompiled' perl binary, which will run on Linux 2.6 on PowerPC platform - I tried to contact Rich Megginson
but his e-mail at netscape bounces ...

So now I am facing creating the binary from perl-5.8.5 source.
The complication is that my Linux build environment is on cygwin (Intel/Windows) - even my Linux 2.6 kernel was built there ..

How should I approach crosscompile perl-5.8.5 source on cygwin (Intel/Windows) for PowerPC/Linux 2.6 ?
(Can not use configure, I guess ? )
Why not? If all the utilities are in place, and Linux runs fine, just fetch
the source, unpack and go

# cd /tmp
# wget ftp://download.xs4all.nl/pub/mirror/CPAN/src/5.0/perl-5.8.5.tar.bz2
# bzip2 -d <perl-5.8.5.tar.bz2 | tar xf -
# cd perl-5.8.5
# ./Configure -des
# make
# make test
# make install
Thanks,
Best Regards,
Alex
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.3, & 5.9.x, and 809 on HP-UX 10.20 & 11.00, 11i,
AIX 4.3, SuSE 9.0, and Win2k. http://www.cmve.net/~merijn/
http://archives.develooper.com/daily-build@perl.org/ perl-qa@perl.org
send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org

Search Discussions

  • Konovalov, Vadim at Oct 4, 2004 at 8:01 am

    How should I approach crosscompile perl-5.8.5 source on
    cygwin (Intel/Windows) for PowerPC/Linux 2.6 ?
    (Can not use configure, I guess ? )
    Why not? If all the utilities are in place, and Linux runs
    fine, just fetch
    the source, unpack and go
    Perl do not fully support crosscompiling, AFAIK

    Mostly you will go to target's miniperl that could be used instead of full
    perl (at least it is how many crosscompiles work, only WinCE gets full perl
    on target, but that totally different, as there's no configure step there.)

    However miniperl is mostly enough.
    # cd /tmp
    # wget
    ftp://download.xs4all.nl/pub/mirror/CPAN/src/5.0/perl-5.8.5.tar.bz2
    # bzip2 -d <perl-5.8.5.tar.bz2 | tar xf -
    # cd perl-5.8.5
    # ./Configure -des
    # make
    # make test
    # make install
    Are you sure this will enable cross-compile?

    Best regards,
    Vadim.
  • H.Merijn Brand at Oct 4, 2004 at 9:18 am

    On Mon 04 Oct 2004 09:57, "Konovalov, Vadim" wrote:
    How should I approach crosscompile perl-5.8.5 source on
    cygwin (Intel/Windows) for PowerPC/Linux 2.6 ?
    (Can not use configure, I guess ? )
    Why not? If all the utilities are in place, and Linux runs
    fine, just fetch
    the source, unpack and go
    Perl do not fully support crosscompiling, AFAIK

    Mostly you will go to target's miniperl that could be used instead of full
    perl (at least it is how many crosscompiles work, only WinCE gets full perl
    on target, but that totally different, as there's no configure step there.)

    However miniperl is mostly enough.
    # cd /tmp
    # wget
    ftp://download.xs4all.nl/pub/mirror/CPAN/src/5.0/perl-5.8.5.tar.bz2
    # bzip2 -d <perl-5.8.5.tar.bz2 | tar xf -
    # cd perl-5.8.5
    # ./Configure -des
    # make
    # make test
    # make install
    Are you sure this will enable cross-compile?
    Why would you need to cross-compile?
    Once Linux is up and running, you've got it all there, haven't you?

    Or do you have to go back to cygwin to build stuff and start Linux from there?
    In that case I'd suggest building the devel environment (bison, sed, awk, flex,
    binutils, gcc, make) from cygwin to be present on your linux environment and
    continue in linux

    Cross compilation from Cygwin to linux does not sound like a sane idea to me.
    Mostly because cygwin has to jump through hoops to mimic posix/*nix behaviour
    on win32 environment. Autodetection of signals and thread stuff will be less
    than reliable to say the least.

    BTW does your Dynaloader work have cross-compiling in mind, or does compiling
    on cygwin/windows inhibit Dynaloader on the cross-target (linux)

    --
    H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
    using perl-5.6.1, 5.8.3, & 5.9.x, and 809 on HP-UX 10.20 & 11.00, 11i,
    AIX 4.3, SuSE 9.0, and Win2k. http://www.cmve.net/~merijn/
    http://archives.develooper.com/daily-build@perl.org/ perl-qa@perl.org
    send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org
  • Konovalov, Vadim at Oct 4, 2004 at 11:17 am

    How should I approach crosscompile perl-5.8.5 source on
    cygwin (Intel/Windows) for PowerPC/Linux 2.6 ?
    (Can not use configure, I guess ? )
    Why not? If all the utilities are in place, and Linux runs
    fine, just fetch
    the source, unpack and go
    Perl do not fully support crosscompiling, AFAIK

    Mostly you will go to target's miniperl that could be used
    instead of full
    perl (at least it is how many crosscompiles work, only
    WinCE gets full perl
    on target, but that totally different, as there's no
    configure step there.)
    However miniperl is mostly enough.
    # cd /tmp
    # wget
    ftp://download.xs4all.nl/pub/mirror/CPAN/src/5.0/perl-5.8.5.tar.bz2
    # bzip2 -d <perl-5.8.5.tar.bz2 | tar xf -
    # cd perl-5.8.5
    # ./Configure -des
    # make
    # make test
    # make install
    Are you sure this will enable cross-compile?
    Why would you need to cross-compile?
    Once Linux is up and running, you've got it all there, haven't you?
    I gave exactly same advice yesterday to Alexander, in private mail.

    Looks like he has cross-compiler and do not has native compiler for some
    reasons.
    Or do you have to go back to cygwin to build stuff and start
    Linux from there?
    cygwin runs on x86, target is PPC (power pc), so those are different
    computers.

    My satellite receiver is PPC processor that runs linux, so we have similar
    architectures, but I do quite little programming on it (although my receiver
    runs Perl correctly and I tend to calculate 2**1000 using bigint there
    :):):) )
    In that case I'd suggest building the devel environment
    (bison, sed, awk, flex,
    binutils, gcc, make) from cygwin to be present on your linux
    environment and
    continue in linux

    Cross compilation from Cygwin to linux does not sound like a
    sane idea to me.
    indeed, using same cross-compilation chain compiled on Linux looks like
    better idea, and crossgcc@sources.redhat.com is a very busy and helpful list
    for such reasons.
    BTW does your Dynaloader work have cross-compiling in mind,
    or does compiling
    on cygwin/windows inhibit Dynaloader on the cross-target (linux)
    Dynaloader executes on TARGET and it is simple and should not know about
    cross-compilation.
    Dynaloader that used on HOST during cross-compiltion for WinCE also do not
    need knowing anything about that.

    So, no, Dynaloader work do not have any cross-compiling in mind

    Config.pm (and mostly Config.pm creation step) bothers about
    cross-compilation for WinCE.

    Best regards,
    Vadim.
  • Konovalov, Vadim at Oct 4, 2004 at 12:54 pm

    BTW does your Dynaloader work have cross-compiling in mind,
    or does compiling
    on cygwin/windows inhibit Dynaloader on the cross-target (linux)
    Dynaloader executes on TARGET and it is simple and should not
    know about
    cross-compilation.
    Dynaloader that used on HOST during cross-compiltion for
    WinCE also do not
    need knowing anything about that.
    Okay, I thought a little and realized that Dynaloader_pm.PL could be invoked
    with fake $^O so that it will generate Dynaloader.pm for target platform.

    Here is a script to do that (I tested it yesterday) :

    for my $O (qw(MacOS MSWin32 darwin os2 VMS cygwin linux sunos)) {
    system("../../perl", '-we', "\$^O='$O';do './DynaLoader_pm.PL'");
    `mv DynaLoader.pm DynaLoader-$O.pm`;
    }

    So Dynaloader_pm.PL could be used to create Dynaloader.pm for different $^O.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedOct 4, '04 at 7:50a
activeOct 4, '04 at 12:54p
posts5
users2
websiteperl.org

People

Translate

site design / logo © 2021 Grokbase