Hi,<br><br>I'm trying to get VLC to advertise the luahttp interface on bonjour.<br><br>OS: Ubuntu 11.04<br>I have copied bonjour.c and bonjour.h to modules/lua from modules/access_output<br><br>The git diff for the code I changed is:<br>
<br>diff --git a/modules/lua/Modules.am b/modules/lua/Modules.am<br>index a806804..6332817 100644<br>--- a/modules/lua/Modules.am<br>+++ b/modules/lua/Modules.am<br>@@ -1,4 +1,6 @@<br> SOURCES_lua = \<br>+ bonjour.c \<br>
+ bonjour.h \<br> extension.c \<br> extension.h \<br> extension_thread.c \<br>diff --git a/modules/lua/intf.c b/modules/lua/intf.c<br>index 22b974a..995f1ac 100644<br>--- a/modules/lua/intf.c<br>
+++ b/modules/lua/intf.c<br>@@ -31,6 +31,7 @@<br> #ifdef HAVE_CONFIG_H<br> # include "config.h"<br> #endif<br>+#include "bonjour.h"<br> <br> #include <vlc_common.h><br> #include <vlc_interface.h><br>
@@ -192,7 +193,7 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )<br> lua_close( L );<br> goto error;<br> }<br>-<br>+bonjour_start_service( p_this , "http", "Http", 8080, "text" );<br>
/*<br> * Get the lua-config string.<br> * If the string is empty, try with the old http-* or telnet-* options<br><br><br><br><br>Additionally I changed the vlc-config to : <br><br> lua)<br> cflags="${cflags} -I/usr/include/lua5.1 -D_REENTRANT"<br>
libs="${libs} -llua5.1 -ldl -lm -L/usr/lib/i386-linux-gnu -lavahi-common -lavahi-client "<br><br><br><br>make runs successfully, but on running vlc, I get errors like: <br><div class="text"><div class="de1">
<br><br>[0x8c7c2b0] main libvlc warning: cannot read /home/akash/vlc/src/.libs/vlc/plugins/plugins.dat (No such file or directory)</div><div class="de2"> </div><div class="de1"> </div><div class="de2">[0x8d23700] main interface debug: looking for interface module: 1 candidate</div>
<div class="de1">[0x8d23700] main interface warning:
cannot load module `/home/akash/vlc/modules/lua/.libs/liblua_plugin.so'
(/home/akash/vlc/modules/lua/.libs/liblua_plugin.so: undefined symbol:
bonjour_start_service)</div><div class="de2">[0x8d23700] main interface error: possibly corrupt module cache</div><div class="de1">[0x8d23700] main interface debug: no interface module matching "luahttp,none" could be loaded</div>
<div class="de2">[0x8d23700] main interface debug: TIMER module_need() : 0.967 ms - Total 0.967 ms / 1 intvls (Avg 0.967 ms)</div><div class="de1">[0x8d23700] main interface error: no suitable interface module</div><div class="de2">
Error: callback on "intf-add" dangling /home/akash/vlc/src/.libs/libvlccore.so.5(?)[0xb77a6000]</div><div class="de1">[0x8d242e0] main interface debug: looking for interface module: 4 candidates</div><div class="de2">
[0x8d242e0] main interface warning:
cannot load module `/home/akash/vlc/modules/lua/.libs/liblua_plugin.so'
(/home/akash/vlc/modules/lua/.libs/liblua_plugin.so: undefined symbol:
bonjour_start_service)</div><div class="de1">[0x8d242e0] main interface error: possibly corrupt module cache</div><div class="de2">[0x8d242e0] main interface warning:
cannot load module `/home/akash/vlc/modules/lua/.libs/liblua_plugin.so'
(/home/akash/vlc/modules/lua/.libs/liblua_plugin.so: undefined symbol:
bonjour_start_service)</div><div class="de1">[0x8d242e0] main interface error: possibly corrupt module cache</div><div class="de2">[0x8d242e0] main interface warning:
cannot load module `/home/akash/vlc/modules/lua/.libs/liblua_plugin.so'
(/home/akash/vlc/modules/lua/.libs/liblua_plugin.so: undefined symbol:
bonjour_start_service)</div><div class="de1">[0x8d242e0] main interface error: possibly corrupt module cache</div><div class="de2">[0x8d242e0] main interface warning:
cannot load module `/home/akash/vlc/modules/lua/.libs/liblua_plugin.so'
(/home/akash/vlc/modules/lua/.libs/liblua_plugin.so: undefined symbol:
bonjour_start_service)</div><div class="de1">[0x8d242e0] main interface error: possibly corrupt module cache</div><div class="de2">[0x8d242e0] main interface debug: no interface module matching "lua,none" could be loaded</div>
<div class="de1">[0x8d242e0] main interface debug: TIMER module_need() : 2.688 ms - Total 2.688 ms / 1 intvls (Avg 2.688 ms)</div><div class="de2">[0x8d242e0] main interface error: no suitable interface module</div><br><br>
</div>Sample avahi program (from the avahi documentation) compiles with <br><br> gcc -D_REENTRANT -L/usr/lib/i386-linux-gnu -lavahi-common -lavahi-client test.c <br><br>and runs fine<br><br><br><br>Can anyone help with what's wrong here?<br>