PDA

View Full Version : make install error


jamkad
09-12-2005, 08:22
configure goes without problems, but when doing make install i get following error.

Making install in zbxdbhigh
make[3]: Entering directory `/root/zabbix-1.1beta3/src/libs/zbxdbhigh'
make[4]: Entering directory `/root/zabbix-1.1beta3/src/libs/zbxdbhigh'
if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -I../../../include -I/usr/include/mysql -g -O2 -MT action.o -MD -MP -MF ".deps/action.Tpo" -c -o action.o action.c; \
then mv -f ".deps/action.Tpo" ".deps/action.Po"; else rm -f ".deps/action.Tpo"; exit 1; fi
In file included from /usr/include/mysql/mysql.h:62,
from ../../../include/db.h:31,
from action.c:27:
/usr/include/mysql/my_list.h:27: error: two or more data types in declaration specifiers
/usr/include/mysql/my_list.h:27: warning: useless storage class specifier in empty declaration
make[4]: *** [action.o] Error 1
make[4]: Leaving directory `/root/zabbix-1.1beta3/src/libs/zbxdbhigh'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/root/zabbix-1.1beta3/src/libs/zbxdbhigh'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/root/zabbix-1.1beta3/src/libs'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/root/zabbix-1.1beta3/src'
make: *** [install-recursive] Error 1

using fedora core 4, php 5 and mysql 4.1
any ideas?

Alexei
09-12-2005, 09:38
Please could you post first 50 lines of /usr/include/mysql/my_list.h

raa
09-12-2005, 10:32
Please could you post first 50 lines of /usr/include/mysql/my_list.h
As i got the same errors: my version of my_list.h, line 27 with error ist marked.

17 #ifndef _list_h_
18 #define _list_h_
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 typedef struct st_list {
25 struct st_list *prev,*next;
26 void *data;
27 } LIST; <<<<----------- warning: useless keyword or type name in empty declaration, error: two types specified in one empty declaration
28
29 typedef int (*list_walk_action)(void *,void *);
30
31 extern LIST *list_add(LIST *root,LIST *element);
32 extern LIST *list_delete(LIST *root,LIST *element);
33 extern LIST *list_cons(void *data,LIST *root);
34 extern LIST *list_reverse(LIST *root);
35 extern void list_free(LIST *root,unsigned int free_data);
36 extern unsigned int list_length(LIST *);
37 extern int list_walk(LIST *,list_walk_action action,gptr argument);
38
39 #define rest(a) ((a)->next)
40 #define list_push(a,b) (a)=list_cons((b),(a))
41 #define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
42
43 #ifdef __cplusplus
44 }
45 #endif
46 #endif



andi

jamkad
09-12-2005, 10:38
first line in 17:

#ifndef _list_h_
#define _list_h_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct st_list {
struct st_list *prev,*next;
void *data;
} LIST;

typedef int (*list_walk_action)(void *,void *);

extern LIST *list_add(LIST *root,LIST *element);
extern LIST *list_delete(LIST *root,LIST *element);
extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,unsigned int free_data);
extern unsigned int list_length(LIST *);
extern int list_walk(LIST *,list_walk_action action,gptr argument);

#define list_rest(a) ((a)->next)
#define list_push(a,b) (a)=list_cons((b),(a))
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }

#ifdef __cplusplus
}
#endif
#endif

Alexei
09-12-2005, 10:56
Rename LIST to ZBX_LIST in common.h and in some other ZABBIX sources.
This will fix compilation problem.

Thanks for reporting this.

pdwalker
09-12-2005, 11:47
That did it.

I only needed to edit a few entries in:
./src/libs/zbxsysinfo/common/common.c
./include/common.h

jamkad
09-12-2005, 11:56
thanks for the fast reply.

Is there more information what are those "other ZABBIX sources" that i must modify?

I tryed modify common.h and replace those LIST with ZBX_LIST but i get new errors when doing make. I must be doing something wrong...

common/common.c:186: error: syntax error before â*â token
common/common.c: In function âfree_listâ:
common/common.c:187: error: number of arguments doesnât match prototype
../../../include/common.h:325: error: prototype declaration
common/common.c: At top level:
common/common.c:191: error: syntax error before â*â token
common/common.c: In function âcopy_listâ:
common/common.c:192: error: number of arguments doesnât match prototype
../../../include/common.h:324: error: prototype declaration

This is most likely going to be fixed in next beta, but is there change to download fixed files from cvs and use those?

jamkad
09-12-2005, 11:58
forget that last post, it is working now :)
thanks pdwalker

pdwalker
09-12-2005, 12:44
heh,

I know. I missed those ones as well.

KarmaPolice
09-12-2005, 20:47
I just had this problem as well... the fix above worked... i'd recommend fixing the source asap

Alexei
09-12-2005, 21:33
I just had this problem as well... the fix above worked... i'd recommend fixing the source asap
It is already fixed.

new2zabbix
23-06-2008, 21:49
Alexi,

I have this same problem now.

Mac OS X 10.4 (Tiger)
MySQL 5.0.51b
Zabbix 1.1.7

I have checked the above files and they are correct as far as having the ZBX_LIST in them.

Is there some other place I am missing ??????