--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: kimberlite: FTBFS (amd64/gcc-4.0): static declaration of 'loglevel' follows non-static declaration
- From: Andreas Jochens <aj@andaco.de>
- Date: Thu, 09 Dec 2004 09:30:58 +0100
- Message-id: <E1CcJhS-0005LN-Ua@localhost.localdomain>
Package: kimberlite
Severity: normal
Tags: patch
When building 'kimberlite' on amd64 with gcc-4.0,
I get the following error:
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I.. -I../../include -DNDEBUG -DUSE_MALLOC -g -D__LIBRARY__ -fPIC -W -Wall -Wstrict-prototypes -Wshadow -DCLUSTER_LOCKFILE=\"/var/lock/kimberlite\" -DSVC_START_SCRIPT=\"/usr/lib/kimberlite/ksh_bin/start_service.ksh\" -DSVC_STOP_SCRIPT=\"/usr/lib/kimberlite/ksh_bin/stop_service.ksh\" -DCLU_CONFIG_FILE=\"/etc/kimberlite/cluster.conf\" -c liblogger.c
liblogger.c:62: error: static declaration of 'loglevel' follows non-static declaration
../../include/logger.h:50: error: previous declaration of 'loglevel' was here
make[3]: *** [liblogger.o] Error 1
make[3]: Leaving directory `/kimberlite-1.1.0/src/clulib'
With the attached patch 'kimberlite' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/kimberlite-1.1.0/src/clulib/liblogger.c ./src/clulib/liblogger.c
--- ../tmp-orig/kimberlite-1.1.0/src/clulib/liblogger.c 2001-03-29 07:22:28.000000000 +0200
+++ ./src/clulib/liblogger.c 2004-12-09 08:34:07.902471400 +0100
@@ -59,7 +59,7 @@
/*
* Globals
*/
-static int loglevel = LOGLEVEL_DFLT;
+int loglevel = LOGLEVEL_DFLT;
static int syslog_facility = LOG_LOCAL4; /* override in cludb */
static char *daemon_name=NULL;
static pid_t daemon_pid=-1;
diff -urN ../tmp-orig/kimberlite-1.1.0/src/clulib/parseconf.c ./src/clulib/parseconf.c
--- ../tmp-orig/kimberlite-1.1.0/src/clulib/parseconf.c 2001-03-29 07:22:28.000000000 +0200
+++ ./src/clulib/parseconf.c 2004-12-09 08:20:32.000000000 +0100
@@ -561,7 +561,7 @@
static ulong get_checksum(void) {
ulong checksum = 0L;
if (initAlignedBufStuff() < 0) {
- fprintf(stderr, __FUNCTION__ ": Unable to init rawio support.\n");
+ fprintf(stderr, "%1: Unable to init rawio support.\n", __func__);
return(-1);
}
@@ -1195,7 +1195,7 @@
ssize_t written;
char timestamp_buffer[BUFFER_SIZE];
if (initAlignedBufStuff() < 0) {
- fprintf(stderr, __FUNCTION__ ": Unable to init rawio support.\n");
+ fprintf(stderr, "%1: Unable to init rawio support.\n", __func__);
return(-1);
}
@@ -1263,7 +1263,7 @@
CFG_status result=CFG_OK;
if (initAlignedBufStuff() < 0) {
- fprintf(stderr, __FUNCTION__ ": Unable to init rawio support.\n");
+ fprintf(stderr, "%1: Unable to init rawio support.\n", __func__);
return(-1);
}
diff -urN ../tmp-orig/kimberlite-1.1.0/src/utils/clu_config.c ./src/utils/clu_config.c
--- ../tmp-orig/kimberlite-1.1.0/src/utils/clu_config.c 2001-03-29 07:22:28.000000000 +0200
+++ ./src/utils/clu_config.c 2004-12-09 08:20:32.000000000 +0100
@@ -165,8 +165,7 @@
ssize_t res;
if (initAlignedBufStuff() < 0) {
- fprintf(stderr, __FUNCTION__
- ": Unable to init rawio support.\n");
+ fprintf(stderr, "%1: Unable to init rawio support.\n", __func__);
return(CFG_FAILED);
}
length = BUFFER_SIZE;
diff -urN ../tmp-orig/kimberlite-1.1.0/src/utils/invalidatebuffers.c ./src/utils/invalidatebuffers.c
--- ../tmp-orig/kimberlite-1.1.0/src/utils/invalidatebuffers.c 2004-12-09 08:37:08.733980832 +0100
+++ ./src/utils/invalidatebuffers.c 2004-12-09 08:20:32.000000000 +0100
@@ -46,16 +46,12 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <stdlib.h>
+#include <errno.h>
/*
* Cluster includes
*/
#include <logger.h>
-/*
- * External declarations
- */
-extern int errno;
-
/***************************************************************************
*
* Functions
diff -urN ../tmp-orig/kimberlite-1.1.0/src/cluadmin/Makefile.am ./src/cluadmin/Makefile.am
--- ../tmp-orig/kimberlite-1.1.0/src/cluadmin/Makefile.am 2001-03-29 07:22:28.000000000 +0200
+++ ./src/cluadmin/Makefile.am 2004-12-09 08:20:32.000000000 +0100
@@ -89,7 +89,7 @@
gcc ${CFLAGS} -c -I@top_srcdir@/include cluster_wrap.c
cluster_wrap.c: cluster.i
- swig -make_default -Sskip 0 -tcl8 -dascii -module Cluster -namespace cluster.i
+ swig -make_default -tcl8 -dascii -module Cluster -namespace cluster.i
getline.o: getline.c
gcc ${CFLAGS} -c getline.c
--- End Message ---
--- Begin Message ---
Source: kimberlite
Source-Version: 1.1.0-3.3
Now that kimberlite is orphaned, bugs fixed in non-maintainer uploads
can be closed. The original .changes file follows.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Sat, 10 Sep 2005 12:33:22 +0000
Source: kimberlite
Binary: kimberlite-doc kimberlite
Architecture: source i386 all
Version: 1.1.0-3.3
Distribution: unstable
Urgency: low
Maintainer: Josh Huber <huber@debian.org>
Changed-By: Hamish Moffatt <hamish@debian.org>
Description:
kimberlite - High Availability Clustering Package
kimberlite-doc - Documentation for kimberlite
Closes: 241959 262119 280247 284865
Changes:
kimberlite (1.1.0-3.3) unstable; urgency=low
.
* BSP NMU
* Fix various FTBFS errors:
* swig 1.3 changed command-line parameters (src/cluadmin/Makefile.am)
(closes: #241959)
* Parse errors due to use of __FUNCTION__ (src/clulib/parseconf.c,
src/utils/clu_config.c) (closes: #262119)
* Use <errno.h> (src/utils/invalidatebuffers.c) (closes: #280247)
* Conflicting declarations of variables (src/clulib/liblogger.c)
(closes: #284865).
* Thanks to Andreas Jochens for these patches
Files:
a01849f1026e32c2c8626e0235077337 750 utils optional kimberlite_1.1.0-3.3.dsc
6e0aad93798e9c20edcc8097f13dc08e 46030 utils optional kimberlite_1.1.0-3.3.diff.gz
2464e06702380de87e1a71120785418e 972900 utils optional kimberlite-doc_1.1.0-3.3_all.deb
df97f27db4aaab0e7fb5a30ad4af7ff9 820502 utils optional kimberlite_1.1.0-3.3_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iQCVAwUBQyLb09iYIdPvprnVAQIkiAP+OgMeuty1NzjjN+Gahs4fRi6fvQkIZ/b5
Ix3tvv5vZp7i+BSdrsFSnbgh2scSQ8umyIHU+Ai98Zy2tOS57AzVhIYQ8wPaHgvk
Yw9Rek8ezzOue/1rlIxSvwAQlquuncC+4oBNcx/cMP7z5awJEXG6b2VQt6Cp1KhY
yoqHZ527OcM=
=Hu9d
-----END PGP SIGNATURE-----
--- End Message ---