[Freeswitch-users] Javascript & cURL: Error loading CURL

Anthony Minessale anthony.minessale at gmail.com
Wed Nov 5 06:06:40 PST 2008


When you did not have curl, FS used it's own.
Now that you added the package, it must be a different version of the api so
now none of it will compile.
You either have to remove that curl package or use the --without-libcurl
config arg to ./configure to use ours.

You were closer before after you had it building.
What you were missing was to tell spidermonkey to load it.
edit  conf/autoload_configs/spidermonkey.conf.xml and add:
<load module="mod_spidermonkey_curl"/>

This is a newer module and has not been added to the examples yet.

On Wed, Nov 5, 2008 at 6:09 AM, Birgit Arkesteijn <birgit at westhawk.co.uk>wrote:

> Hi,
>
> I realised the curl-devel package wasn't installed.
> Now mod_xml_curl won't compile. :-(
>
> I'm running Suse Linux 10.0, x86_64, GNU/Linux.
> I installed the curl-devel package from the original suse DVD.
> I ran 'configure' again, to make sure FreeSWITCH picks up on the change(s).
> I ran 'make current' again and get the following errors:
>
> make[6]: Entering directory
> `/opt/freeswitch/freeswitch-svn/freeswitch/src/mod/xml_int/mod_xml_curl'
> Compiling mod_xml_curl.c...
> mod_xml_curl.c: In function 'do_config':
> mod_xml_curl.c:265: error: syntax error before ';' token
> cc1: warnings being treated as errors
> mod_xml_curl.c:245: warning: unused variable 'hash_node'
> mod_xml_curl.c:239: warning: unused variable 'bname'
> mod_xml_curl.c:280: error: 'url' undeclared (first use in this function)
> mod_xml_curl.c:280: error: (Each undeclared identifier is reported only
> once
> mod_xml_curl.c:280: error: for each function it appears in.)
> mod_xml_curl.c:284: error: continue statement not within a loop
> mod_xml_curl.c:296: error: 'bind_mask' undeclared (first use in this
> function)
> mod_xml_curl.c:300: error: 'bind_cred' undeclared (first use in this
> function)
> mod_xml_curl.c:304: error: 'disable100continue' undeclared (first use in
> this function)
> mod_xml_curl.c:305: error: 'ignore_cacert_check' undeclared (first use
> in this function)
> mod_xml_curl.c:310: error: 'hash_node' undeclared (first use in this
> function)
> mod_xml_curl.c:310: warning: left-hand operand of comma expression has
> no effect
> mod_xml_curl.c:327: error: 'bname' undeclared (first use in this function)
> mod_xml_curl.c: At top level:
> mod_xml_curl.c:333: error: syntax error before ':' token
> mod_xml_curl.c:235: error: label 'done' used but not defined
>
>
> I noticed that FreeSWITCH contains curl code under libs/.
> Did I do the right thing by installing the curl-devel package?
> If so, could someone please help with the errors above? Thanks.
>
>
> BTW, I'm a bit puzzled as to why mod_xml_cdr could be build previously.
> I thought it used curl, but it's not in the dependencies page -
> http://wiki.freeswitch.org/wiki/FreeSwitch_Dependencies, so maybe I'm
> wrong.
>
> Thanks, Birgit
>
>
> On 05/11/08 11:00, Birgit Arkesteijn wrote:
> > Hi,
> >
> > I've spent yesterday afternoon in vain trying to load CURL in
> > javascript, so here I'm again begging for help.
> >
> > The modules doesn't load successfully:
> > [ERR] mod_spidermonkey.c:3303 js_api_use() Error loading CURL
> >
> > We do use mod_xml_curl successfully, btw.
> >
> >
> > Things I tried:
> > - I added to the file "modules.conf" the line:
> >    languages/mod_spidermonkey_curl.
> >    (This line was not in the build/modules.conf.in, btw).
> > - In the same file, I commented out mod_spidermonkey_teletone,
> >    mod_spidermonkey_core_db and mod_spidermonkey_socket, since I don't
> >    think I need them.
> > - I run "make current"
> >
> > I'm running now version 597:10239M
> >
> > Doing a find on /usr/local/freeswitch for 'curl', shows the following:
> > % find . -name \*curl\*
> > ./mod/mod_spidermonkey_curl.so
> > ./mod/mod_xml_curl.so
> > ./conf/autoload_configs/xml_curl.conf.xml
> >
> >
> > The javascript I'm running is copied from the example on page
> > http://wiki.freeswitch.org/wiki/Run
> >
> > Any suggestions?
> >
> > Thanks, Birgit
>
> --
> -- Birgit Arkesteijn, birgit at westhawk.co.uk,
> -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
> -- Company no: 1769350
> -- Registered Office:
> -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
> -- tel.: +44 (0)161 237 0660
> -- <URL: http://www.westhawk.co.uk>
>
> _______________________________________________
> 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
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081105/9036719e/attachment-0002.html 


More information about the FreeSWITCH-users mailing list