Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Errno.pm.PL bmake error in HEAD_660/pkgsrc : (5 Items)
   
Errno.pm.PL bmake error in HEAD_660/pkgsrc  
I have followed the method for building pkgsrc on QNX6.6 from the link below and am able to bootstrap and bmake lighttpd
 with its dependencies. Arch is x86, host is Ubuntu VM, target is x86 QNX6.6 VM.
http://community.qnx.com/sf/wiki/do/viewPage/projects.pkgsrc/wiki/PkgsrcOnQnx6.6

Several packages require perl and attempt to build perl-5.18.0nb2. Regardless of -64bit* and -threads options it fails 
with the message below. Even commenting out the "die" line, the build fails at a following stage.
-------------------------------------------------
Running Makefile.PL in ext/Errno
../../miniperl -I../../lib Makefile.PL INSTALLDIRS=perl INSTALLMAN1DIR=none INSTALLMAN3DIR=none PERL_CORE=1 LIBPERL_A=
libperl.so
Writing Makefile for Errno
Making all in ext/Errno
 /usr/pkg/bin/bmake all PERL_CORE=1 LIBPERL_A=libperl.so
../../miniperl "-I../../lib" "-I../../lib" Errno_pm.PL Errno.pm
No error definitions found at Errno_pm.PL line 204.
*** Error code 2

Stop.
bmake: stopped in /home/ubuntu/pkgsrc/lang/perl5/work/perl-5.18.0/ext/Errno
Unsuccessful make(ext/Errno): code=256 at make_ext.pl line 490.
*** Error code 89

Stop.
bmake: stopped in /home/ubuntu/pkgsrc/lang/perl5/work/perl-5.18.0
*** Error code 1

Stop.
bmake: stopped in /home/ubuntu/pkgsrc/lang/perl5
*** Error code 1

Stop.
bmake: stopped in /home/ubuntu/pkgsrc/lang/perl5
-------------------------------------------------

From what I have found searching, there are sometimes issues with the errno.h path being hardcoded.  The path is defined
 as (line 139 in Errno.pm.PL):
	# Some Linuxes have weird errno.hs which generate
	# no #file or #line directives
	my $linux_errno_h = -e '/usr/include/errno.h' ?
	    '/usr/include/errno.h' : '/usr/local/include/errno.h';

I've confirmed that errhno.h exists on the target machine via nfs mount from ${QNX_TARGET}/usr/include at /usr/include/*
.  Is there an issue that the gcc tools are actually on the host machine and accessed via ssh?  Should the host path be 
used?  Thank you for any help.
Re: Errno.pm.PL bmake error in HEAD_660/pkgsrc  
It's probably this line in ext/Errno/Errno_pm.PL:

return unless defined $file and -f $file;

This script does an initial preprocessor run of errno.h, pulls out the
list of headers it brings in and then runs this list through 'gcc -dM
...' to get the errno values.  The list of headers from the initial run
is relative to the host so this check to see if it's reachable from the
target is probably failing.  You can either comment out this line or nfs
mount $QNX_TARGET/usr/include from the host at the same pount on the
target.

perl, sigh...

On Mon, Feb 09, 2015 at 09:23:38AM -0500, Aaron Gawlik wrote:
> I have followed the method for building pkgsrc on QNX6.6 from the link below and am able to bootstrap and bmake 
lighttpd with its dependencies. Arch is x86, host is Ubuntu VM, target is x86 QNX6.6 VM.
> http://community.qnx.com/sf/wiki/do/viewPage/projects.pkgsrc/wiki/PkgsrcOnQnx6.6
> 
> Several packages require perl and attempt to build perl-5.18.0nb2. Regardless of -64bit* and -threads options it fails
 with the message below. Even commenting out the "die" line, the build fails at a following stage.
> -------------------------------------------------
> Running Makefile.PL in ext/Errno
> ../../miniperl -I../../lib Makefile.PL INSTALLDIRS=perl INSTALLMAN1DIR=none INSTALLMAN3DIR=none PERL_CORE=1 LIBPERL_A=
libperl.so
> Writing Makefile for Errno
> Making all in ext/Errno
>  /usr/pkg/bin/bmake all PERL_CORE=1 LIBPERL_A=libperl.so
> ../../miniperl "-I../../lib" "-I../../lib" Errno_pm.PL Errno.pm
> No error definitions found at Errno_pm.PL line 204.
> *** Error code 2
> 
> Stop.
> bmake: stopped in /home/ubuntu/pkgsrc/lang/perl5/work/perl-5.18.0/ext/Errno
> Unsuccessful make(ext/Errno): code=256 at make_ext.pl line 490.
> *** Error code 89
> 
> Stop.
> bmake: stopped in /home/ubuntu/pkgsrc/lang/perl5/work/perl-5.18.0
> *** Error code 1
> 
> Stop.
> bmake: stopped in /home/ubuntu/pkgsrc/lang/perl5
> *** Error code 1
> 
> Stop.
> bmake: stopped in /home/ubuntu/pkgsrc/lang/perl5
> -------------------------------------------------
> 
> From what I have found searching, there are sometimes issues with the errno.h path being hardcoded.  The path is 
defined as (line 139 in Errno.pm.PL):
> 	# Some Linuxes have weird errno.hs which generate
> 	# no #file or #line directives
> 	my $linux_errno_h = -e '/usr/include/errno.h' ?
> 	    '/usr/include/errno.h' : '/usr/local/include/errno.h';
> 
> I've confirmed that errhno.h exists on the target machine via nfs mount from ${QNX_TARGET}/usr/include at /usr/include
/*.  Is there an issue that the gcc tools are actually on the host machine and accessed via ssh?  Should the host path 
be used?  Thank you for any help.
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post113268
> To cancel your subscription to this discussion, please e-mail general-pkgsrc-unsubscribe@community.qnx.com
Re: Errno.pm.PL bmake error in HEAD_660/pkgsrc  
You were correct and both suggestions worked to get past that particular issue.

I then had to modify a number of makefiles because they included "qnx660/host/linux/x86/usr/lib/gcc/i486-pc-nto-qnx6.6.0
/4.7.3/include/" headers instead of "qnx660/target/qnx6/usr/include".

The next issue I've found in the dependency list after perl is g95 compiler - I can move this to a new thread if 
preferred.  The error is listed below, but it occurs due to crtbegin.o not being found.  This is a referenced error 
elsewhere due to missing 32-bit libraries on a 64-bit system (my host tool).  The common suggestion is to install ia32-
libs package, which I did to no avail.  I have the crtbegin.o file under other gcc versions for the base linux and the 
host & target QNX.  Should I make build the object file from source, and if so, with which gcc?  Or should I link to an 
already built object file?

Another suggestion disables "multilib" and defines the MACHINE_GNU_PLATFORM in the makefile.  From http://gnats.netbsd.
org/46397

Thanks again for any help.

------------------------------------------------------------------
/home/ubuntu/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/xgcc -B/home/ubuntu/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/ -B/
usr/pkg/i386-pc-nto-qnx6.6.0/bin/ -B/usr/pkg/i386-pc-nto-qnx6.6.0/lib/ -isystem /usr/pkg/i386-pc-nto-qnx6.6.0/include -
isystem /usr/pkg/i386-pc-nto-qnx6.6.0/sys-include -O2 -O2 -g -O2   -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-
prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I../../gcc -I../../gcc/. -I../../
gcc/../include -I./../intl -I../../gcc/../libcpp/include   -g0 -finhibit-size-directive -fno-inline-functions -fno-
exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time  -fno-omit-frame-pointer -fPIC \
  -c ../../gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
Assembler messages:
Error: can't open /tmp/ccwBb0oL.s for reading: No such file or directory
gmake[2]: *** [crtbegin.o] Error 1
gmake[2]: Leaving directory `/home/ubuntu/pkgsrc/lang/g95/work/gcc-4.1.2/g95/gcc'
gmake[1]: *** [all-gcc] Error 2
gmake[1]: Leaving directory `/home/ubuntu/pkgsrc/lang/g95/work/gcc-4.1.2/g95'
gmake: *** [all] Error 2
*** Error code 2

Stop.
bmake: stopped in /home/ubuntu/pkgsrc/lang/g95
WARNING: Please add USE_TOOLS+=perl to the package Makefile.
*** Error code 1
Re: Errno.pm.PL bmake error in HEAD_660/pkgsrc  
What are you building that thinks it has a dependency on g95?

On Wed, Feb 11, 2015 at 08:41:53AM -0500, Aaron Gawlik wrote:
> You were correct and both suggestions worked to get past that particular issue.
> 
> I then had to modify a number of makefiles because they included "qnx660/host/linux/x86/usr/lib/gcc/i486-pc-nto-qnx6.6
.0/4.7.3/include/" headers instead of "qnx660/target/qnx6/usr/include".
> 
> The next issue I've found in the dependency list after perl is g95 compiler - I can move this to a new thread if 
preferred.  The error is listed below, but it occurs due to crtbegin.o not being found.  This is a referenced error 
elsewhere due to missing 32-bit libraries on a 64-bit system (my host tool).  The common suggestion is to install ia32-
libs package, which I did to no avail.  I have the crtbegin.o file under other gcc versions for the base linux and the 
host & target QNX.  Should I make build the object file from source, and if so, with which gcc?  Or should I link to an already built object file?
> 
> Another suggestion disables "multilib" and defines the MACHINE_GNU_PLATFORM in the makefile.  From http://gnats.netbsd
.org/46397
> 
> Thanks again for any help.
> 
> ------------------------------------------------------------------
> /home/ubuntu/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/xgcc -B/home/ubuntu/pkgsrc/lang/g95/work/gcc-4.1.2/g95/./gcc/ -B
/usr/pkg/i386-pc-nto-qnx6.6.0/bin/ -B/usr/pkg/i386-pc-nto-qnx6.6.0/lib/ -isystem /usr/pkg/i386-pc-nto-qnx6.6.0/include -
isystem /usr/pkg/i386-pc-nto-qnx6.6.0/sys-include -O2 -O2 -g -O2   -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-
prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I../../gcc -I../../gcc/. -I../../
gcc/../include -I./../intl -I../../gcc/../libcpp/include   -g0 -finhibit-size-directive -fno-inline-functions -fno-
exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time  -fno-omit-frame-pointer -fPIC \
>   -c ../../gcc/crtstuff.c -DCRT_BEGIN \
>   -o crtbegin.o
> Assembler messages:
> Error: can't open /tmp/ccwBb0oL.s for reading: No such file or directory
> gmake[2]: *** [crtbegin.o] Error 1
> gmake[2]: Leaving directory `/home/ubuntu/pkgsrc/lang/g95/work/gcc-4.1.2/g95/gcc'
> gmake[1]: *** [all-gcc] Error 2
> gmake[1]: Leaving directory `/home/ubuntu/pkgsrc/lang/g95/work/gcc-4.1.2/g95'
> gmake: *** [all] Error 2
> *** Error code 2
> 
> Stop.
> bmake: stopped in /home/ubuntu/pkgsrc/lang/g95
> WARNING: Please add USE_TOOLS+=perl to the package Makefile.
> *** Error code 1
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post113295
> To cancel your subscription to this discussion, please e-mail general-pkgsrc-unsubscribe@community.qnx.com
Re: Errno.pm.PL bmake error in HEAD_660/pkgsrc  
FFTW2 has the dependency.  I have separately cross-compiled a newer version so getting g95 built to suport FFTW2 is more
 of an exercise.  

I also tried libupnp and it failed with the perl5 error that has since been solved.  I'm not certain what further 
dependencies are required for libupnp but I will try that again tonight.  Thanks.