Subject: pkg/37380: pkgtools/p5-pkgsrc-Dewey fails due to missing err function on IRIX
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <srcshelton@gmail.com>
List: pkgsrc-bugs
Date: 11/13/2007 21:45:00
>Number:         37380
>Category:       pkg
>Synopsis:       pkgtools/p5-pkgsrc-Dewey fails due to missing err function on IRIX
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 13 21:45:00 +0000 2007
>Originator:     Stuart Shelton
>Release:        n/a - pkgsrc from CVS
>Organization:
>Environment:
IRIX64 octane 6.5 07202013 IP30 ; MIPSpro 7.4.4m compilers
>Description:

pkgtools/p5-pkgsrc-Dewey fails because it contains '#include <err.h>'  and uses the 'err' function, but neither exists on IRIX :(

The build appears to succeed, but the test failure output is:


===> test-message [p5-pkgsrc-Dewey-1.0nb1] ===> Testing for p5-pkgsrc-Dewey-1.0nb1
PERL_DL_NONLAZY=1 /usr/bsd/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Dewey....NOK 1                                                             
#   Failed test 'use pkgsrc::Dewey;'
#   at t/Dewey.t line 9.
#     Tried to use 'pkgsrc::Dewey'.
#     Error:  Can't load '/usr/bsd/var/tmp/pkgtools/p5-pkgsrc-Dewey/work/p5-pkgsrc-Dewey-1.0/blib/arch/auto/pkgsrc/Dewey/Dewey.so' for module pkgsrc::Dewey: 3132286:/usr/bsd/bin/perl: rld: Fatal Error: unresolvable symbol in /usr/bsd/var/tmp/pkgtools/p5-pkgsrc-Dewey/work/p5-pkgsrc-Dewey-1.0/blib/arch/auto/pkgsrc/Dewey/Dewey.so: err at /usr/bsd/lib/perl5/5.8.0/mipseb-irix-thread-multi/DynaLoader.pm line 230.
#  at (eval 3) line 2
# Compilation failed in require at (eval 3) line 2.
# BEGIN failed--compilation aborted at t/Dewey.t line 9.
Undefined subroutine &main::dewey_cmp called at t/Dewey.t line 16.
# Looks like you planned 5 tests but only ran 1.
# Looks like you failed 1 test of 1 run.
# Looks like your test died just after 1.
t/Dewey....dubious                                                           
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-5
        Failed 5/5 tests, 0.00% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/Dewey.t    255 65280     5    9 180.00%  1-5
Failed 1/1 test scripts, 0.00% okay. 5/5 subtests failed, 0.00% okay.
*** Error code 255

Stop.
bmake: stopped in /usr/bsd/var/tmp/pkgtools/p5-pkgsrc-Dewey/work/p5-pkgsrc-Dewey-1.0
*** Error code 1

Stop.
bmake: stopped in /usr/bsd/src/pkgtools/p5-pkgsrc-Dewey
*** Error code 1

Stop.
bmake: stopped in /usr/bsd/src/pkgtools/p5-pkgsrc-Dewey


... the output is identical regardless of whether libnbcompat/inplace.mk is included in the Makefile - I guess there's more needed to have the libnbcompat includes & libraries actually used for a package: as well as the include in the package Makefile, what else needs to be done to make libnbcompat-specific headers available to a package?

>How-To-Repeat:

The previous p5-pkgsrc-Dewey was removed when I upgraded perl5.  This problem allows p5-pkgsrc-Dewey to be installed, but it doesn't work at all.
>Fix:

I threw together a patch to defs.h (v1.5, 2006/04/24) which replaced calls to err() within macros NEWARRAY, RENEW, and ALLOC (and defined support macros NEW and FREE) with 'fprintf( stderr, ....)'.

This worked for me then, but the source must have changed since - and in-tree is where this should really be fixed.