Anope IRC Services

Anope Development => Modules => Topic started by: Wintermute on September 02, 2006, 07:04:35 AM

Title: unreal_addon doesn't compile with gcc4
Post by: Wintermute on September 02, 2006, 07:04:35 AM
As i run gentoo i can easily switch between compilers, but on the long term it would be great if someone (maybe the author himself?) could fix it. I guess i'm not the only one using this module ;)

This is also true for os_blacklistemail, but this modules throws some warnings on compile about either.

Thought somebody might want to know.
Title:
Post by: n00bie on September 02, 2006, 07:10:37 AM
According to the module Author, the module requires Anope 1.7.2+ and MySQL.
What is your error/problem with the compiling ?
Title:
Post by: Trystan Scott Lee on September 02, 2006, 07:40:55 AM
you sure the problem is that the module is to far date to work with newer anope? that is the more likely problem
Title:
Post by: Tom65789 on September 02, 2006, 08:24:31 AM
from what could see the code isnt too dated for it to work. it does require MySQL though. have you MySQL enabled on your network?
Title:
Post by: Wintermute on September 02, 2006, 09:08:16 AM
It compiles with gcc3.4.6 but not with gcc4.1.1 thats all :)
As i use gentoo i can switch the compiler with one commandline to gcc3.4 as i have installed both (sloted). It isn't related to incompatibilities with anope nor have i overseen the requirement of MySQL.

GCC3.4.x (and lower): compiles
GCC4: following error ->

Quote
gcc -pipe -O3 -s -pipe -march=pentium4 -mfpmath=sse -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -funit-at-a-time -I/usr/include/mysql -s -pipe -march=pentium4 -mfpmath=sse -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -funit-at-a-time -DHAVE_ERRNO_AS_DEFINE=1 -export-dynamic -rdynamic -Wall -fPIC -DPIC -shared -I../../include -c unreal_addon.c
unreal_addon.c:273: Fehler: Statische Deklaration von »mysql« folgt nicht-statischer Deklaration
../../include/extern.h:1118: Fehler: Vorherige Deklaration von »mysql« war hier
unreal_addon.c: In Funktion »do_on_identify«:
unreal_addon.c:1284: Warnung: Implizite Deklaration der Funktion »strcasestr«
unreal_addon.c:1267: Warnung: Variable »buf« wird nicht verwendet
unreal_addon.c: In Funktion »do_info2«:
unreal_addon.c:1398: Warnung: Variable »query« wird nicht verwendet
make[1]: *** [unreal_addon.o] Fehler 1
make[1]: Leaving directory `/home/ftp/anope-1.7.15/src/modules'
make: *** [modules] Fehler 2


Sorry about the german, but it says: "static declaration of 'mysql' after not-static declaration" (roughly translated)

Line 1118 of includes/extern.h clashes with line 273 of unreal_addon.c

If i would posses some coding skills i would fix it and make it available for others. I guess(!) the fix isn't very complicated, but as i'm no C/C++ coder ....
Title:
Post by: Tom65789 on September 02, 2006, 11:31:54 AM
i'll take a quick look at it when i can but right now im at work so i cant really do much \o/