LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   cant Compile PERL (https://www.linuxquestions.org/questions/linux-software-2/cant-compile-perl-923545/)

compused 01-13-2012 12:50 AM

cant Compile PERL
 
'Make' during a Perl 5.14.2 installation keeps failing on a QNAP embedded linux (busybox) NAS device, whether its compiled with GCC, with or without threads. Have tried both the -O then -g flag. Have otherwise used all defaults.

I dont have enough knowledge to troubleshoot further.

Screen just before failure is:
Code:

chmod 755 ../../lib/auto/threads/shared/shared.so
cp shared.bs ../../lib/auto/threads/shared/shared.bs
chmod 644 ../../lib/auto/threads/shared/shared.bs
make[1]: Leaving directory `/share/MD0_DATA/misc/perl-5.14.2/dist/threads-shared'
./perl -f -Ilib pod/buildtoc --build-toc -q
make: *** [pod/perltoc.pod] Segmentation fault

Anyone can help?
Compfused

Ian John Locke II 01-13-2012 07:10 AM

Could you provide more information about your system, i.e.
operating system, version & architecture (ex: Slackware, 13.37, x86_64)
gcc version (`gcc --version`)
Are you running it as root (or sudo) or just as the local user?

I'm not sure what the problem is either, but these should help someone who might.

compused 01-13-2012 07:41 AM

I am running as root
[~] # gcc --version
gcc (GCC) 4.2.3

[~] # uname -a
Linux NASC2089B 2.6.33.2 #1 Tue Aug 16 00:31:52 CST 2011 armv5tel unknown

Also it is using an ipkg packet management system which results in “chroot” environment. However I am hoping to be able to install Perl independently of ipkg. The ipkg version of Perl is not compatible with other software I wish to install

Compused

Ian John Locke II 01-13-2012 11:36 PM

It's bizarre that it's seg-faulting though. [s]I've never seen make seg-fault.[/s] My original guess was you were missing a dependency for perl 5.14.2 but it has approximately 5, all of which should be included even in an embedded device. And assuming ipkg does dependency resolving, that shouldn't be a problem either.

Actually, it looks like perl might be the culprit here.
Code:

./perl -f -Ilib pod/buildtoc --build-toc -q
It seems to actually be using perl to create something else (I want to say perl's documentation but that'd be perldoc, not perltoc).

compused 01-14-2012 12:25 AM

Thanks for above...that *was* a clue. I have now finished 'make', somewhat unsuccessfully though as 'make test' is reporting test failures in many of the made modules eg
Code:

FAILED--expected 7 tests saw 1,
or
Code:

FAILED--no leader found.
The change I made that allowed 'make' to finish was as in the Makefile ie
Code:

/share/MD0_DATA/misc/perl-5.14.2/Makefile
as advised in:
http://old.nabble.com/Perl-Cross-bui...html#a31633497
ie (note that - means remove, + means replace)

Code:

- $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
+ $(HOSTCC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
 
and
- $(RUN_PERL) -f -Ilib pod/buildtoc --build-toc -q
+ $(MINIPERL) -f -Ilib pod/buildtoc --build-toc -q
 
and
- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
+ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(MINIPERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`

and
- $(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
+ $(MINIPERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
and finally:
- $(RUN_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
+ $(MINIPERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS)


compused 01-14-2012 08:51 PM

'make test' kept hanging at:
Code:

lib/sigtrap
(the relev. test file is lib/sigtrap.t

so I ran 'make install' which stalled, with msg:
Code:

Can't load module Encode, dynamic loading not available in this perl.
  (You may need to build a new perl executable which either supports
  dynamic loading or has the Encode module statically linked into it.)
 at lib/Pod/Man.pm line 34
Compilation failed in require at lib/Pod/Man.pm line 34.
BEGIN failed--compilation aborted at lib/Pod/Man.pm line 34.
Compilation failed in require at installman line 15.
BEGIN failed--compilation aborted at installman line 15.
make[1]: *** [install.man] Error 255
make[1]: Leaving directory `/share/MD0_DATA/misc/perl-5.14.2'
make: *** [install] Error 2


Ian John Locke II 01-15-2012 06:48 PM

I have no clue. This only adds to my dislike of the language, regardless of how powerful it is.


All times are GMT -5. The time now is 08:17 AM.