tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Mark Hardman <mark () paperboy ! tmnews ! com>
To: tru64-unix-managers
Subject: compile problem with GNU patch
Date: Fri, 11 May 2001 18:41:15 +0000	[thread overview]
Message-ID: <102653647621828.tru64-unix-managers.marc@archive.invalid> (raw)

First I extend my appreciation for Bill Melvin and sysadmin@astro.xx.xx
for confirming my need to move to GNU patch, which I have dowloaded. The
configure script runs fine and produces the makefile just fine, however
make fails with the following...

cc -c  -DHAVE_CONFIG_H -Ded_PROGRAM=\"/sbin/ed\"  -I. -I. -g util.c
cc: Error: util.c, line 493: In this statement, "va_alist" is not
declared. (undeclared)
  vararg_start (args, format);
--^
cc: Error: util.c, line 527: In this statement, "va_alist" is not
declared. (undeclared)
  vararg_start (args, format);
--^
cc: Error: util.c, line 543: In this statement, "va_alist" is not
declared. (undeclared)
  vararg_start (args, format);
--^
cc: Error: util.c, line 558: In this statement, "va_alist" is not
declared. (undeclared)
  vararg_start (args, format);
--^
cc: Error: util.c, line 618: In this statement, "va_alist" is not
declared. (undeclared)
      vararg_start (args, format);
------^
*** Exit 1



I have found a single reference to this with a "fix" at 
http://sources.redhat.com/ml/bug-gnu-utils/1999-09/msg00025.html here are
the details from the page... and frankly i'm in over my head. I am
guessing I need to edit the makefile and as such have attempted by
changing the parameters with regard to the compiler... but this fails as
well. Any help or suggestions appreciated.


Environment
===========
aix: AIX 3.2.5.1, bundeled cc (xlc 1.3.0.44)
     CC=cc CFLAGS=-O ./configure
tru: Digital UNIX V4.0E, bundeled cc
     CC=cc CFLAGS=-O ./configure
ult: ULTRIX V4.5, bundeled cc
     CC=cc CFLAGS="-O -Olimit 1000" ./configure

Problem
=======
aix:
   # cc -c -DHAVE_CONFIG_H -Ded_PROGRAM=\"/usr/bin/ed\" -I. -I. -O util.c
   "util.c", line 493.20: 1506-045 (S) Undeclared identifier va_alist.
tru:
   # cc -c -DHAVE_CONFIG_H -Ded_PROGRAM=\"/usr/ucb/ed\" -I. -I. -O util.c
   cc: Error: util.c, line 493: In this statement, "va_alist" is not
declared.
ult:
   # cc -c -DHAVE_CONFIG_H -Ded_PROGRAM=\"/bin/ed\" -I. -O -Olimit 1000
util.c
   cfe: Error: util.c, line 73: redeclaration of 'move_file'; \
        previous declaration at line 34 in file './util.h'
   cfe: Error: util.c, line 74: prototype and non-prototype declaration
found \
        for move_file, the type of this parameter is not compatible with
the \
        type after applying default argument promotion
    :
   cfe: Error: util.c, line 493: 'va_alist' undefined, reoccurrences will
not \
        be reported

Solution: compile util.c in ANSI mode
========
aix: -qlanglvl=ansi
   # cc -qlanglvl=ansi -c ... -O util.c
tru: -std or -std1
   # cc -std -c ... -O util.c
ult: -std or -std1
   # cc -std -c ... -O -Olimit 1000 util.c

Additional problem: on ult only
==================
   # cc -o patch -O -Olimit 1000 addext.o ... getopt.o
   ld:
   error.o: symbol program_name has incompatible declarations in object
files

Solution: declare program_name in error.c as in common.h
========
   # nm error.o | grep program_name
   0000000004 V program_name          [external small undefined]
   # nm util.o | grep program_name
   0000000000 U program_name          [external undefined]
   # nm version.o | grep program_name
   0000000000 U program_name          [external undefined]
   # vi error.c   (line 83: char *program_name -> char const
program_name[])
   # make error.o
   # nm error.o | grep program_name
   0000000000 U program_name
   # cc -o patch -O -Olimit 1000 addext.o ... getopt.o   (OK!)

Mark
__________________________
Mark Hardman, SysAdmin/MIS
Bedford Times-Mail
812.277.7286
mark@tmnews.com

                 reply	other threads:[~2001-05-11 18:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox