Erstellt vor 7 Jahren

Zuletzt geändert vor 6 Jahren

#1500 new addition

Fully-Featured Perl on Freetz

Erstellt von: ralph Verantwortlicher:
Priorität: normal Meilenstein: freetz-future
Komponente: packages Version: devel
Stichworte: Beobachter:
Product Id: Firmware Version:

Beschreibung

To get a fully-featured perl to compile on Freetz, we need to…

  • Have uClibc's system headers available (notably, errno.h and dependencies).
  • Have tons of storage space available (> 128 MB uncompressed).
  • Configure perl source tree for host (build system).
  • Configure (another) perl source tree for target (fbox).

— Setting Configure option -Duserelocatableinc will help avoid 'extension not found' errors.
— With it, perl will look for extensions in ../lib/perl5 .
— Without it, it will look in ${prefix}/lib/perl5.
— (Either way, -I $path adds $path to @INC .)

  • Build native microperl as host_microperl. Alternatively, a locally-available /usr/bin/perl would probably suffice IF it's the same version.
  • Edit target_perl's $(top_srcdir)/ext/Errno/Errno_pm.PL so it can read errno.h (default: /usr/include/errno.h). In 5.14.1, that's lines 127, 147 and 148.
  • Patch target_perl's top-level Makefile so it uses host_microperl to generate Makefiles for its extensions (instead of its own). Setting FULLPERL=/path/to/host_microperl should do that.
  • Make & pray.
  • If successful, make test and hope for the best. Alternatively, skip that step if you're confident.
  • If happy with the results, make install.

Sizes seem to vary depending on actual config:
(note that this is a native build)

# perl5.14.1 -V

Summary of my perl5 (revision 5 version 14 subversion 1) configuration:

  Platform:
    osname=linux, osvers=2.6.28.10, archname=mips-linux
    uname='linux fritz.fonwlan.box 2.6.28.10 #2 sat aug 13 16:45:57 cest 2011 mi
ps gnulinux '
    config_args='-Dusedevel -Dprefix=/opt'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OF
FSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -pipe'
    ccversion='', gccversion='4.4.6', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize
=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib /usr/lib
    libs=-ldl -lm -lcrypt -lc
    perllibs=-ldl -lm -lcrypt -lc
    libc=/lib/libc.so.0, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2'


Characteristics of this binary (from libperl):
  Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV PERL_USE_DEVEL USE_LARGE_FILES
                        USE_PERLIO USE_PERL_ATOF
  Built under linux
  Compiled at Sep 12 2011 23:34:25
  @INC:
    /opt/lib/perl5/site_perl/5.14.1/mips-linux
    /opt/lib/perl5/site_perl/5.14.1
    /opt/lib/perl5/5.14.1/mips-linux
    /opt/lib/perl5/5.14.1
    /opt/lib/perl5/site_perl
    .
#
# ls -dl bin/perl5.14.*
-rwxr-xr-x 2 root root 1557422 Sep 13 00:59 bin/perl5.14.1
# 

Dependencies:

# ldd bin/perl5.14.*
bin/perl5.14.1:
        libdl.so.0 => /lib/libdl.so.0 (0x2aabf000)
        libm.so.0 => /lib/libm.so.0 (0x2aad2000)
        libcrypt.so.0 => /lib/libcrypt.so.0 (0x2aaf8000)
        libc.so.0 => /lib/libc.so.0 (0x2ab1c000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2abd7000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x2aaa8000)
#

Anhänge (2)

Policy.sh (5.2 KB) - hinzugefügt von ralph vor 7 Jahren.
Policy.sh used for build
config.sh (32.3 KB) - hinzugefügt von ralph vor 7 Jahren.
config.sh used for build

Alle Anhänge herunterladen als: .zip

Änderungshistorie (3)

Geändert vor 7 Jahren durch ralph

Policy.sh used for build

Geändert vor 7 Jahren durch ralph

config.sh used for build

comment:1 Geändert vor 6 Jahren durch cuma

  • Typ von enhancement nach addition geändert
Hinweis: Hilfe zur Verwendung von Tickets finden Sie in TracTickets.