[Freeswitch-users] FS compilation errored out at building mod_cdr_pg_csv

Zenny garbytrash at gmail.com
Tue Mar 20 15:35:50 MSK 2012


Hi:

I tried to build FS from git and it halts with the following error.
Could not figure out what could be wrong? Thanks in advance for any
hints or imputs to overcome!

[QUOTE]
....
making all mod_cdr_pg_csv
Compiling /usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c...
quiet_libtool: compile:  gcc -I/usr/include/postgresql
-I/usr/src/freeswitch/libs/curl/include
-I/usr/src/freeswitch/src/include -I/usr/src/freeswitch/src/include
-I/usr/src/freeswitch/libs/libteletone/src -fPIC -Werror
-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g
-ggdb -DHAVE_OPENSSL -g -O2 -Wall -std=c99 -pedantic
-Wdeclaration-after-statement -D_GNU_SOURCE -DHAVE_CONFIG_H -c
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c
 -fPIC -DPIC -o .libs/mod_cdr_pg_csv.o
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:40:22:
error: libpq-fe.h: No such file or directory
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:83:
error: expected specifier-qualifier-list before ‘PGconn’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:
In function ‘config_validate_spool_dir’:
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:110:
error: ‘struct <anonymous>’ has no member named ‘spool_dir’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:
At top level:
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:121:
error: ‘struct <anonymous>’ has no member named ‘legs’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:122:
error: ‘struct <anonymous>’ has no member named ‘spool_format’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:123:
error: ‘struct <anonymous>’ has no member named ‘rotate’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:124:
error: ‘struct <anonymous>’ has no member named ‘debug’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:127:
error: ‘struct <anonymous>’ has no member named ‘spool_dir’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:
In function ‘do_rotate’:
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:167:
error: ‘struct <anonymous>’ has no member named ‘rotate’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:187:
error: ‘struct <anonymous>’ has no member named ‘rotate’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:
In function ‘insert_cdr’:
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:250:
error: ‘PGresult’ undeclared (first use in this function)
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:250:
error: (Each undeclared identifier is reported only once
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:250:
error: for each function it appears in.)
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:250:
error: ‘res’ undeclared (first use in this function)
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:250:
error: invalid operands to binary * (have ‘struct
switch_xml_config_item_t *’ and ‘struct switch_xml_config_item_t *’)
cc1: warnings being treated as errors
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:250:
error: statement with no effect
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:255:
error: ‘struct <anonymous>’ has no member named ‘debug’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:259:
error: ‘struct <anonymous>’ has no member named ‘db_mutex’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:259:
error: passing argument 1 of ‘switch_mutex_lock’ from incompatible
pointer type
/usr/src/freeswitch/src/include/switch_apr.h:400: note: expected
‘struct switch_mutex_t *’ but argument is of type ‘struct
switch_xml_config_item_t *’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:261:
error: ‘struct <anonymous>’ has no member named ‘db_online’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:261:
error: implicit declaration of function ‘PQstatus’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:261:
error: ‘struct <anonymous>’ has no member named ‘db_connection’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:261:
error: ‘CONNECTION_OK’ undeclared (first use in this function)
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:261:
error: comparison between pointer and integer
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:262:
error: ‘struct <anonymous>’ has no member named ‘db_connection’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:262:
error: implicit declaration of function ‘PQconnectdb’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:262:
error: statement with no effect
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:265:
error: ‘struct <anonymous>’ has no member named ‘db_connection’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:265:
error: comparison between pointer and integer
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:266:
error: ‘struct <anonymous>’ has no member named ‘db_online’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:266:
error: statement with no effect
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:268:
error: implicit declaration of function ‘PQerrorMessage’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:268:
error: ‘struct <anonymous>’ has no member named ‘db_connection’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:268:
error: format ‘%s’ expects type ‘char *’, but argument 8 has type
‘int’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:272:
error: implicit declaration of function ‘PQexec’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:272:
error: ‘struct <anonymous>’ has no member named ‘db_connection’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:272:
error: statement with no effect
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:273:
error: implicit declaration of function ‘PQresultStatus’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:273:
error: ‘PGRES_COMMAND_OK’ undeclared (first use in this function)
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:273:
error: comparison between pointer and integer
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:274:
error: implicit declaration of function ‘PQresultErrorMessage’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:274:
error: format ‘%s’ expects type ‘char *’, but argument 8 has type
‘int’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:275:
error: implicit declaration of function ‘PQclear’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:282:
error: ‘struct <anonymous>’ has no member named ‘db_mutex’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:282:
error: passing argument 1 of ‘switch_mutex_unlock’ from incompatible
pointer type
/usr/src/freeswitch/src/include/switch_apr.h:406: note: expected
‘struct switch_mutex_t *’ but argument is of type ‘struct
switch_xml_config_item_t *’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:289:
error: implicit declaration of function ‘PQfinish’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:289:
error: ‘struct <anonymous>’ has no member named ‘db_connection’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:290:
error: ‘struct <anonymous>’ has no member named ‘db_online’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:290:
error: statement with no effect
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:291:
error: ‘struct <anonymous>’ has no member named ‘db_mutex’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:291:
error: passing argument 1 of ‘switch_mutex_unlock’ from incompatible
pointer type
/usr/src/freeswitch/src/include/switch_apr.h:406: note: expected
‘struct switch_mutex_t *’ but argument is of type ‘struct
switch_xml_config_item_t *’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:294:
error: ‘struct <anonymous>’ has no member named ‘spool_format’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:294:
error: comparison between pointer and integer
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:295:
error: ‘struct <anonymous>’ has no member named ‘spool_dir’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:299:
error: ‘struct <anonymous>’ has no member named ‘spool_dir’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:
In function ‘my_on_reporting’:
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:323:
error: ‘struct <anonymous>’ has no member named ‘legs’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:323:
error: invalid operands to binary & (have ‘struct
switch_xml_config_item_t *’ and ‘int’)
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:323:
error: ‘struct <anonymous>’ has no member named ‘legs’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:323:
error: invalid operands to binary & (have ‘struct
switch_xml_config_item_t *’ and ‘int’)
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:324:
error: ‘struct <anonymous>’ has no member named ‘legs’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:324:
error: invalid operands to binary & (have ‘struct
switch_xml_config_item_t *’ and ‘int’)
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:335:
error: ‘struct <anonymous>’ has no member named ‘spool_dir’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:335:
error: passing argument 1 of ‘switch_dir_make_recursive’ from
incompatible pointer type
/usr/src/freeswitch/src/include/switch_apr.h:947: note: expected
‘const char *’ but argument is of type ‘struct
switch_xml_config_item_t *’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:336:
error: ‘struct <anonymous>’ has no member named ‘spool_dir’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:336:
error: format ‘%s’ expects type ‘char *’, but argument 8 has type
‘struct switch_xml_config_item_t *’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:340:
error: ‘struct <anonymous>’ has no member named ‘debug’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:361:
error: implicit declaration of function ‘PQescapeString’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:
In function ‘event_handler’:
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:411:
error: ‘struct <anonymous>’ has no member named ‘db_online’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:412:
error: ‘struct <anonymous>’ has no member named ‘db_connection’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:413:
error: ‘struct <anonymous>’ has no member named ‘db_online’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:413:
error: statement with no effect
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:
In function ‘load_config’:
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:444:
error: ‘struct <anonymous>’ has no member named ‘db_online’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:445:
error: ‘struct <anonymous>’ has no member named ‘db_connection’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:446:
error: ‘struct <anonymous>’ has no member named ‘db_mutex’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:446:
error: passing argument 1 of ‘switch_mutex_destroy’ from incompatible
pointer type
/usr/src/freeswitch/src/include/switch_apr.h:393: note: expected
‘struct switch_mutex_t *’ but argument is of type ‘struct
switch_xml_config_item_t *’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:447:
error: ‘struct <anonymous>’ has no member named ‘db_online’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:447:
error: statement with no effect
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:452:
error: ‘struct <anonymous>’ has no member named ‘db_mutex’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:452:
error: passing argument 1 of ‘switch_mutex_init’ from incompatible
pointer type
/usr/src/freeswitch/src/include/switch_apr.h:386: note: expected
‘struct switch_mutex_t **’ but argument is of type ‘struct
switch_xml_config_item_t (*)[1]’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:
In function ‘mod_cdr_pg_csv_load’:
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:528:
error: ‘struct <anonymous>’ has no member named ‘spool_dir’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:528:
error: passing argument 1 of ‘switch_dir_make_recursive’ from
incompatible pointer type
/usr/src/freeswitch/src/include/switch_apr.h:947: note: expected
‘const char *’ but argument is of type ‘struct
switch_xml_config_item_t *’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:529:
error: ‘struct <anonymous>’ has no member named ‘spool_dir’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:529:
error: format ‘%s’ expects type ‘char *’, but argument 8 has type
‘struct switch_xml_config_item_t *’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:
In function ‘mod_cdr_pg_csv_shutdown’:
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:550:
error: ‘struct <anonymous>’ has no member named ‘db_online’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:551:
error: ‘struct <anonymous>’ has no member named ‘db_connection’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:552:
error: ‘struct <anonymous>’ has no member named ‘db_online’
/usr/src/freeswitch/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c:552:
error: statement with no effect
make[5]: *** [mod_cdr_pg_csv.lo] Error 1
make[4]: *** [all] Error 1
make[3]: *** [mod_cdr_pg_csv-all] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
[/QUOTE]

zenny



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list