Canot compile lop1.40 with cygwin

Posted by Gunner on Thu 01 May 2014 05:12 PM — 11 posts, 40,199 views.

Argentina #0
Hi, I'm Trying to Compile lop 1.40 and get the Following Errors:
$ make
make -s lop
Compiling o/imc.o....
imc.c: En la función ‘bool imc_startup_network(bool)’:
imc.c:4831:8: error: se define la variable ‘fscanned’ pero no se usa [-Werror=unused-but-set-variable]
int fscanned;
^
cc1plus: todos los avisos se tratan como errores
Makefile:121: recipe for target 'o/imc.o' failed
make[1]: *** [o/imc.o] Error 1
Makefile:69: recipe for target 'all' failed
make: *** [all] Error 2
How I can fix this?
pd. sorry for the subject, my error
Amended on Thu 01 May 2014 05:13 PM by Gunner
Australia Forum Administrator #1
Try adding this to the compile line (options) in the makefile:


-Werror=unused-but-set-variable
Argentina #2
That's good? still the same error.
W_FLAGS = -Wall -Werror=unused-but-set-variable -Wshadow -Wformat-security -Wpointer-arith -Wcast-align -Wredundant-decls $(WSTRINGS)
USA Global Moderator #3
Uh, no. Nick is wrong. You want -Wno-error=unused-but-set-variable.
Or just change line 4850 in imc.c to be
fscanf( fp, "%s %s\n", netname, server );
and then remove line 4833, because fscanned isn't being used for anything.
Australia Forum Administrator #4
OK well try changing it to:


-Wno-unused-but-set-variable
Argentina #5
Thanks!
now there is new errors:
make -s lop
Compiling o/imc.o....
Compiling o/act_comm.o....
act_comm.c: En la función ‘void do_say(CHAR_DATA*, char*)’:
act_comm.c:429:11: error: la declaración de ‘actflags’ oscurece a una declaración global [-Werror=shadow]
EXT_BV actflags;
^
In file included from h/mud.h:59:0,
from act_comm.c:25:
h/const.h:469:3: error: aquí está la declaración oscurecida [-Werror=shadow]
} actflags;
^
act_comm.c: En la función ‘void do_gemote(CHAR_DATA*, char*)’:
act_comm.c:1187:11: error: la declaración de ‘actflags’ oscurece a una declaración global [-Werror=shadow]
EXT_BV actflags;
^
In file included from h/mud.h:59:0,
from act_comm.c:25:
h/const.h:469:3: error: aquí está la declaración oscurecida [-Werror=shadow]
} actflags;
^
act_comm.c: En la función ‘void do_emote(CHAR_DATA*, char*)’:
act_comm.c:1241:11: error: la declaración de ‘actflags’ oscurece a una declaración global [-Werror=shadow]
EXT_BV actflags;
^
In file included from h/mud.h:59:0,
from act_comm.c:25:
h/const.h:469:3: error: aquí está la declaración oscurecida [-Werror=shadow]
} actflags;
^
act_comm.c: En la función ‘int countlangs(EXT_BV)’:
act_comm.c:2241:34: error: la declaración de ‘languages’ oscurece a una declaración global [-Werror=shadow]
int countlangs( EXT_BV languages )
^
In file included from h/mud.h:59:0,
from act_comm.c:25:
h/const.h:155:3: error: aquí está la declaración oscurecida [-Werror=shadow]
} languages;
^
cc1plus: todos los avisos se tratan como errores
Makefile:121: recipe for target 'o/act_comm.o' failed
make[1]: *** [o/act_comm.o] Error 1
Makefile:69: recipe for target 'all' failed
make: *** [all] Error 2
Australia Forum Administrator #6
You could fix those errors, or change to ignore them in a similar way to before:


-Wno-shadow
USA Global Moderator #7
Or just nip this whole thing in the bud. You obviously have -Werror defined. So add -Wno-error to override it.
Argentina #8
Thanks, another error:
Compiling o/comm.o....
In file included from comm.c:33:0:
h/mccp.h:21:18: error fatal: zlib.h: No such file or directory
#include <zlib.h>
^
compilación terminada.
Makefile:121: recipe for target 'o/comm.o' failed
make[1]: *** [o/comm.o] Error 1
Makefile:69: recipe for target 'all' failed
make: *** [all] Error 2

Marcos@Marcos-PC ~/lop/src
$
Argentina #9
ok, fixed it.

Now I can not start the mud.
cd lop/área
../lop
and stays there , doing nothing .
USA Global Moderator #10
My only idea at this point will be that maybe a newer version fixes your problem. I know nothing about lop.