EionRobb / pidgin-xmpp-ignore-groups

Automatically exported from code.google.com/p/pidgin-xmpp-ignore-groups
5 stars 0 forks source link

Cannot build on Windows #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Configure build environment for Pidgin under Windows
2. Copy xmpp-ignore-groups.c to devroot/pidgin-2.10.6/libpurple/plugins
3. Enter that dir and build it:  make -f Makefile.mingw xmpp-ignore-groups.dll

What is the expected output? What do you see instead?
Expected DLL as output, get this error instead:
undefined reference to `jabber_iq_signal_unregister'

What version of the product are you using? On what operating system?
R3, Windows 7.

Here's the full output:
devroot/pidgin-2.10.6/libpurple/plugins $ make -f Makefile.mingw 
xmpp-ignore-groups.dll
gcc.exe -O2 -Wall -Waggregate-return -Wcast-align -Wdeclaration-after-statement 
-Werror-implicit-function-declaration -Wextra -Wno-sign-compare 
-Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wpointer-arith -Wundef -pipe -mno-cygwin -mms-bitfields -g 
-DHAVE_CYRUS_SASL -DHAVE_CONFIG_H -DWIN32_LEAN_AND_MEAN 
-I../../../win32-dev/gtk_2_0-2.14/include 
-I../../../win32-dev/gtk_2_0-2.14/include/glib-2.0 
-I../../../win32-dev/gtk_2_0-2.14/lib/glib-2.0/include -I../.. 
-I../../libpurple -I../../libpurple/win32 -o xmpp-ignore-groups.dll.o -c 
xmpp-ignore-groups.c
gcc.exe -shared xmpp-ignore-groups.dll.o -L../../../win32-dev/gtk_2_0-2.14/lib 
-L../../libpurple -lglib-2.0 -lgobject-2.0 -lgmodule-2.0 -lintl -lws2_32 
-lpurple -Wl,--enable-auto-image-base -o xmpp-ignore-groups.dll
xmpp-ignore-groups.dll.o: In function `unload_plugin':
d:\Pidgin.Buildbox\pidgin-2.10.6\libpurple\plugins/xmpp-ignore-groups.c:93: 
undefined reference to `jabber_iq_signal_unregister'
xmpp-ignore-groups.dll.o: In function `load_plugin':
d:\Pidgin.Buildbox\pidgin-2.10.6\libpurple\plugins/xmpp-ignore-groups.c:74: 
undefined reference to `jabber_iq_signal_register'
collect2: ld returned 1 exit status
make: *** [xmpp-ignore-groups.dll] Error 1

Original issue reported on code.google.com by br.renatosilva on 12 Dec 2012 at 11:50

GoogleCodeExporter commented 8 years ago
You need to include the jabber headers form libpurple/protocols/jabber/

Original comment by eionrobb on 12 Dec 2012 at 11:55

GoogleCodeExporter commented 8 years ago
No. When I include "protocols/jabber/iq.h", the error just turns into something 
else:

plugins $ make -f Makefile.mingw xmpp-ignore-groups.dll
gcc.exe -O2 -Wall -Waggregate-return -Wcast-align -Wdeclaration-after-statement 
-Werror-implicit-function-declaration -Wextra -Wno-sign-compare 
-Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wpointer-arith -Wundef -pipe -mno-cygwin -mms-bitfields -g 
-DHAVE_CYRUS_SASL -DHAVE_CONFIG_H -DWIN32_LEAN_AND_MEAN 
-I../../../win32-dev/gtk_2_0-2.14/include 
-I../../../win32-dev/gtk_2_0-2.14/include/glib-2.0 
-I../../../win32-dev/gtk_2_0-2.14/lib/glib-2.0/include -I../.. 
-I../../libpurple -I../../libpurple/win32 -o xmpp-ignore-groups.dll.o -c 
xmpp-ignore-groups.c
In file included from ../../libpurple/protocols/jabber/iq.h:35,
                 from xmpp-ignore-groups.c:22:
../../libpurple/protocols/jabber/jabber.h:57:27: error: libxml/parser.h: No 
such file or directory
../../libpurple/protocols/jabber/jabber.h:78:23: error: sasl/sasl.h: No such 
file or directory
In file included from ../../libpurple/protocols/jabber/iq.h:35,
                 from xmpp-ignore-groups.c:22:
../../libpurple/protocols/jabber/jabber.h:105: error: expected 
specifier-qualifier-list before 'xmlParserCtxt'
make: *** [xmpp-ignore-groups.dll] Error 1

Original comment by br.renatosilva on 13 Dec 2012 at 12:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Ok, here's the magical command line that worked for me, using the GCC from 
MinGW (4.7.2) instead of the one for building Pidgin (4.4.0). Also, I didn't 
need to change source code as above.

devroot/pidgin-2.10.6/libpurple/plugins $ gcc xmpp-ignore-groups.c -O2 -Wall  
-L.. -L../protocols/jabber -L ../../../win32-dev/gtk_2_0-2.14/bin -ljabber 
-lpurple -lglib-2.0-0 -shared -I.. 
-I../../../win32-dev/gtk_2_0-2.14/include/glib-2.0 -I 
../../../win32-dev/gtk_2_0-2.14/lib/glib-2.0/include -I 
../../../win32-dev/libxml2-2.9.0/include/libxml2 -o xmpp-ignore-groups.dll

Original comment by br.renatosilva on 13 Dec 2012 at 2:22

GoogleCodeExporter commented 8 years ago
Could you please test if the make file also works ?
https://code.google.com/p/pidgin-xmpp-ignore-groups/issues/detail?id=1#c4

You need a unix-like environment (running MinGW with all the environment and 
paths loaded, not only from the plain Windows command line, because the make 
filerelies on pkg-config to find the correct paths)

Original comment by doktor....@gmail.com on 17 Dec 2012 at 5:39

GoogleCodeExporter commented 8 years ago
I had tried it before, but I couldn't find a MinGW-get package for pkg-config.

Original comment by br.renatosilva on 17 Dec 2012 at 9:19