--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: kimberlite: FTBFS (amd64/gcc-3.4): Please use '#include <errno.h>' instead of 'extern int errno;'
- From: Andreas Jochens <aj@andaco.de>
- Date: Mon, 08 Nov 2004 13:12:40 +0100
- Message-id: <E1CR8O0-0002fl-Q4@localhost.localdomain>
Package: kimberlite
Severity: normal
Tags: patch
When building 'kimberlite' with gcc-3.4 on amd64 I get the following error:
gcc -DNDEBUG -DUSE_MALLOC -g -O2 -W -Wall -Wstrict-prototypes -Wshadow -DCLU_CONFIG_FILE=\"/etc/kimberlite/cluster.conf\" -o invalidatebuffers invalidatebuffers.o -L../../src/clulib -lcluster
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/bin/ld: BFD 2.15 assertion fail ../../bfd/elflink.c:6081
make[3]: *** [invalidatebuffers] Error 1
make[3]: Leaving directory `/kimberlite-1.1.0/src/utils'
This is due to the use of 'extern int errno;' instead of the correct
'#include <errno.h>' in 'src/utils/invalidatebuffers.c'.
With the attached patch, 'kimberlite' can be compiled using gcc-3.4 on amd64.
The patch also includes fixes for #262119 and for the RC bug #241959
(by removing '-Sskip 0' from the swig options in 'src/cluadmin/Makefile.am').
Regards
Andreas Jochens
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 05:22:28.000000000 +0000
+++ ./src/cluadmin/Makefile.am 2004-11-07 21:33:03.077391768 +0000
@@ -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
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 05:22:28.000000000 +0000
+++ ./src/clulib/parseconf.c 2004-11-07 21:30:59.944110872 +0000
@@ -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 05:22:28.000000000 +0000
+++ ./src/utils/clu_config.c 2004-11-07 21:32:26.740915752 +0000
@@ -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-11-07 21:33:28.072591920 +0000
+++ ./src/utils/invalidatebuffers.c 2004-11-07 21:27:12.526683576 +0000
@@ -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
--- 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 ---