LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Perl compilation failing: "No error definitions found at Errno_pm.PL" (https://www.linuxquestions.org/questions/linux-newbie-8/perl-compilation-failing-no-error-definitions-found-at-errno_pm-pl-922506/)

compused 01-06-2012 07:23 PM

Perl compilation failing: "No error definitions found at Errno_pm.PL"
 
Hi
Compilation of perl 5.14.2 is failing at a particular module during makefile. I am installing into a non-standard location, as an earlier version of Perl is already installed.

./configure works but 'make' fails with:
Code:

Writing Makefile for Errno
Writing MYMETA.yml
make[2]: Entering directory `/share/MD0_DATA/misc/perl-5.14.2/ext/Errno'
make[2]: Leaving directory `/share/MD0_DATA/misc/perl-5.14.2/ext/Errno'
Making all in ext/Errno
 make all PERL_CORE=1 LIBPERL_A=libperl.a
make[2]: Entering directory `/share/MD0_DATA/misc/perl-5.14.2/ext/Errno'
../../miniperl "-I../../lib" "-I../../lib" Errno_pm.PL Errno.pm
No error definitions found at Errno_pm.PL line 216.
make[2]: *** [Errno.pm] Error 2
make[2]: Leaving directory `/share/MD0_DATA/misc/perl-5.14.2/ext/Errno'
Unsuccessful make(ext/Errno): code=512 at make_ext.pl line 463.
make[1]: *** [ext/Errno/pm_to_blib] Error 2
make[1]: Leaving directory `/share/MD0_DATA/misc/perl-5.14.2'
make: *** [install] Error 2

There are a few refs. to this error on the net, but none make sense to me. These are:
1. http://openpli.git.sourceforge.net/g...b8a7d4bf9452a0 which talks about"
Quote:

CROSS COMPILE Badness: /usr/local/include in INCLUDEPATH: /usr/local/include
No error definitions found at Errno_pm.PL line 216.
2. http://www.mail-archive.com/clfs-dev.../msg01108.html which states:
Quote:

Errno_pm.PL fails to find errno.h because it's not in the standard path,
/usr/include or usr/local/include,
at this point in time, need to add /tools/include to the variable
my $linux_errno_h, i patched it but you could use a sed
Anyone out there who can help?
Thanks
Compused

knudfl 01-08-2012 04:06 AM

Quote:

Errno_pm.PL fails to find errno.h because it's not in the standard path,
/usr/include
errno.h : # yum install glibc-devel

And / or : # yum install gcc-c++
... to insure that all the files making gcc usable, are installed.


( Perl-5.14.2 will usually compile OK on any Linux OS.)

.

compused 01-10-2012 07:13 AM

thanks
I found this article written by someone also attempting to compile perl on a qnap device:
http://forum.subsonic.org/forum/view...php?f=6&t=6459
It advises:
Code:

# perl searches for errno.h only at a few predefined places where we do not have it.
# Fix this by replacing these lines
  my $linux_errno_h = -e '/usr/include/errno.h' ?
      '/usr/include/errno.h' : '/usr/local/include/errno.h';

with this:
Code:

my $linux_errno_h = -e '/usr/include/errno.h' ?
      '/usr/include/errno.h' : -e '/usr/local/include/errno.h' ? '/usr/local/include/errno.h' : '/opt/include/errno.h';

in file ext/Errno/Errno_pm.PL in the perl sources directory

It has answered the question
However I continue to encounter problems compiling perl 5.14.2; I tried an unstable version, 5.15.6, and it gave the same 'make' error:
Code:

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


Thanks
MD

andre.pietsch 01-19-2012 08:54 AM

The same problem here. Has anyone an idea?

I think it is a problem with the dynamic loading and the threading support both used at the same time. But I am not sure about that.

compused 01-19-2012 04:44 PM

I have managed the complete the 'make' process but 'make test' fails abysmally as posted here:
http://www.linuxquestions.org/questi...5/#post4574161
Note there was a subsequent post in the Nabble forum where the following was just commented out rather than being modified to use MINIPERL:
$(RUN_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
(but I have not tested it as the poster said it was still not right)

I am currently using tips in other qnap forums/ posts to modify /update library path references and some of the installation tools themselves eg Make

Compused

chrism01 01-19-2012 04:48 PM

FYI: the Perl gurus (inc those who develop Perl) hang out at perlmonks.org; you could try asking there.

patters98 08-09-2012 12:23 PM

@Compused - did you ever find a solution to this issue? I'm having the exact same issue on a Synology NAS Linux.

I had initially struggled with it not picking up shared libraries properly. I fixed up that Errno.PL issue as per that post on the Subsonic forum that you linked to in this thread, then ran:
Code:

export LD_LIBRARY_PATH=/opt/lib:/opt/arm-none-linux-gnueabi/lib
./Configure -de -Dcc=gcc -Dprefix=/opt -Dusethreads -Dlocincpth='/opt/arm-none-linux-gnueabi/include /opt/include' -Dloclibpth='/opt/arm-none-linux-gnueabi/lib /opt/lib /lib'
make

Which eventually results in this error at the point at which it uses perl to compile the documentation I think:
Code:

./perl -f -Ilib pod/buildtoc -q
make: *** [pod/perltoc.pod] Segmentation fault (core dumped)

I have tried perl-5.16.0 and then also perl-5.12.3 (the same version the Subsonic forum poster used) with the same result.
I also read that someone had the same issue compiling on a Vax system, but got around it by compiling with symbols enabled (-g compiler flag). This didn't work for me unfortunately.

Any ideas? I've searched high and low.

compused 08-09-2012 06:02 PM

I did overcome it; its 9am here and I've just got to the office; give me an hour or two

Update:
1. I first updated GCC. Perhaps I didnt need to do this, as I stated in the post, and you could try skipping this step. Refer http://forum.qnap.com/viewtopic.php?p=252858
2. Then this is what I did for Perl. Note that its more elegant to change the $PATH to overcome the errno.h file problem than change the file itself. Note that my configuration switches were limited to:
./Configure -Dcc=gcc -Dprefix=/opt -Dusethreads
Refer the same posting, ie http://forum.qnap.com/viewtopic.php?p=252858 about half way down
Specifying library paths, include paths, LD_LIBRARY_PATH parameters seemed to make no difference as I have noted.

Compused

patters98 10-20-2012 09:53 AM

Thanks for your reply, which I read at the time. I had been steeling myself to attack this problem but kept putting it off since I realised it would be a lengthy effort. And in the end I found a way around my need for a threaded perl build altogether. It had been needed by Automake in order to compile this:
https://github.com/savonet/shine#readme

However since I posted the question I have got more used to cross compiling rather than compiling on the native system, so I was able to build libshine successfully on a Ubuntu VM (which had a threaded perl).


All times are GMT -5. The time now is 09:46 AM.