compused has asked for the wisdom of the Perl Monks concerning the following question:

After a difficult installation of threaded Perl 5.14.2, running this installed Perl produces only segmentation faults eg on attempting to run cpan.

The unit its installed on is a qnap NAS, which I understand has a non x86 'arm' processor:

uname -a Linux NASC2089B 2.6.33.2 #1 Tue Aug 16 00:31:52 CST 2011 armv5tel unkn +own

To complete the Make process, I had to tweak some of the settings in the Makefile. I tried to put the link in here but apparently some links are not allowed. Basically the change was to invoke Miniperl rather than perl for the buildtoc function. Otherwise installation would stall at:

./perl -f -Ilib pod/buildtoc --build-toc -q

(with the nabble forum changes, miniperl rather than perl, executes 'buildtoc'). The poster referenced the issue as cross compiling one, though I haven't been able to work out exactly what cross compiling means.

My programming skills are rudimentary.

I wonder if part of the problem is because of the 'Optware' package system, which uses iPKG system. Applications installed via iPKG system are said to be installed in a chroot environment, though I can't locate a bash file within the Optware directory.

iPKG offered an older version of Perl, which easiy installed on my NAS but unfortunately was not suitable for the program I wanted to install (swish-e)

perl -V is one of the few things I can do with the installation and produces:

Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
Platform: osname=linux, osvers=2.6.33.2, archname=armv5tel-linux-thread-multi uname='linux nasc2089b 2.6.33.2 #1 tue aug 16 00:31:52 cst 2011 ar +mv5tel unknown ' config_args='-Dprefix=/opt -Dusethreads -Dcc=gcc' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS + -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_ +FILE_OFFSET_BITS=64', optimize='-g', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-stri +ct-aliasing -pipe -fstack-protector' ccversion='', gccversion='4.2.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=8, prototype=define Linker and Libraries: ld='gcc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldl -lm -lcrypt -lutil -lpthread perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -g -L/usr/local/lib -fstack +-protector'
Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV THREADS_HAVE_PIDS USE_ITHRE +ADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at Jan 20 2012 16:15:36 @INC: /usr/local/lib/perl5/site_/5.14.2/armv5tel-linux-thread-multi /usr/local/lib/perl5/site_/5.14.2 /opt/lib/perl5/5.14.2/armv5tel-linux-thread-multi /opt/lib/perl5/5.14.2

Anyway, if anyone can get this happening, I'll go find a monastery to learn to meditate deeper than a zen monk

Compfused

Replies are listed 'Best First'.
Re: Cross Compile Problem?
by AnomalousMonk (Archbishop) on Jan 21, 2012 at 22:26 UTC
    ... I haven't been able to work out exactly what cross compiling means.

    At least I can help a little bit with this one: Cross compiling.

Re: Cross Compile Problem?
by Anonymous Monk on Jan 21, 2012 at 15:56 UTC
        Thanks...thats good news about the armv5tel patch, I had looked but not understood that forum....but where can I find Tony's armv5tel patch?

        Unfortunately I don't understand enough about perl to code the cross compiling information in the first reply

        Compfused
Re: Cross Compile Problem?
by Anonymous Monk on Jan 22, 2012 at 06:38 UTC

    Your other thread which can't be linked :) with silly comment I have no clue. This only adds to my dislike of the language, regardless of how powerful it is.

    http://www.linuxquestions.org/questions/linux-software-2/cant-compile-perl-923545/

      So it appears that you are not cross-compiling

      It also appears that you are using an old gcc (GCC) 4.2.3

      The reported sucessfull build reportedly uses cc version 4.4.5

      So try installing a newer gcc?

        OK, Thanks For your detective work Anonymous, I will try with an updated GCC and report back

        Compfused
Re: Cross Compile Problem?
by chrestomanci (Priest) on Jan 23, 2012 at 09:17 UTC

    Do you need the QNAP NAS features, or are you just looking to run perl, swish-e, etc?

    If you don't need the advanced NAS features, then a simpler option might be to re-image your QNAP box with Debian linux, from which you can install a much wider range of packages, and compile stuff from source a lot more easily.

    http://www.cyrius.com/debian/kirkwood/qnap/