Package: bow
Severity: normal
Tags: patch
There is another problem with the latest version of gcc-4.0.
When building 'bow' on amd64 with gcc-4.0,
I now get the following error:
gcc -c -Ibow -I. -I./argp -DHAVE_LIBNSL=1 -DHAVE_STRERROR=1
-DHAVE_GETTIMEOFDAY=1 -DHAVE_RANDOM=1 -DHAVE_SRANDOM=1 -DHAVE_SETENV=1
-DHAVE_STRCHR=1 -DHAVE_STRRCHR=1 -DHAVE_ALLOCA_H=1 -g -O -Wall -Wimplicit -o
array.o array.c
In file included from array.c:22:
./bow/libbow.h:1631: warning: type qualifiers ignored on function return type
./bow/libbow.h:2128: error: array type has incomplete element type
make[1]: *** [array.o] Error 1
make[1]: Leaving directory `/bow-20020213'
make: *** [build] Error 2
With the attached patch 'bow' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/bow-20020213/bow/libbow.h ./bow/libbow.h
--- ../tmp-orig/bow-20020213/bow/libbow.h 2002-02-14 00:00:29.000000000
+0100
+++ ./bow/libbow.h 2005-03-18 10:02:20.546240909 +0100
@@ -1343,7 +1343,7 @@
#include <bow/kl.h>
#include <bow/em.h>
#include <bow/knn.h>
-struct argp_child; /* forward declare this type */
+#include "argp.h"
/* Associate method M with the string NAME, so the method structure
can be retrieved later with BOW_METHOD_AT_NAME(). Set the group
diff -urN ../tmp-orig/bow-20020213/argp/argp-fs-xinl.c ./argp/argp-fs-xinl.c
--- ../tmp-orig/bow-20020213/argp/argp-fs-xinl.c 1997-03-14
16:12:42.000000000 +0100
+++ ./argp/argp-fs-xinl.c 2005-03-18 09:57:31.594093978 +0100
@@ -23,8 +23,6 @@
#endif
#define ARGP_FS_EI
-#undef __OPTIMIZE__
-#define __OPTIMIZE__
#include "argp-fmtstream.h"
/* Add weak aliases. */
diff -urN ../tmp-orig/bow-20020213/argp/argp-xinl.c ./argp/argp-xinl.c
--- ../tmp-orig/bow-20020213/argp/argp-xinl.c 1997-03-14 16:12:44.000000000
+0100
+++ ./argp/argp-xinl.c 2005-03-18 09:58:21.626423228 +0100
@@ -23,8 +23,6 @@
#endif
#define ARGP_EI
-#undef __OPTIMIZE__
-#define __OPTIMIZE__
#include "argp.h"
/* Add weak aliases. */
diff -urN ../tmp-orig/bow-20020213/dv.c ./dv.c
--- ../tmp-orig/bow-20020213/dv.c 1999-03-17 22:08:53.000000000 +0100
+++ ./dv.c 2005-03-18 09:55:16.845139074 +0100
@@ -52,7 +52,7 @@
{
int dv_index; /* The "document vector" index at
which we are looking for. */
- static inline void grow_if_necessary ()
+ inline void grow_if_necessary ()
{
if (error_on_creation)
bow_error ("Shouldn't be creating new entry for a weight.");
@@ -67,7 +67,7 @@
+ sizeof (bow_de) * (*dv)->size));
}
}
- static inline void initialize_dv_index (int dvi)
+ inline void initialize_dv_index (int dvi)
{
(*dv)->entry[dvi].di = di;
(*dv)->entry[dvi].count = 0;
diff -urN ../tmp-orig/bow-20020213/multiclass.c ./multiclass.c
--- ../tmp-orig/bow-20020213/multiclass.c 1999-10-15 22:17:42.000000000
+0200
+++ ./multiclass.c 2005-03-18 09:55:16.846138881 +0100
@@ -1050,7 +1050,7 @@
void
bow_sort_scores (bow_score *scores, int count)
{
- static int score_compare (const void *x, const void *y)
+ int score_compare (const void *x, const void *y)
{
if (((bow_score *)x)->weight > ((bow_score *)y)->weight)
return -1;
@@ -1256,6 +1256,7 @@
}
return si;
next_si:
+ continue;
}
return -1;
}
@@ -1340,6 +1341,7 @@
max_ci = ci;
}
next_class1:
+ continue;
}
if (local_exclude_cis_size + 1 < exclude_cis_capacity/2
@@ -1421,8 +1423,10 @@
max_ci2 = ci2;
}
next_class22:
+ continue;
}
next_class2:
+ continue;
}
assert (max_si >= 0);
diff -urN ../tmp-orig/bow-20020213/svm_base.c ./svm_base.c
--- ../tmp-orig/bow-20020213/svm_base.c 2002-02-13 23:49:41.000000000 +0100
+++ ./svm_base.c 2005-03-18 09:55:16.847138688 +0100
@@ -261,7 +261,6 @@
case 4:
kernel = svm_kernel_fisher;
break;
- default:
}
break;
case AL_TEST_IN_TRAIN_ARG:
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]