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
➜ Setting up/Running Cygwin
|
Setting up/Running Cygwin
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
3
| Posted by
| Colin Barnette
USA (49 posts) Bio
|
| Date
| Tue 15 Apr 2003 08:44 PM (UTC) |
| Message
| I was wondering if you could either help me with running cygwin. I beleive I install it correctly, but, I just don't know how to run it. I can get into bash by just runnning the exe, but, I don't think this is the correct way to do it. I look on the cygwin website, but, I can't find any information for the super newbie.
There is the cygwin.bat that I run out of the main cygwin folder, but I get an error saying it couldn't find /tmp though there is a tmp folder.
Perhaps you could give a intall/running tutorial for cygwin?
Thanks! | | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #1 on Tue 15 Apr 2003 09:26 PM (UTC) |
| Message
| If you're able to get to a bash prompt, you're well on your way to running a mud on Cygwin.
Start by reading this post:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=688
If you're going to want to compile using Cygwin, then you'll need to install 'make' and 'gcc' which by my understanding isn't installed by default. Check that psot for more info. After that's done, you should have a working cygwin setup.
Next, check this out:
http://www.gammon.com.au/smaug/howtocompile.htm
The particular section you really want to look at is the "How about an example?" section. Though, being a "super-newbie" as you put it, you may just want to read the whole thing first. Any questions, comments or concerns you know where to go ;-)
I don't think the /tmp error is much of a problem honestly. Though, reinstalling Cygwin may clear it up. | | Top |
|
| Posted by
| Colin Barnette
USA (49 posts) Bio
|
| Date
| Reply #2 on Wed 16 Apr 2003 01:56 AM (UTC) |
| Message
| Thanks Boborak for your help but, I think it is a little misaligned. I know how to compile. It's just that I'm not sure I set cygwin up correctly. I'm not logging in to bash or anything and I believe I should be doing so. Also, I tried just compiling and I get a bunch of missing header file errors.
Sorry for the length here.
Do you have to have the smaug source in a cygwin folder?
bash-2.05b$ make
make smaug
make.exe[1]: Entering directory `f:/smaug/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG comm.c
comm.c:58:26: sys/socket.h: No such file or directory (ENOENT)
comm.c:60:32: netinet/in_systm.h: No such file or directory (ENOENT)
comm.c:61:26: netinet/ip.h: No such file or directory (ENOENT)
comm.c:62:25: arpa/inet.h: No such file or directory (ENOENT)
comm.c:63:27: arpa/telnet.h: No such file or directory (ENOENT)
comm.c:64:21: netdb.h: No such file or directory (ENOENT)
comm.c:72: `IAC' undeclared here (not in a function)
comm.c:72: initializer element is not constant
comm.c:72: (near initialization for `echo_off_str[0]')
comm.c:72: `WILL' undeclared here (not in a function)
comm.c:72: initializer element is not constant
comm.c:72: (near initialization for `echo_off_str[1]')
comm.c:72: `TELOPT_ECHO' undeclared here (not in a function)
comm.c:72: initializer element is not constant
comm.c:72: (near initialization for `echo_off_str[2]')
comm.c:73: `IAC' undeclared here (not in a function)
comm.c:73: initializer element is not constant
comm.c:73: (near initialization for `echo_on_str[0]')
comm.c:73: `WONT' undeclared here (not in a function)
comm.c:73: initializer element is not constant
comm.c:73: (near initialization for `echo_on_str[1]')
comm.c:73: `TELOPT_ECHO' undeclared here (not in a function)
comm.c:73: initializer element is not constant
comm.c:73: (near initialization for `echo_on_str[2]')
comm.c:74: `IAC' undeclared here (not in a function)
comm.c:74: initializer element is not constant
comm.c:74: (near initialization for `go_ahead_str[0]')
comm.c:74: `GA' undeclared here (not in a function)
comm.c:74: initializer element is not constant
comm.c:74: (near initialization for `go_ahead_str[1]')
comm.c: In function `init_socket':
comm.c:350: storage size of `sa' isn't known
comm.c:357: warning: implicit declaration of function `socket'
comm.c:357: `AF_INET' undeclared (first use in this function)
comm.c:357: (Each undeclared identifier is reported only once
comm.c:357: for each function it appears in.)
comm.c:357: `SOCK_STREAM' undeclared (first use in this function)
comm.c:363: warning: implicit declaration of function `setsockopt'
comm.c:363: `SOL_SOCKET' undeclared (first use in this function)
comm.c:363: `SO_REUSEADDR' undeclared (first use in this function)
comm.c:392: warning: implicit declaration of function `bind'
comm.c:399: warning: implicit declaration of function `listen'
comm.c:350: warning: unused variable `sa'
comm.c: In function `new_descriptor':
comm.c:792: storage size of `sock' isn't known
comm.c:809: warning: implicit declaration of function `accept'
comm.c:832: `O_NDELAY' undeclared (first use in this function)
comm.c:857: warning: implicit declaration of function `inet_ntoa'
comm.c:857: warning: passing arg 2 of `strcpy' makes pointer from integer withou
t a cast
comm.c:865: warning: implicit declaration of function `gethostbyaddr'
comm.c:866: `AF_INET' undeclared (first use in this function)
comm.c:866: warning: assignment makes pointer from integer without a cast
comm.c:867: dereferencing pointer to incomplete type
comm.c:792: warning: unused variable `sock'
comm.c: In function `read_from_descriptor':
comm.c:1093: warning: implicit declaration of function `recv'
comm.c:1111: `EWOULDBLOCK' undeclared (first use in this function)
comm.c: In function `write_to_descriptor':
comm.c:1414: warning: implicit declaration of function `send'
comm.c: In function `nanny':
comm.c:1663: warning: implicit declaration of function `crypt'
comm.c:1663: warning: passing arg 1 of `strcmp' makes pointer from integer witho
ut a cast
comm.c:1750: warning: assignment makes pointer from integer without a cast
comm.c:1771: warning: passing arg 1 of `strcmp' makes pointer from integer witho
ut a cast
make.exe[1]: *** [comm.o] Error 1
make.exe[1]: Leaving directory `f:/smaug/dist/src'
make.exe: *** [all] Error 2
Thanks for the help. | | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #3 on Wed 16 Apr 2003 09:52 PM (UTC) Amended on Wed 16 Apr 2003 11:32 PM (UTC) by Boborak
|
| Message
| err.. If you're not 'logging in' to bash then how are you compiling? ;-P There is no 'login' to bash, bash is simply a shell, a command interface if you will. If you can start cygwin and you can type 'make' and you get output like you have, then Cygwin should be good to go.
Now for the errors you're getting... I don't use Cygwin (prefer the real stuff) but I believe to use 'make' properly, your 'working directory' (the directory you're in) needs to be in the Cygwin directory structure.
My reccomendation is to take your f:/smaug/ directory and move it to C:\cygwin\home\username\
Where C:\cygwin\ is your cygwin install dir and \username\ is a username of your choice.
That SHOULD clear up the majority of your errors. You also need to edit the Makefile and add -DNOCRYPT. There may be a line with -DNOCRYPT, that is commented out already (in which you uncomment it) or you can just add it alongside the spot that has -DSMAUG. You could also get rid of -Wuninitialized if you wish. It won't affect your compile at all. It's a bit redundant actually.. with -Wall included. | | Top |
|
| Posted by
| Colin Barnette
USA (49 posts) Bio
|
| Date
| Reply #4 on Thu 17 Apr 2003 03:11 AM (UTC) |
| Message
| Still same errors. Here's what I did to try and fix.
F:\cygwin2 is my base dir.
I created home folder and home/colin/.
I put the smaug folder inside of /colin.
The folder hierarchy for the src folder is now:
F:\cygwin2\home\colin\smaug\dist\src\.
Should this work? | | Top |
|
| Posted by
| Colin Barnette
USA (49 posts) Bio
|
| Date
| Reply #5 on Thu 17 Apr 2003 03:12 AM (UTC) |
| Message
| | Ah, also. Where do I put the -DNOCRYPT in the makefile? | | Top |
|
| Posted by
| Colin Barnette
USA (49 posts) Bio
|
| Date
| Reply #6 on Thu 17 Apr 2003 03:31 AM (UTC) |
| Message
| Ok I have searched the forum and I got rid of all my crypt errors and re_exec things. But now comm.c is giving me the most problems.
This file is still looking for the header files in the wrong places yet it seems like the other files can find them fine. Whats up?
[code]
comm.c:58:26: sys/socket.h: No such file or directory (ENOENT)
comm.c:60:32: netinet/in_systm.h: No such file or directory (ENOENT)
comm.c:61:26: netinet/ip.h: No such file or directory (ENOENT)
comm.c:62:25: arpa/inet.h: No such file or directory (ENOENT)
comm.c:63:27: arpa/telnet.h: No such file or directory (ENOENT)
comm.c:64:21: netdb.h: No such file or directory (ENOENT)
comm.c:72: `IAC' undeclared here (not in a function)
comm.c:72: initializer element is not constant
comm.c:72: (near initialization for `echo_off_str[0]')
comm.c:72: `WILL' undeclared here (not in a function)
comm.c:72: initializer element is not constant
comm.c:72: (near initialization for `echo_off_str[1]')
comm.c:72: `TELOPT_ECHO' undeclared here (not in a function)
comm.c:72: initializer element is not constant
comm.c:72: (near initialization for `echo_off_str[2]')
comm.c:73: `IAC' undeclared here (not in a function)
comm.c:73: initializer element is not constant
comm.c:73: (near initialization for `echo_on_str[0]')
comm.c:73: `WONT' undeclared here (not in a function)
comm.c:73: initializer element is not constant
comm.c:73: (near initialization for `echo_on_str[1]')
comm.c:73: `TELOPT_ECHO' undeclared here (not in a function)
comm.c:73: initializer element is not constant
comm.c:73: (near initialization for `echo_on_str[2]')
comm.c:74: `IAC' undeclared here (not in a function)
comm.c:74: initializer element is not constant
comm.c:74: (near initialization for `go_ahead_str[0]')
comm.c:74: `GA' undeclared here (not in a function)
comm.c:74: initializer element is not constant
comm.c:74: (near initialization for `go_ahead_str[1]')
comm.c: In function `init_socket':
comm.c:350: storage size of `sa' isn't known
comm.c:357: warning: implicit declaration of function `socket'
comm.c:357: `AF_INET' undeclared (first use in this function)
comm.c:357: (Each undeclared identifier is reported only once
comm.c:357: for each function it appears in.)
comm.c:357: `SOCK_STREAM' undeclared (first use in this function)
comm.c:363: warning: implicit declaration of function `setsockopt'
comm.c:363: `SOL_SOCKET' undeclared (first use in this function)
comm.c:363: `SO_REUSEADDR' undeclared (first use in this function)
comm.c:392: warning: implicit declaration of function `bind'
comm.c:399: warning: implicit declaration of function `listen'
comm.c:350: warning: unused variable `sa'
comm.c: In function `new_descriptor':
comm.c:792: storage size of `sock' isn't known
comm.c:809: warning: implicit declaration of function `accept'
comm.c:832: `O_NDELAY' undeclared (first use in this function)
comm.c:857: warning: implicit declaration of function `inet_ntoa'
comm.c:857: warning: passing arg 2 of `strcpy' makes pointer from integer withou
t a cast
comm.c:865: warning: implicit declaration of function `gethostbyaddr'
comm.c:866: `AF_INET' undeclared (first use in this function)
comm.c:866: warning: assignment makes pointer from integer without a cast
comm.c:867: dereferencing pointer to incomplete type
comm.c:792: warning: unused variable `sock'
comm.c: In function `read_from_descriptor':
comm.c:1093: warning: implicit declaration of function `recv'
comm.c:1111: `EWOULDBLOCK' undeclared (first use in this function)
comm.c: In function `write_to_descriptor':
comm.c:1414: warning: implicit declaration of function `send'
comm.c: In function `nanny':
comm.c:1663: warning: implicit declaration of function `crypt'
comm.c:1663: warning: passing arg 1 of `strcmp' makes pointer from integer witho
ut a cast
comm.c:1750: warning: assignment makes pointer from integer without a cast
comm.c:1771: warning: passing arg 1 of `strcmp' makes pointer from integer witho
ut a cast
make.exe[1]: *** [comm.o] Error 1
make.exe[1]: Leaving directory `f:/Cygwin2/home/colin/dist/src'
make.exe: *** [all] Error 2
:\ | | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #7 on Thu 17 Apr 2003 03:34 AM (UTC) |
| Message
| | Hmm. The errors you're getting are from gcc not being able to find system includes. Take a look in cygwin\usr\include\ and see if you have a folder named \arpa\ | | Top |
|
| Posted by
| Colin Barnette
USA (49 posts) Bio
|
| Date
| Reply #8 on Thu 17 Apr 2003 03:36 AM (UTC) |
| Message
| Hrm ok, I added a #define WIN32 and that removed all the headerfile problems. I still get a bunch of warnings but, this is the only error:
comm.c:255: parse error before "wsadata"
Here's the code in the file where wsadata is found only, but, I can't find the parse error. =\
#ifdef WIN32
{
/* Initialise Windows sockets library */
unsigned short wVersionRequested = MAKEWORD(1, 1);
WSADATA wsadata;
int err;
/* Need to include library: wsock32.lib for Windows Sockets */
err = WSAStartup(wVersionRequested, &wsadata);
if (err)
{
fprintf(stderr, "Error %i on WSAStartup\n", err);
exit(1);
}
/* standard termination signals */
signal(SIGINT, (void *) bailout);
signal(SIGTERM, (void *) bailout);
}
#endif /* WIN32 */
| | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #9 on Thu 17 Apr 2003 03:52 AM (UTC) |
| Message
| Hmm. The problem with setting #define WIN32 is that you're compiling stuff meant for a Windows native environment into a Unix type of environment. Cygwin is a Unix type of environment and you're asking for trouble by compiling with that configuration.
The WSDATA stuff is WinSock related and I try my best to stay away from it ;-P I don't see anything wrong with that bit of code right off hand. But I also don't know what type of data WSDATA is suppose to be or what MAKEWORD is. | | Top |
|
| Posted by
| Colin Barnette
USA (49 posts) Bio
|
| Date
| Reply #10 on Thu 17 Apr 2003 03:54 AM (UTC) |
| Message
| | Do you know how I can include a library into my compile though? | | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #11 on Thu 17 Apr 2003 04:07 AM (UTC) |
| Message
| Sure. But a library isn't going to fix your syntax error.
Add '-lwsock32' to your library variable. Look for something called $L_FLAGS= or $LIBS= or $LIBINCLUDES= | | Top |
|
| Posted by
| Colin Barnette
USA (49 posts) Bio
|
| Date
| Reply #12 on Thu 17 Apr 2003 04:08 AM (UTC) |
| Message
| | What file do I add that in? comm.c or the makefile? | | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #13 on Thu 17 Apr 2003 04:17 AM (UTC) |
| Message
| Heh. Makefile
Anyway.. goodluck. I need sleep. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #14 on Thu 17 Apr 2003 07:16 AM (UTC) |
| Message
| I think you are mixing systems here. The WIN32 stuff with the WSA prefix is for the Windows Socket Architecture, however it is not needed for Cygwin. You would use it with MS Visual C++.
If putting that in made most of the errors go away it seems you are on the right track. One thing to do would be to take a closer look at what the #if's are doing near the start. What might work would be to #define unix, for instance. |
- 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.
105,031 views.
This is page 1, subject is 3 pages long: 1 2
3
It is now over 60 days since the last post. This thread is closed.
Refresh page
top