pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45323: sysutils/strace bogus syscall list generation (NetBSD 5 & before)



>Number:         45323
>Category:       pkg
>Synopsis:       sysutils/strace bogus syscall list generation (NetBSD 5 & 
>before)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 01 12:20:00 +0000 2011
>Originator:     Robert Elz
>Release:        NetBSD 5.0   (pkgsrc current 2011-09-01)
>Organization:
        Prince of Songkla University
>Environment:
System: NetBSD epsilon.noi.kre.to 5.1 NetBSD 5.1 (EPSILON-1.2-20101117) #5: Wed 
Nov 17 05:18:11 ICT 2010 
kre%jade.coe.psu.ac.th@localhost:/usr/obj/5.1/kernels/i386/EPSILON i386
Architecture: i386
Machine: i386
>Description:
        This commit ...

Module Name:    pkgsrc
Committed By:   christos
Date:           Tue Aug 30 10:43:11 UTC 2011

Modified Files:
        pkgsrc/sysutils/strace: Makefile distinfo
        pkgsrc/sysutils/strace/patches: patch-aj patch-aq patch-av patch-bc

Log Message:
make it work for NetBSD-current

        which is apparently (mostly, or at least, for what matters here)
        to deal with the new format of the syscalls.master file in
        NetBSD current (HEAD) causes the build system to totally choke on
        a NetBSD 5 (or earlier) format syscalls.master file

        Aside from that, the patch that changes the parsing has the
        wrong checksum recorded in the distinfo file (patches/patch-av)
        (that's trivial to fix of course).


>How-To-Repeat:
        Attempt to build sysutils/strace on a NetBSD 5 system, expect
        to see stuff like ...

===> Building for strace-4.5.15nb2
cd netbsd && make
./syscalls.pl /usr/src/sys/kern/syscalls.master syscalls.print syscalls.cat > 
syscallent.h
Use of uninitialized value $fun[3] in pattern match (m//) at ./syscalls.pl line 
144, <MASTER> line 68.
Use of uninitialized value in concatenation (.) or string at ./syscalls.pl line 
164, <MASTER> line 68.
bad syscall specification for 0: >< at ./syscalls.pl line 164, <MASTER> line 68.
Use of uninitialized value $fun[3] in pattern match (m//) at ./syscalls.pl line 
144, <MASTER> line 69.

        that ends up building a syscalls.h that is missing prototypes for
        the syscalls that the syscall.c function expects to have defined,
        leading to eventual compilation errors like ...

if cc -DHAVE_CONFIG_H -I. -I. -I. -Inetbsd/i386 -I./netbsd/i386 -Inetbsd 
-I./netbsd    -Wall -O2 -MT syscall.o -MD -MP -MF ".deps/syscall.Tpo" -c -o 
syscall.o syscall.c;  then mv -f ".deps/syscall.Tpo" ".deps/syscall.Po"; else 
rm -f ".deps/syscall.Tpo"; exit 1; fi
syscall.c: In function 'internal_syscall':
syscall.c:737: error: 'sys_exit' undeclared (first use in this function)
syscall.c:737: error: (Each undeclared identifier is reported only once
syscall.c:737: error: for each function it appears in.)
syscall.c:740: error: 'sys_fork' undeclared (first use in this function)

>Fix:
        Either the syscalls.pl script needs to be made smart enough to
        deal with both file formats, or we need to have different
        scripts for the different file formats, a stscalls5.pl and
        a syscalls6.pl perhaps - both made by patching the distributed
        syscalls.pl with an appropriate patch (the old patch-av for
        the old systems, and the new one for netBSD current).

        Or something...

        And the distinfo file needs to be rebuilt and committed.

        And this will need a revbump again I think.



Home | Main Index | Thread Index | Old Index