pkgsrc-Bugs archive

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

pkg/38240: pkgtools/pkg_install-20080313 fails to compile - missing getopt?



>Number:         38240
>Category:       pkg
>Synopsis:       pkgtools/pkg_install-20080313 fails to compile - missing 
>getopt?
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 14 16:50:00 +0000 2008
>Originator:     Stuart Shelton
>Release:        pkgsrc latest from CVS
>Organization:
>Environment:
IRIX64 octane 6.5 07202013 IP30; IRIX 6.5.30; MIPSpro Compilers: Version 7.4.4m
>Description:
cc -DHAVE_CONFIG_H -I/usr/bsd/include -D__inline__=inline -D_LARGEFILE_SOURCE 
-D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 
-I/usr/bsd/var/tmp/pkgtools/pkg_install/work/bzip2 
-I/usr/bsd/var/tmp/pkgtools/pkg_install/work/libarchive/libarchive 
-DHAVE_NBCOMPAT_H=1 -I/usr/bsd/var/tmp/pkgtools/pkg_install/work/libnbcompat 
-I. -I. -I../lib  -DSYSCONFDIR=\"/usr/bsd/etc\" -c99 -O2 -n32 -mips4 -r14000 
-float_const -use_readonly_const -TARG:isa=mips4:platform=ip35:processor=r14000 
-TENV:zeroinit_in_bss=ON -OPT:fast_io=ON:Olimit=8192:reorg_common=ON:swp=ON 
-LNO:auto_dist=ON:fusion_peeling_limit=8:gather_scatter=2 -woff 
1174,1183,1185,1552,3970,3968 -n32 -c audit.c
cc-1020 cc: ERROR File = audit.c, Line = 82
  The identifier "optreset" is undefined.

        optreset = 1;
        ^

cc-1196 cc: WARNING File = audit.c, Line = 405
  The indicated function is declared implicitly.

        fd[0] = open(pkg_vulnerabilities_file, O_WRONLY | O_CREAT | O_TRUNC, 
0644);
                ^

1 error detected in the compilation of "audit.c".
*** Error code 2

Stop.
bmake: stopped in 
/usr/bsd/var/tmp/pkgtools/pkg_install/work/pkg_install-20080313/admin
*** Error code 1

Stop.
bmake: stopped in 
/usr/bsd/var/tmp/pkgtools/pkg_install/work/pkg_install-20080313
*** Error code 1

Stop.
bmake: stopped in /usr/bsd/src/pkgtools/pkg_install
*** Error code 1

Stop.
bmake: stopped in /usr/bsd/src/pkgtools/pkg_install

>How-To-Repeat:

(Out of interest, other warnings generated whilst building pkg_install are:

cc-1188 cc: WARNING File = fexec.c, Line = 90
  The indicated type qualifier is meaningless on cast type.

                (void)execvp(file, (char ** const)argv);
                                    ^

cc-1196 cc: WARNING File = ftpio.c, Line = 332
  The indicated function is declared implicitly.

                setenv(PKG_FTPIO_COMMAND, buf, 1);
                ^

cc-1196 cc: WARNING File = ftpio.c, Line = 409
  The indicated function is declared implicitly.

        unsetenv(PKG_FTPIO_COMMAND); 
        ^

cc-1196 cc: WARNING File = ftpio.c, Line = 461
  The indicated function is declared implicitly.

        setenv(PKG_FTPIO_CURRENTHOST, newHost, 1); /* need to update this in 
the environment */
        ^

cc-1196 cc: WARNING File = ftpio.c, Line = 1141
  The indicated function is declared implicitly.

                setenv("PKG_PATH", pkg_path, 1);
                ^

cc-3604 cc: WARNING File = iterate.c, Line = 403
  missing return statement at end of non-void function "match_best_file"

  }
  ^

cc-1196 cc: WARNING File = path.c, Line = 205
  The indicated function is declared implicitly.

        if (setenv(envname, env0, 1) != 0)
            ^

cc-1196 cc: WARNING File = perform.c, Line = 621
  The indicated function is declared implicitly.

        setenv(PKG_PREFIX_VNAME, (p = find_plist(&Plist, PLIST_CWD)) ? p->name 
: ".", 1);
        ^


... so it looks as if an alternative (un)setenv() function should be provided 
(by nbcompat?) for OS which don't have it natively (I've seen an #ifdef'd 
alternative to setenv in another package, and it was used for a number of 
different platforms, so there's more than just IRIX not supporting 
(un)setenv()...
>Fix:

It looks as if audit.c is using getopt() variables and function calls, without 
including the (nbcompat, in this case) getopt headers



Home | Main Index | Thread Index | Old Index