Register forum user name Search FAQ

Gammon Forum

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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Compiling the server ➜ Compiling SMAUG 1.8b with CygWin produces errors

Compiling SMAUG 1.8b with CygWin produces errors

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by cmonroy   Mexico  (10 posts)  Bio
Date Thu 13 Dec 2007 09:48 PM (UTC)
Message
I'm using Windows Vista with Cygwin to compile a SMAUG server according to the instructions showed on page "How to compile" but keep getting two undefined references that I think prevent me to compile succesfully the server:

- undefined reference to '_re_exec'
- undefined reference to '_crypt'

-->
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory '/home/César Monroy/smaug1.8/src
make: *** [all] Error 2
<--

Hope anyone can help me with this. Thanks
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Thu 13 Dec 2007 11:18 PM (UTC)
Message
The crypt problem is a very common issue; if you search for 'crypt' and 'cygwin' on the forums you should find it.

Alternatively, look for the libcrypt library in the cygwin packages.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #2 on Fri 14 Dec 2007 01:31 AM (UTC)
Message
Also search the forum for _re_exec - there are a few posts about that too.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by cmonroy   Mexico  (10 posts)  Bio
Date Reply #3 on Fri 14 Dec 2007 04:31 AM (UTC)
Message
Okey... I've installed Ubuntu 7.10 to see if I could improve things but I still get some error message:

act_comm.c:3173: error: ‘CHAR_DATA’ no tiene un miembro llamado ‘speaking’
act_comm.c: En la función ‘do_traffic’:
act_comm.c:3186: error: ‘CHAR_DATA’ no tiene un miembro llamado ‘act’
act_comm.c: En la función ‘do_wartalk’:
act_comm.c:3197: error: ‘CHAR_DATA’ no tiene un miembro llamado ‘act’
act_comm.c: En la función ‘do_racetalk’:
act_comm.c:3208: error: ‘CHAR_DATA’ no tiene un miembro llamado ‘act’
act_comm.c: En la función ‘add_profane_word’:
act_comm.c:3247: aviso: declaración implícita de la función ‘strlen’
act_comm.c:3247: aviso: declaración implícita incompatible de la función interna ‘strlen’
act_comm.c:3338: aviso: declaración implícita incompatible de la función interna ‘strcat’
act_comm.c: En la función ‘is_profane’:
act_comm.c:3347: aviso: declaración implícita de la función ‘re_exec’
make[1]: *** [act_comm.o] Error 1
make[1]: se sale del directorio `/home/cmonroy/dist/src'
make: *** [all] Error 2

Any suggestions, Nick? Thanks.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #4 on Fri 14 Dec 2007 05:01 AM (UTC)
Message
If I remember correctly, stock SMAUG 1.8 has a number of compiler errors in it. Those missing member errors you are getting ("no tiene un membro llamado ...") probably aren't due to you or your environment but are bugs in SMAUG. You might be better using SmaugFUSS from here:
http://www.smaugmuds.org/index.php?a=files&s=viewfile&fid=142

It has a lot of bug fixes, too, so I'd suggest using it anyhow. (FUSS = Fixed Up Stock Source)

Out of curiosity were there more errors than just those? I'd be a little surprised that it'd be as simple as a missing field; maybe the compiler is having a problem with the field type and therefore tosses the field.

By the way:
act_comm.c:3247: aviso: declaración implícita de la función ‘strlen’
act_comm.c:3247: aviso: declaración implícita incompatible de la función interna ‘strlen’
act_comm.c:3338: aviso: declaración implícita incompatible de la función interna ‘strcat’
act_comm.c: En la función ‘is_profane’:
act_comm.c:3347: aviso: declaración implícita de la función ‘re_exec’

The implicit declaration warnings probably aren't a big problem, especially the first three, since they'll be found when the program is linked with the runtime library. It's bad style of the SMAUG authors to have not included the proper header files.

(I'd never seen gcc output in Spanish before... yay)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by cmonroy   Mexico  (10 posts)  Bio
Date Reply #5 on Fri 14 Dec 2007 05:10 AM (UTC)
Message
Thank you very much David... I'll download the FUSS and give it a try!
Top

Posted by cmonroy   Mexico  (10 posts)  Bio
Date Reply #6 on Fri 14 Dec 2007 07:18 AM (UTC)

Amended on Fri 14 Dec 2007 07:58 AM (UTC) by cmonroy

Message
It seems that after downloading the FUSS, I had to get the C++ compiler. The code compiles up to the comm.c, where it calls mccp.h and fails to find an included zlib.h... I have installed the zlib that is available for Ubuntu 7.10 but the compiler still complains of not finding zlib.h Any Ideas?
Top

Posted by cmonroy   Mexico  (10 posts)  Bio
Date Reply #7 on Fri 14 Dec 2007 07:21 AM (UTC)
Message
Please disregard previous code... Sending finger is faster than the intelligence behind the action. Sorry

make -s smaug
Compiling o/imc.o....
Compiling o/act_comm.o....
Compiling o/act_info.o....
Compiling o/act_move.o....
Compiling o/act_obj.o....
Compiling o/act_wiz.o....
Compiling o/ban.o....
Compiling o/boards.o....
Compiling o/build.o....
Compiling o/chess.o....
Compiling o/clans.o....
Compiling o/color.o....
Compiling o/comm.o....
En el fichero incluído de comm.c:30:
mccp.h:18:18: error: zlib.h: No existe el fichero ó directorio
mccp.h:33: error: ISO C++ prohíbe la declaración de ‘z_stream’ sin tipo
mccp.h:33: error: expected ‘;’ before ‘*’ token
comm.c: In function ‘bool write_to_descriptor(DESCRIPTOR_DATA*, char*, int)’:
comm.c:1639: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
comm.c:1641: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
comm.c:1642: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
comm.c:1644: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
comm.c:1646: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
comm.c:1647: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
comm.c:1649: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
comm.c:1651: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
comm.c:1651: error: ‘Z_SYNC_FLUSH’ no se declaró en este ámbito
comm.c:1651: error: ‘deflate’ no se declaró en este ámbito
comm.c:1653: error: ‘Z_OK’ no se declaró en este ámbito
comm.c:1657: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
comm.c:1695: error: ‘struct mccp_data’ no tiene un miembro llamado ‘out_compress’
make[1]: *** [o/comm.o] Error 1
make: *** [all] Error 2
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #8 on Fri 14 Dec 2007 08:20 AM (UTC)
Message
If you install zlib you should get zlib.h which should fix your problems.

http://www.zlib.net/

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #9 on Fri 14 Dec 2007 08:36 PM (UTC)
Message
In Ubuntu you can install it from the package manager:

sudo aptitude install zlib1g-dev

You need the -dev version in order to have the include files and the libraries for compiling. The zlib you installed is probably the runtime stuff for people who don't need to compile.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
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.


28,278 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.