On Mon, Nov 25, 2002 at 03:25:27PM +0000, Tim Bradshaw wrote:
> Has anyone succeeded in getting this to build?
> 
> I get it to configure OK, but then it dies trying to make dependencies
> (I think) in common-src/debug.c, with errors that look like pid_t and
> various other important types are not known (and also, possibly,
> prototypes are missing / don't match definitions, which may be because
> the P macro isn't defined.
> 
> Everything looks OK - it thinks it should include unistd.h (which is
> where pid_t is defined), but if I trace what gcc is actually including
> it seems to include (the fixincluded) unistd.h but *not* the files it
> includes, (even though _UNISTD_H is not defined...), which smells
> like some gcc bug.  But I can't work out what it is, and it seems
> ludicrously unlikely that gcc has such an obvious bug.
> 
> I have 2.4.2p2, but built with an older gcc (probably 2.9x or maybe an
> early 3, certainly not 3.2).  I've just rebuilt it with 3.2 and it
> works fine (well, it builds with no complaints, I don't want to
> install it).
> 
> All I can think of now is to gradually whittle away at amanda.h /
> config.h or compare them with the 2.4.2p2 ones until something
> changes, but I thought I should ask first (or, realistically just
> stick with 2.4.2p2...).
> 
> The configure line I'm using is:
> 
>     ./configure --prefix=/local \
>           --with-user=root --with-group=backup \
>           --with-config=tfeb-backup \
>           --with-gnutar=/local/gnu/bin/tar \
>           --with-libraries=/local/gnu/lib \
>           --without-debugging
> 
> which should be pretty unexceptionable I think.

--without-debugging is unusual.

Try this patch.

Jean-Louis
-- 
Jean-Louis Martineau             email: [EMAIL PROTECTED] 
Departement IRO, Universite de Montreal
C.P. 6128, Succ. CENTRE-VILLE    Tel: (514) 343-6111 ext. 3529
Montreal, Canada, H3C 3J7        Fax: (514) 343-5834
--- amanda-2.4.3.orig/common-src/debug.c        2002-11-04 20:37:54.000000000 -0500
+++ amanda-2.4.3/common-src/debug.c     2002-11-25 10:54:41.000000000 -0500
@@ -53,6 +53,7 @@
 #  define AMANDA_DBGDIR                AMANDA_TMPDIR
 #endif
 
+#ifdef DEBUG_CODE
 /*
  * Format and write a debug message to the process debug file.
  */
@@ -346,3 +347,4 @@
 
     return s;
 }
+#endif
--- amanda-2.4.3.orig/client-src/client_util.c  2002-11-12 13:01:19.000000000 -0500
+++ amanda-2.4.3/client-src/client_util.c       2002-11-25 10:57:20.000000000 -0500
@@ -92,10 +92,10 @@
     time(&curtime);
     diskname = sanitise_filename(disk);
 
-    dbgdir = stralloc2(AMANDA_DBGDIR, "/");
-    if((d = opendir(AMANDA_DBGDIR)) == NULL) {
+    dbgdir = stralloc2(AMANDA_TMPDIR, "/");
+    if((d = opendir(AMANDA_TMPDIR)) == NULL) {
        error("open debug directory \"%s\": %s",
-       AMANDA_DBGDIR, strerror(errno));
+       AMANDA_TMPDIR, strerror(errno));
     }
     test_name = get_name(diskname, exin,
                         curtime - (AMANDA_DEBUG_DAYS * 24 * 60 * 60), 0);

Reply via email to