I have my local OpenWRT SVN development trunk resides in /opt/tmp/openwrt-svn-trunk directory. I configured my local OpenWRT using scripts/env to build several different platform OpenWRT firmware without a problem. For my Seagate DockStar device, I included perl package. After my Seagate DockStar device boots on OpenWRT firmware, I did a perl -V and it returns the following:
root@DockStar:/# perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.22, archname=arm-linux-uclibc
uname='linux maia 2.6.22 #1 wed jul 11 12:24:09 cest 2007 armv5tel unknown unknown gnulinux '
config_args='-der'
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='arm-openwrt-linux-uclibcgnueabi-gcc', ccflags ='-Os -pipe -march=armv5te -mtune=marvell-f -funit-at-a-time -fhonour-copts -msoft-float -DUSE_CROSS_COMPILE -I/opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/usr/include -I/opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/include -I/opt/tmp/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.3.3+cs_uClibc-0.9.31_eabi/usr/include -I/opt/tmp/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.3.3+cs_uClibc-0.9.31_eabi/include',
optimize='-O2',
cppflags='-Os -pipe -march=armv5te -mtune=marvell-f -funit-at-a-time -fhonour-copts -msoft-float -DUSE_CROSS_COMPILE -I/opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/usr/include -I/opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/include -I/opt/tmp/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.3.3+cs_uClibc-0.9.31_eabi/usr/include -I/opt/tmp/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.3.3+cs_uClibc-0.9.31_eabi/include'
ccversion='', gccversion='3.4.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
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=4, prototype=define
Linker and Libraries:
ld='arm-openwrt-linux-uclibcgnueabi-gcc', ldflags =''
libpth=/opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/lib /opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/usr/lib
libs=-lgdbm -ldb -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=, 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 -rdynamic -L/opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/usr/lib -L/opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/lib -L/opt/tmp/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.3.3+cs_uClibc-0.9.31_eabi/usr/lib -L/opt/tmp/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.3.3+cs_uClibc-0.9.31_eabi/lib'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
USE_LARGE_FILES USE_PERLIO
Built under linux
Compiled at Nov 29 2010 13:50:23
@INC:
/usr/lib/perl5/5.10
It appears to look good at a glance. However, a closer look at the above output from a perl -V indicates all the paths point to /opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi and not the /usr/lib/perl5/5.10 directory where the actual perl5 codes reside. If I execute the same perl compiled for my Seagate DockStar device (/opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/usr/bin/perl -V) on my OpenSuSE Linux desktop computer, it returns errors as shown below:
[mazilo@Mi:/opt/tmp/openwrt-svn-trunk 152%] ~ /opt/tmp/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.31_eabi/usr/bin/perl -V
Can't locate Config.pm in @INC (@INC contains: /usr/local/lib/perl5/5.10.0/x86_64-linux /usr/local/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/x86_64-linux /usr/local/lib/perl5/site_perl/5.10.0 .).
BEGIN failed--compilation aborted.
Something doesn't sound right to me, but I just don't know how to fix this and hope OpenWRT developers will be able to fix this easily. Without this, I can't compile the mod_perl of FreeSWITCH package.
FYI, if I execute perl -V on my OpenSuSE Linux desktop computer, it returns the following with the correct path.
[mazilo@Mi:/opt/tmp/openwrt-svn-trunk 149%] ~ perl -V
Summary of my perl5 (revision 5 version 12 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.32, archname=x86_64-linux-thread-multi
uname='linux build30 2.6.32 #1 smp 2010-01-06 16:07:25 +0100 x86_64 x86_64 x86_64 gnulinux '
config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe -Accflags=-DPERL_USE_SAFE_PUTENV'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector'
ccversion='', gccversion='4.5.0 20100604 [gcc-4_5-branch revision 160292]', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib64 -fstack-protector'
libpth=/lib64 /usr/lib64 /usr/local/lib64
libs=-lm -ldl -lcrypt -lpthread
perllibs=-lm -ldl -lcrypt -lpthread
libc=/lib64/libc-2.11.2.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.11.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.12.1/x86_64-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib64 -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_TRACK_MEMPOOL PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
USE_REENTRANT_API
Built under linux
Compiled at Jul 30 2010 00:15:19
@INC:
/usr/lib/perl5/site_perl/5.12.1/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.12.1
/usr/lib/perl5/vendor_perl/5.12.1/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.12.1
/usr/lib/perl5/5.12.1/x86_64-linux-thread-multi
/usr/lib/perl5/5.12.1