Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ Error compiling smaug 1.8 (Need help please)
Error compiling smaug 1.8 (Need help please)
|
Posting of new messages is disabled at present.
Refresh page
Posted by
| Oblisgr
(123 posts) Bio
|
Date
| Wed 22 Jan 2020 09:20 PM (UTC) |
Message
| Need help with this error please :/
I cannot complile the server WSL
[spoiler]
oblisgr@TaLoS:/mnt/h/smaug1.8/src$ make
make smaug
make[1]: Entering directory '/mnt/h/smaug1.8/src'
gcc -c -O -g3 -Wall -Wuninitialized -DREQUESTS -DSMAUG -DREGEX -DUSE_IMC act_move.c
act_move.c: In function ‘decorate_room’:
act_move.c:290:34: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
switch( number_range(1, 2 * (iRand == nRand -1) ? 1 : 2) )
~~^~~~~~~~~~~~~~~~~~~~~
act_move.c: In function ‘rev_exit’:
act_move.c:393:15: warning: trigraph ??> ignored, use -trigraphs to enable [-Wtrigraphs]
return "<???>";
act_move.c: In function ‘generate_exit’:
act_move.c:604:25: error: lvalue required as left operand of assignment
(EXIT_DATA *) pexit = xit;
^
act_move.c: In function ‘move_char’:
act_move.c:668:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (ch->stance > STANCE_NONE)
^~
act_move.c:671:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
if ( !pexit || (to_room = pexit->to_room) == NULL )
^~
act_move.c: In function ‘do_climb’:
act_move.c:2238:10: warning: variable ‘found’ set but not used [-Wunused-but-set-variable]
bool found;
^~~~~
act_move.c: In function ‘do_enter’:
act_move.c:2269:10: warning: variable ‘found’ set but not used [-Wunused-but-set-variable]
bool found;
^~~~~
act_move.c: In function ‘do_leave’:
act_move.c:2308:10: warning: variable ‘found’ set but not used [-Wunused-but-set-variable]
bool found;
^~~~~
Makefile:73: recipe for target 'act_move.o' failed
make[1]: *** [act_move.o] Error 1
make[1]: Leaving directory '/mnt/h/smaug1.8/src'
Makefile:63: recipe for target 'all' failed
make: *** [all] Error 2
[spoiler] | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 22 Jan 2020 10:05 PM (UTC) |
Message
| These error messages are because the compiler has been updated. I strongly suggest you get the latest SmaugFUSS (Fixed Up Smaug Source) from here:
https://smaugmuds.afkmods.com/
There will be dozens, if not hundreds, of errors from the old source if you keep trying to use it. And, bugs at run-time.
This seems to be the download page for SmaugFUSS 1.9.3:
https://smaugmuds.afkmods.com/files/smaugfuss-193-500/
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Oblisgr
(123 posts) Bio
|
Date
| Reply #2 on Thu 23 Jan 2020 10:18 AM (UTC) |
Message
| nick gammon thanks for the reply.
i did tried with the smaugfuss you mentioned in the link
my server just refuses to compile.
i updated and tried with ccg, ccg34, c+34
I updated ubundu
but nothing
[spoiler]
oblisgr@TaLoS:/mnt/h/smaugfuss/src$ make
make -s smaug
Compiling o/imc.o....
Compiling o/act_comm.o....
Compiling o/act_info.o....
Compiling o/act_move.o....
act_move.c: In function ‘void decorate_room(ROOM_INDEX_DATA)’:
act_move.c:257:43: warning: ‘’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
switch ( number_range( 1, ( 2 * ( iRand == nRand - 1 ) ) ? 1 : 2 ) )
~~^~~~~~
Compiling o/act_obj.o....
Compiling o/act_wiz.o....
act_wiz.c: In function ‘bool create_new_race(int, char*)’:
act_wiz.c:8824:6: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
bool create_new_race( int rcindex, char *argument )
^~~
act_wiz.c:8834:12: note: ‘snprintf’ output between 1 and 17 bytes into a destination of size 16
snprintf( race_table[rcindex]->race_name, 16, "%-.16s", argument );
~~^~~~~~~~~~~~
Compiling o/ban.o....
Compiling o/boards.o....
Compiling o/build.o....
Compiling o/calendar.o....
Compiling o/chess.o....
Compiling o/clans.o....
Compiling o/color.o....
Compiling o/comm.o....
In file included from comm.c:30:0:
mccp.h:18:10: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^~
compilation terminated.
Makefile:101: recipe for target 'o/comm.o' failed
make[1]: [o/comm.o] Error 1
Makefile:46: recipe for target 'all' failed
make: [all] Error 2
[spoiler] | Top |
|
Posted by
| Oblisgr
(123 posts) Bio
|
Date
| Reply #3 on Thu 23 Jan 2020 12:41 PM (UTC) |
Message
| Actually using sudo make in smaugfuss 1.9.3
i actually managed to get the folloing lines but the startup files are not created.
i dont know why...
oblisgr@TAXYDEMA:/mnt/d/smaugfuss/src$ sudo make
[sudo] password for oblisgr:
make smaug
make[1]: Entering directory '/mnt/d/smaugfuss/src'
make[1]: 'smaug' is up to date.
make[1]: Leaving directory '/mnt/d/smaugfuss/src'
make dns
make[1]: Entering directory '/mnt/d/smaugfuss/src'
rm -f resolver
g++ -g2 -O -o resolver resolver.o
Done compiling DNS resolver.
chmod g+w resolver
chmod a+x resolver
chmod g+w resolver.o
make[1]: Leaving directory '/mnt/d/smaugfuss/src' | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #4 on Thu 23 Jan 2020 08:39 PM (UTC) Amended on Thu 23 Jan 2020 08:40 PM (UTC) by Nick Gammon
|
Message
| You should absolutely not have to use sudo to compile Smaug (or indeed, anything).
Look at the message you get when not using sudo, and fix the problem (permissions, possibly).
As for:
mccp.h:18:10: fatal error: zlib.h: No such file or directory
#include <zlib.h>
It looks like you haven’t included/installed the zlib library. It also looks like you are using Cygwin, so use the Cygwin installer to get the zlib library (you probably need the development version, so you get the header files).
… but the startup files are not created.
How do you know? What files are created in the “src” directory?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,470 views.
Posting of new messages is disabled at present.
Refresh page
top