First I'd like to express my thanks to all who replied and in particular
Bill Melvin who provided the final fix.
I had started out to install Amanda on a new Tru64 box to run backups, as
we use Amanda on 5 Linux boxes and one other Tru64 box. I obtained,
compiled and installed amanda on the box. once amanda was configured
amcheck ran fine. Great, now lets run amdump by hand to see if we
"really" are ready to run. This failed with an error indicating all the
disk were offline, when i knew indeed they were not. The Amanda list
provided the answer in that I needed a patch for Amanda as the most recent
release does not recognize advfs and will report the disks as offline. I
get the file advfs.diff. Fine apply the patch, recompile, good to go.
Guess again. Patch on the box does not recognize the *.diff file. So the
fine folks on the tru64 list suggest using gnu patch. Fine I obtain
patch and run configure and that goes fine. Running make is a different
story. It produces several erros and exits.
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
Stop.
DARN!!!
So let's see what we can find out about this... I found this at...
http://sources.redhat.com/ml/bug-gnu-utils/1999-09/msg00025.html
patch 2.5.4: va_alist not declared in util.c
To: bug-gnu-utils_at_gnu.org
Subject: patch 2.5.4: va_alist not declared in util.c
From: Bernhard Simon <bs_at_bsws.zid.tuwien.ac.at>
Date: Thu, 2 Sep 1999 12:22:33 +0200 (MET DST)
Reply-To: simon_at_zid.tuwien.ac.at
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!)
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. So back to the tru64 list. So again thank you Bill Melvin. Here's
what Bill had to say...
> you need to include the current dir (.) in your include path.
> weird that they did <includefile.h> and not "includefile.h"
so first...
> $ CC=cc ./configure
> creating cache ./config.cache
> checking host system type... alphaev5-dec-osf4.0f
> checking for gcc... cc
> checking whether the C compiler (cc ) works... yes
> checking whether the C compiler (cc ) is a cross-compiler... no
> checking whether we are using GNU C... no
> checking whether cc accepts -g... yes
> checking how to run the C preprocessor... cc -E
> ... other autoconf crap
> updating cache ./config.cache
> creating ./config.status
> creating Makefile
> creating config.h
then...
> $ cc -std -c -O -I. util.c <----------- here is the cmdline you need
next...
> $ make
> ... other files getting compiled
> cc -o patch -g addext.o argmatch.o backupfile.o basename.o error.o
inp.o
> maketime.o partime.o patch.o pch.o quotearg.o quotesys.o util.o
version.o
> xmalloc.o getopt1.o getopt.o malloc.o realloc.o
then if we...
> $ ./patch -v
> patch 2.5.4
> Copyright 1984-1988 Larry Wall
> Copyright 1989-1999 Free Software Foundation, Inc.
>
> This program comes with NO WARRANTY, to the extent permitted by law.
> You may redistribute copies of this program
> under the terms of the GNU General Public License.
> For more information about these matters, see the file named COPYING.
>
> written by Larry Wall and Paul Eggert
> $^D
> #
That should do it. I have NOT yet patched the amanda source, but will get
to that. At least I now have a working copy of GNU Patch.
Mark
__________________________
Mark Hardman, SysAdmin/MIS
Bedford Times-Mail
812.277.7286
mark_at_tmnews.com
Received on Fri May 11 2001 - 21:18:45 NZST