[Freeswitch-users] freeswitch rpm build

I put the Who? in Mishehu mishehu at freeswitch.org
Sun Aug 24 09:17:11 MSD 2014


You appear to be lacking the necessary postgres-devel package on your 
system.  If you don't intend to use that module, you can disable using 
it.  I think it was this past Wednesday or the week prior that Ken Rice 
gave a discussion on our weekly developers' conference call about the 
build system and how to do exactly this.  I don't know offhand where the 
archives are of these recordings, but if you can find them, they are 
worthwhile to listen to.

-- 
Yossi Neiman

On 08/22/2014 11:30 PM, Mujahid Ali wrote:

> i'm building freeswitch rpm from spec file
>
> i download freeswitch-1.4.7.tar.bz2 
> <http://files.freeswitch.org/freeswitch-1.4.7.tar.bz2> from 
> http://files.freeswitch.org/
>
> but during rpm building there is alot of errors like
>
> making all mod_cdr_pg_csv
> make[4]: Entering directory 
> `/root/rpmbuild/BUILD/freeswitch-1.4.7/src/mod/event_handlers/mod_cdr_pg_csv'
>   CC     mod_cdr_pg_csv_la-mod_cdr_pg_csv.lo
> mod_cdr_pg_csv.c:40:33: error: postgresql/libpq-fe.h: No such file or 
> directory
> mod_cdr_pg_csv.c:83: error: expected specifier-qualifier-list before 
> 'PGconn'
> mod_cdr_pg_csv.c: In function 'config_validate_spool_dir':
> mod_cdr_pg_csv.c:110: error: 'struct <anonymous>' has no member named 
> 'spool_dir'
> mod_cdr_pg_csv.c: At top level:
> mod_cdr_pg_csv.c:121: error: 'struct <anonymous>' has no member named 
> 'legs'
> mod_cdr_pg_csv.c:122: error: 'struct <anonymous>' has no member named 
> 'spool_format'
> mod_cdr_pg_csv.c:123: error: 'struct <anonymous>' has no member named 
> 'rotate'
> mod_cdr_pg_csv.c:124: error: 'struct <anonymous>' has no member named 
> 'debug'
> mod_cdr_pg_csv.c:127: error: 'struct <anonymous>' has no member named 
> 'spool_dir'
> mod_cdr_pg_csv.c: In function 'do_rotate':
> mod_cdr_pg_csv.c:167: error: 'struct <anonymous>' has no member named 
> 'rotate'
> mod_cdr_pg_csv.c:187: error: 'struct <anonymous>' has no member named 
> 'rotate'
> mod_cdr_pg_csv.c: In function 'insert_cdr':
> mod_cdr_pg_csv.c:250: error: 'PGresult' undeclared (first use in this 
> function)
> mod_cdr_pg_csv.c:250: error: (Each undeclared identifier is reported 
> only once
> mod_cdr_pg_csv.c:250: error: for each function it appears in.)
> mod_cdr_pg_csv.c:250: error: 'res' undeclared (first use in this function)
> 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
> mod_cdr_pg_csv.c:250: error: statement with no effect
> mod_cdr_pg_csv.c:255: error: 'struct <anonymous>' has no member named 
> 'debug'
> mod_cdr_pg_csv.c:259: error: 'struct <anonymous>' has no member named 
> 'db_mutex'
> mod_cdr_pg_csv.c:259: error: passing argument 1 of 'switch_mutex_lock' 
> from incompatible pointer type
> ../../../../src/include/switch_apr.h:351: note: expected 'struct 
> switch_mutex_t *' but argument is of type 'struct 
> switch_xml_config_item_t *'
> mod_cdr_pg_csv.c:261: error: 'struct <anonymous>' has no member named 
> 'db_online'
> mod_cdr_pg_csv.c:261: error: implicit declaration of function 'PQstatus'
> mod_cdr_pg_csv.c:261: error: 'struct <anonymous>' has no member named 
> 'db_connection'
> mod_cdr_pg_csv.c:261: error: 'CONNECTION_OK' undeclared (first use in 
> this function)
> mod_cdr_pg_csv.c:261: error: comparison between pointer and integer
> mod_cdr_pg_csv.c:262: error: 'struct <anonymous>' has no member named 
> 'db_connection'
> mod_cdr_pg_csv.c:262: error: implicit declaration of function 
> 'PQconnectdb'
> mod_cdr_pg_csv.c:262: error: statement with no effect
> mod_cdr_pg_csv.c:265: error: 'struct <anonymous>' has no member named 
> 'db_connection'
> mod_cdr_pg_csv.c:265: error: comparison between pointer and integer
> mod_cdr_pg_csv.c:266: error: 'struct <anonymous>' has no member named 
> 'db_online'
> mod_cdr_pg_csv.c:266: error: statement with no effect
> mod_cdr_pg_csv.c:268: error: implicit declaration of function 
> 'PQerrorMessage'
> mod_cdr_pg_csv.c:268: error: 'struct <anonymous>' has no member named 
> 'db_connection'
> mod_cdr_pg_csv.c:268: error: format '%s' expects type 'char *', but 
> argument 8 has type 'int'
> mod_cdr_pg_csv.c:272: error: implicit declaration of function 'PQexec'
> mod_cdr_pg_csv.c:272: error: 'struct <anonymous>' has no member named 
> 'db_connection'
> mod_cdr_pg_csv.c:272: error: statement with no effect
> mod_cdr_pg_csv.c:273: error: implicit declaration of function 
> 'PQresultStatus'
> mod_cdr_pg_csv.c:273: error: 'PGRES_COMMAND_OK' undeclared (first use 
> in this function)
> mod_cdr_pg_csv.c:273: error: comparison between pointer and integer
> mod_cdr_pg_csv.c:274: error: implicit declaration of function 
> 'PQresultErrorMessage'
> mod_cdr_pg_csv.c:274: error: format '%s' expects type 'char *', but 
> argument 8 has type 'int'
> mod_cdr_pg_csv.c:275: error: implicit declaration of function 'PQclear'
> mod_cdr_pg_csv.c:282: error: 'struct <anonymous>' has no member named 
> 'db_mutex'
> mod_cdr_pg_csv.c:282: error: passing argument 1 of 
> 'switch_mutex_unlock' from incompatible pointer type
> ../../../../src/include/switch_apr.h:357: note: expected 'struct 
> switch_mutex_t *' but argument is of type 'struct 
> switch_xml_config_item_t *'
> mod_cdr_pg_csv.c:289: error: implicit declaration of function 'PQfinish'
> mod_cdr_pg_csv.c:289: error: 'struct <anonymous>' has no member named 
> 'db_connection'
> mod_cdr_pg_csv.c:290: error: 'struct <anonymous>' has no member named 
> 'db_online'
> mod_cdr_pg_csv.c:290: error: statement with no effect
> mod_cdr_pg_csv.c:291: error: 'struct <anonymous>' has no member named 
> 'db_mutex'
> mod_cdr_pg_csv.c:291: error: passing argument 1 of 
> 'switch_mutex_unlock' from incompatible pointer type
> ../../../../src/include/switch_apr.h:357: note: expected 'struct 
> switch_mutex_t *' but argument is of type 'struct 
> switch_xml_config_item_t *'
> mod_cdr_pg_csv.c:294: error: 'struct <anonymous>' has no member named 
> 'spool_format'
> mod_cdr_pg_csv.c:294: error: comparison between pointer and integer
> mod_cdr_pg_csv.c:295: error: 'struct <anonymous>' has no member named 
> 'spool_dir'
> mod_cdr_pg_csv.c:299: error: 'struct <anonymous>' has no member named 
> 'spool_dir'
> mod_cdr_pg_csv.c: In function 'my_on_reporting':
> mod_cdr_pg_csv.c:323: error: 'struct <anonymous>' has no member named 
> 'legs'
> mod_cdr_pg_csv.c:323: error: invalid operands to binary & (have 
> 'struct switch_xml_config_item_t *' and 'int')
> mod_cdr_pg_csv.c:323: error: 'struct <anonymous>' has no member named 
> 'legs'
> mod_cdr_pg_csv.c:323: error: invalid operands to binary & (have 
> 'struct switch_xml_config_item_t *' and 'int')
> mod_cdr_pg_csv.c:324: error: 'struct <anonymous>' has no member named 
> 'legs'
> mod_cdr_pg_csv.c:324: error: invalid operands to binary & (have 
> 'struct switch_xml_config_item_t *' and 'int')
> mod_cdr_pg_csv.c:335: error: 'struct <anonymous>' has no member named 
> 'spool_dir'
> mod_cdr_pg_csv.c:335: error: passing argument 1 of 
> 'switch_dir_make_recursive' from incompatible pointer type
> ../../../../src/include/switch_apr.h:898: note: expected 'const char 
> *' but argument is of type 'struct switch_xml_config_item_t *'
> mod_cdr_pg_csv.c:336: error: 'struct <anonymous>' has no member named 
> 'spool_dir'
> mod_cdr_pg_csv.c:336: error: format '%s' expects type 'char *', but 
> argument 8 has type 'struct switch_xml_config_item_t *'
> mod_cdr_pg_csv.c:340: error: 'struct <anonymous>' has no member named 
> 'debug'
> mod_cdr_pg_csv.c:361: error: implicit declaration of function 
> 'PQescapeString'
> mod_cdr_pg_csv.c: In function 'event_handler':
> mod_cdr_pg_csv.c:411: error: 'struct <anonymous>' has no member named 
> 'db_online'
> mod_cdr_pg_csv.c:412: error: 'struct <anonymous>' has no member named 
> 'db_connection'
> mod_cdr_pg_csv.c:413: error: 'struct <anonymous>' has no member named 
> 'db_online'
> mod_cdr_pg_csv.c:413: error: statement with no effect
> mod_cdr_pg_csv.c: In function 'load_config':
> mod_cdr_pg_csv.c:444: error: 'struct <anonymous>' has no member named 
> 'db_online'
> mod_cdr_pg_csv.c:445: error: 'struct <anonymous>' has no member named 
> 'db_connection'
> mod_cdr_pg_csv.c:446: error: 'struct <anonymous>' has no member named 
> 'db_mutex'
> mod_cdr_pg_csv.c:446: error: passing argument 1 of 
> 'switch_mutex_destroy' from incompatible pointer type
> ../../../../src/include/switch_apr.h:344: note: expected 'struct 
> switch_mutex_t *' but argument is of type 'struct 
> switch_xml_config_item_t *'
> mod_cdr_pg_csv.c:447: error: 'struct <anonymous>' has no member named 
> 'db_online'
> mod_cdr_pg_csv.c:447: error: statement with no effect
> mod_cdr_pg_csv.c:452: error: 'struct <anonymous>' has no member named 
> 'db_mutex'
> mod_cdr_pg_csv.c:452: error: passing argument 1 of 'switch_mutex_init' 
> from incompatible pointer type
> ../../../../src/include/switch_apr.h:337: note: expected 'struct 
> switch_mutex_t **' but argument is of type 'struct 
> switch_xml_config_item_t (*)[1]'
> mod_cdr_pg_csv.c: In function 'mod_cdr_pg_csv_load':
> mod_cdr_pg_csv.c:528: error: 'struct <anonymous>' has no member named 
> 'spool_dir'
> mod_cdr_pg_csv.c:528: error: passing argument 1 of 
> 'switch_dir_make_recursive' from incompatible pointer type
> ../../../../src/include/switch_apr.h:898: note: expected 'const char 
> *' but argument is of type 'struct switch_xml_config_item_t *'
> mod_cdr_pg_csv.c:529: error: 'struct <anonymous>' has no member named 
> 'spool_dir'
> mod_cdr_pg_csv.c:529: error: format '%s' expects type 'char *', but 
> argument 8 has type 'struct switch_xml_config_item_t *'
> mod_cdr_pg_csv.c: In function 'mod_cdr_pg_csv_shutdown':
> mod_cdr_pg_csv.c:550: error: 'struct <anonymous>' has no member named 
> 'db_online'
> mod_cdr_pg_csv.c:551: error: 'struct <anonymous>' has no member named 
> 'db_connection'
> mod_cdr_pg_csv.c:552: error: 'struct <anonymous>' has no member named 
> 'db_online'
> mod_cdr_pg_csv.c:552: error: statement with no effect
> make[4]: *** [mod_cdr_pg_csv_la-mod_cdr_pg_csv.lo] Error 1
> make[4]: Leaving directory 
> `/root/rpmbuild/BUILD/freeswitch-1.4.7/src/mod/event_handlers/mod_cdr_pg_csv'
> make[3]: *** [mod_cdr_pg_csv-all] Error 1
> make[3]: Leaving directory `/root/rpmbuild/BUILD/freeswitch-1.4.7/src/mod'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/root/rpmbuild/BUILD/freeswitch-1.4.7/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/root/rpmbuild/BUILD/freeswitch-1.4.7'
> make: *** [all] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.76GyR0 (%build)
>
>
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.76GyR0 (%build)
>
> how can i solve it
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> 
> 
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140824/b2959b76/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list