[Libwebsockets] error for autogen.sh

Dinesh Guleria din.gulu.er at gmail.com
Sat Apr 6 13:18:03 CEST 2013


Hi,

I made changes as per Andy & Edwin suggestion :--
http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/tree/changelog

Also i removed error due to *libwebsocket_close_and_free_session* by
changing it to return -1 as per change log.
libwebsocket_close_and_free_session    ----> changed to -----> return -1;

But the above changelog does not tell about --- *LWS_CALLBACK_BROADCAST*  i
am getting following error in my code.
I have attached my modified code.

===================== Error i am getting ==================
../../common/controlobject.cpp: In static member function 'static int
CControlObject::callback_dumb_increment(libwebsocket_context*,
libwebsocket*, libwebsocket_callback_reasons, void*, void*, size_t)':
../../common/controlobject.cpp:2247:7: error: 'LWS_CALLBACK_BROADCAST' was
not declared in this scope
../../common/controlobject.cpp: In static member function 'static int
CControlObject::callback_lws_mirror(libwebsocket_context*, libwebsocket*,
libwebsocket_callback_reasons, void*, void*, size_t)':
../../common/controlobject.cpp:2344:7: error: 'LWS_CALLBACK_BROADCAST' was
not declared in this scope
../../common/controlobject.cpp: In static member function 'static int
CControlObject::callback_lws_vscp(libwebsocket_context*, libwebsocket*,
libwebsocket_callback_reasons, void*, void*, size_t)':
../../common/controlobject.cpp:2474:7: error: 'LWS_CALLBACK_BROADCAST' was
not declared in this scope
../../common/controlobject.cpp: In member function 'void
CControlObject::handleWebSocketCommand(libwebsocket_context*,
libwebsocket*, per_session_data__lws_vscp*, const char*)':

=================================================

Please suggest how to get rid of it.

Regards,
//Din


======================================================

On Mon, Apr 1, 2013 at 11:18 AM, Dinesh Guleria <din.gulu.er at gmail.com>wrote:

> Thanks.. I will first go through documentation of libwebsocket.
>
> Regards,
> //Din
>
>
> On Sun, Mar 31, 2013 at 5:30 AM, Andy Green <andy at warmcat.com> wrote:
>
>>
>>
>> On Sun, 31 Mar, 2013 at 1:38 AM, Edwin van den Oetelaar <
>> oetelaar.automatisering at gmail.com> wrote:
>>
>> broadcast support was removed. (2013-01-29) see this patch
>> http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/test-server/test-server.c?id=6f520a5195defcb7fc69c669218a8131a5f35efbcheck out the later version on how to solve the broadcast to all connected
>> clients.
>>
>>
>> Right... you should review the changelog to understand what has happened
>> between versions.
>>
>> http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/tree/changelog
>>
>> In there it mentions
>>
>> ''user api removals
>> -----------------
>>
>>  - libwebsockets_broadcast() - use
>> libwebsocket_callback_on_writable[_all_protocol]()
>>  instead from same process context as the service loop. See the test apps
>>  for examples.''
>>
>> Because the bundled test apps are always kept up to date with latest
>> library APIs, that is the best place to go to see how to do things.
>>
>> ../../common/controlobject.cpp:618:16: err or: invalid conversion from
>> 'uint16_t {aka short unsigned int}' to 'lws_context_creation_info*'
>> [-fpermissive]
>>
>>
>> ''User api changes
>> ----------------
>>
>>  - libwebsocket_create_context() has changed from taking a ton of
>> parameters
>>  to just taking a pointer to a struct containing the parameters. The
>>  struct lws_context_creation_info is in libwebsockets.h, the members
>>  are in the same order as when they were parameters to the call
>>  previously. The test apps are all updated accordingly so you can
>>  see example code there.''
>>
>> ../../common/controlobject.cpp:618:16: error: too many arguments to
>> function 'libwebsocket_context*
>> libwebsocket_create_context(lws_context_creation_info*)'
>> /usr/local/include/libwebsockets.h:806:1: note: declared here
>> ../../common/controlobject.cpp:668:13: error: 'libwebsockets_broadcast' was
>> not declared in this scope ../../common/controlobject.cpp: In static member
>> function 'static int CControlObject::callback_http(libwebsocket_context*,
>> libwebsocket*, libwebsocket_callback_reasons, void*, void*, size_t)':
>> ../../common/controlobject.cpp:2098:28: error: cannot convert
>> 'libwebsocket*' to 'libwebsocket_context*' for argument '1' to 'int
>> libwebsockets_serve_http_file(libwebsocket_context*, libwebsocket*, const
>> char*, const char*)'
>>
>>
>> ''user api changes
>> ----------------
>>
>>  - libwebsockets_serve_http_file() now takes a context as first argument''
>>
>> ../../common/controlobject.cpp:2120:32: error: invalid conversion from
>> 'int' to 'libwebsocket_context*' [-fpermissive]
>> ../../common/controlobject.cpp:2120:32: error: cannot convert 'char*' to
>> 'libwebsocket*' for argument '2' to 'void
>> libwebsockets_get_peer_addresses(libwebsocket_context*, libwebsocket*, int,
>> char*, int, char*, int)'
>>
>>
>> ''user api changes
>> ----------------
>>
>>  - libwebsockets_get_peer_addresses() now takes a context and wsi as first
>>  two arguments''
>>
>> -Andy
>>
>>  ../../common/controlobject.cpp: In static member function 'static int
>> CControlObject::callback_dumb_increment(libwebsocket_context*,
>> libwebsocket*, libwebsocket_callback_reasons, void*, void*, size_t)':
>> ../../common/controlobject.cpp:2221:7: error: 'LWS_CALLBACK_BROADCAST' was
>> not declared in this scope ../../common/controlobject.cpp:2235:37: error:
>> 'libwebsocket_close_and_free_session' was not declared in this scope
>> ../../common/controlobject.cpp: In static member function 'static int
>> CControlObject::callback_lws_mirror(libwebsocket_context*, libwebsocket*,
>> libwebsocket_callback_reasons, void*, void*, size_t)':
>> ../../common/controlobject.cpp:2317:7: error: 'LWS_CALLBACK_BROADCAST' was
>> not declared in this scope ../../common/controlobject.cpp: In static member
>> function 'static int
>> CControlObject::callback_lws_vscp(libwebsocket_context*, libwebsocket*,
>> libwebsocket_callback_reasons, void*, void*, size_t)':
>> ../../common/controlobject.cpp:2447:7: error: 'LWS_CALLBACK_BROADCAST' was
>> not declared in this scope ../../common/controlobject.cpp: In member
>> function 'void
>> CControlObject::handleWebSocketCommand(libwebsocket_context*,
>> libwebsocket*, per_session_data__lws_vscp*, const char*)':
>> ../../common/controlobject.cpp:2863:8: warning: unused variable 'val'
>> [-Wunused-variable] make: *** [../../common/controlobject.o] Error 1
>> =============================================================== Regards,
>> //Din On Sat, Mar 30, 2013 at 8:02 AM, "Andy Green (林安廸)" <
>> andy at warmcat.com> wrote:
>>
>> On 30/03/13 03:10, the mail apparently from Dinesh Guleria included:
>>
>> Thanks for your reply Edwin. >> I thought everything is cmake now instead
>> of autotools. I just clone gitt hub. Should i follow this :--- README.build
>> in this folder ?
>>
>> Yes... I just added an example working "toolchain file", and improved the
>> documentation a bit
>> http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=5b479ac2f1cb7d8a9ded478b99c8257852317ab2it works fine but make sure you nuke your build directory when switching
>> between cross and host build cmake configure... cmake just ignores your
>> change otherwise. -Andy
>>
>> Regards, //Din On Sat, Mar 30, 2013 at 12:33 AM, Edwin van den Oetelaar <
>> oetelaar.automatisering at gmail.com <mailto:
>> oetelaar.automatisering at gmail.com>> wrote: I thought everything is cmake
>> now instead of autotools. That happened some time ago (couple of months)
>> Are you using the latest version, as far as I know all autotools stuff has
>> been removed. Good luck with your work, Edwin On Fri, Mar 29, 2013 at 6:56
>> PM, Dinesh Guleria <din.gulu.er at gmail.com <mailto:din.gulu.er at gmail.com>>
>> wrote: > anyone who can suggest on this ? > > On Fri, Mar 29, 2013 at 7:58
>> PM, Dinesh Guleria <din.gulu.er at gmail.com <mailto:din.gulu.er at gmail.com>>
>> > wrote: >> >> So i thoght to change to libtool 2.4.2 & installed it , Now
>> i am stuck >> here :----- >> >>
>> http://stackoverflow.com/questions/15704808/installing-new-version-of-libtool-for-libwebsocket-warmcat>> >> How to get it working ? >> >> Please suggest >> >> //Din >> >> >> >>
>> On Fri, Mar 29, 2013 at 7:53 PM, Dinesh Guleria <din.gulu.er at gmail.com<mailto:
>> din.gulu.er at gmail.com>> >> wrote: >>> >>> As per andy suggestion i used
>> patch in this post :-- >>> >>>
>> http://ml.libwebsockets.org/pipermail/libwebsockets/2013-January/000027.html>>> >>> Its getting configured but getting error at make :----- >>> >>>
>> ============================== >>> >>> ./autogen.sh >>> Preparing the
>> libwebsockets build system...please wait >>> >>> Found GNU Autoconf version
>> 2.69 >>> perl: warning: Setting locale failed. >>> perl: warning: Please
>> check that your locale settings: >>> LANGUAGE = "en_US:", >>> LC_ALL =
>> (unset), >>> LANG = "en_US.UTF-8" >>> are supported and installed on your
>> system. >>> perl: warning: Falling back to the standard locale ("C"). >>>
>> perl: warning: Setting locale failed. >>> perl: warning: Please check that
>> your locale settings: >>> LANGUAGE = "en_US:", >>> LC_ALL = (unset), >>>
>> LANG = "en_US.UTF-8" >>> are supported and installed on your system. >>>
>> perl: warning: Falling back to the standard locale ("C"). >>> Found GNU
>> Automake version 1.13 >>> Found GNU Libtool version 1.5.26 >>> >>>
>> Automatically preparing build ... done >>> >>> The libwebsockets build
>> system is now prepared. To build here, run: >>> ./configure >>> make >>>
>> >>> ===================== >>> >>> >>> but i am getting following error at
>> make :-- >>> >>> ======================================= >>> >>> make
>> all-recursive >>> make[1]: Entering directory >>>
>> `/home/ignite/sbox2/rootfs/rfs-raspbian/home/pi/libwebsockets-fa17ca722544c9cdb14b87ca8a09fbcdc49d8cb5'
>> >>> Making all in lib >>> make[2]: Entering directory >>>
>> `/home/ignite/sbox2/rootfs/rfs-raspbian/home/pi/libwebsockets-fa17ca722544c9cdb14b87ca8a09fbcdc49d8cb5/lib'
>> >>> /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
>> >>> -I.. -Wall -std=gnu99 -pedantic -rdynamic -fPIC -Werror -c >>>
>> -DINSTALL_DATADIR=\"/usr/local/share\" >>>
>> -DLWS_OPENSSL_CLIENT_CERTS=\"/etc/pki/tls/certs/\" -g -O2 -D_DEBUG -MT >>>
>> libwebsockets_la-libwebsockets.lo -MD -MP -MF >>>
>> .deps/libwebsockets_la-libwebsockets.Tpo -c -o >>>
>> libwebsockets_la-libwebsockets.lo `test -f 'libwebsockets.c' || echo >>>
>> './'`libwebsockets.c >>> ../libtool: line 865: X--tag=CC: command not found
>> >>> ../libtool: line 898: libtool: ignoring unknown tag : command not found
>> >>> ../libtool: line 865: X--mode=compile: command not found >>>
>> ../libtool: line 1032: *** Warning: inferring the mode of operation is >>>
>> deprecated.: command not found >>> ../libtool: line 1033: *** Future
>> versions of Libtool will require >>> --mode=MODE be specified.: command not
>> found >>> ../libtool: line 1176: Xgcc: command not found >>> ../libtool:
>> line 1176: X-DHAVE_CONFIG_H: command not found >>> ../libtool: line 1176:
>> X-I.: command not found >>> ../libtool: line 1176: X-I..: command not found
>> >>> ../libtool: line 1176: X-Wall: command not found >>> ../libtool: line
>> 1176: X-std=gnu99: command not found >>> ../libtool: line 1176: X-pedantic:
>> command not found >>> ../libtool: line 1176: X-rdynamic: command not found
>> >>> ../libtool: line 1176: X-fPIC: command not found >>> ../libtool: line
>> 1176: X-Werror: command not found >>> ../libtool: line 1176: X-c: command
>> not found >>> ../libtool: line 1176: X-DINSTALL_DATADIR="/usr/local/share":
>> No such >>> file or directory >>> ../libtool: line 1176:
>> X-DLWS_OPENSSL_CLIENT_CERTS="/etc/pki/tls/certs/": >>> No such file or
>> directory >>> ../libtool: line 1176: X-g: command not found >>> ../libtool:
>> line 1176: X-O2: command not found >>> ../libtool: line 1176: X-D_DEBUG:
>> command not found >>> ../libtool: line 1176: X-MT: command not found >>>
>> ../libtool: line 1176: Xlibwebsockets_la-libwebsockets.lo: command not >>>
>> found >>> ../libtool: line 1176: X-MD: command not found >>> ../libtool:
>> line 1176: X-MP: command not found >>> ../libtool: line 1176: X-MF: command
>> not found >>> ../libtool: line 1176:
>> X.deps/libwebsockets_la-libwebsockets.Tpo: No such >>> file or directory
>> >>> ../libtool: line 1176: X-c: command not found >>> ../libtool: line
>> 1229: Xlibwebsockets_la-libwebsockets.lo: command not >>> found >>>
>> ../libtool: line 1234: libtool: compile: cannot determine name of library
>> >>> object from `': command not found >>> make[2]: ***
>> [libwebsockets_la-libwebsockets.lo] Error 1 >>> make[2]: Leaving directory
>> >>>
>> `/home/ignite/sbox2/rootfs/rfs-raspbian/home/pi/libwebsockets-fa17ca722544c9cdb14b87ca8a09fbcdc49d8cb5/lib'
>> >>> make[1]: *** [all-recursive] Error 1 >>> make[1]: Leaving directory >>>
>> `/home/ignite/sbox2/rootfs/rfs-raspbian/home/pi/libwebsockets-fa17ca722544c9cdb14b87ca8a09fbcdc49d8cb5'
>> >>> make: *** [all] Error 2 >>> >>>
>> ======================================== >>> >>> Please suggest how to
>> resolve it ? >>> >>> >>> >>> On Fri, Mar 29, 2013 at 7:41 PM, Dinesh
>> Guleria <din.gulu.er at gmail.com <mailto:din.gulu.er at gmail.com>> >>>
>> wrote: >>>> >>>> Hi, >>>> >>>> I am getting following error :---- >>>> >>>>
>> ====================================== error ==================== >>>> >>>>
>> /pi/libwebsockets-1.0-chrome25-firefox17$ sb2 -t rfs-raspbian -eR >>>>
>> ./autogen.sh >>>> Preparing the libwebsockets build system...please wait
>> >>>> >>>> Found GNU Autoconf version 2.69 >>>> perl: warning: Setting
>> locale failed. >>>> perl: warning: Please check that your locale settings:
>> >>>> LANGUAGE = "en_US:", >>>> LC_ALL = (unset), >>>> LANG = "en_US.UTF-8"
>> >>>> are supported and installed on your system. >>>> perl: warning:
>> Falling back to the standard locale ("C"). >>>> perl: warning: Setting
>> locale failed. >>>> perl: warning: Please check that your locale settings:
>> >>>> LANGUAGE = "en_US:", >>>> LC_ALL = (unset), >>>> LANG = "en_US.UTF-8"
>> >>>> are supported and installed on your system. >>>> perl: warning:
>> Falling back to the standard locale ("C"). >>>> Found GNU Automake version
>> 1.13 >>>> Found GNU Libtool version 1.5.26 >>>> >>>> Automatically
>> preparing build ... Warning: autoreconf failed >>>> Attempting to run the
>> preparation steps individually >>>> >>>> Preparing build ... ERROR: aclocal
>> failed >>>> >>>> >>>>
>> ================================================================ >>>> >>>>
>> Please suggest, how to resolve it. >>>> >>>> //Din >>> >>> >> > > >
>> _______________________________________________ > Libwebsockets mailing
>> list > Libwebsockets at ml.libwebsockets.org <mailto:
>> Libwebsockets at ml.libwebsockets.org> >
>> http://ml.libwebsockets.org/mailman/listinfo/libwebsockets >
>> _______________________________________________ Libwebsockets mailing list
>> Libwebsockets at ml.libwebsockets.org
>> http://ml.libwebsockets.org/mailman/listinfo/libwebsockets
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20130406/0b64c526/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: controlobject.cpp
Type: text/x-c++src
Size: 90246 bytes
Desc: not available
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20130406/0b64c526/attachment.bin>


More information about the Libwebsockets mailing list