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
➜ Dawn of Time
➜ Installing/compiling the server
➜ Weird error messages from cygwin.
Weird error messages from cygwin.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Samael
(4 posts) Bio
|
Date
| Fri 04 May 2007 03:03 AM (UTC) Amended on Fri 04 May 2007 03:10 AM (UTC) by Samael
|
Message
| Hello, For some reason I get this really weird error messages when I try and compile under cygwin. I have windows XP service pack 2 with Dawn 1.60q I think is the latest one. and I get this weird error message every time:
Samael@samael-l5if2k3z ~/dawn/src
$ make
g++ -c -Wall -g -O connect.cpp -o obj/connect.o
connect.cpp: In member function `void connection_data::close_socket()':
connect.cpp:215: error: expected `)' before '{' token
make: *** [connect.o] Error 1
Here is the section of code it dealing with:
/**************************************************************************/
// close the actual socket attached to a connection structure
void connection_data::close_socket()
{
logf("Closing socket %d", connected_socket);
#ifdef __CYGWIN__
// a hack to make cygwin shutdown sockets after a hotreboot
// cygwin still appears to be leaking endpoints according to
// processexplorer from sysinternals, but this atleast gets
// the socket to disconnect.
if(shutdown(connected_socket, 2)!=0
{
logf("error %d calling shutdown on socket %d.", errno, connected_socket);
}
#endif
if (closesocket(connected_socket )!=0)){
socket_error(FORMATF("connection_data::close_socket(): error calling closesocket() on socket %d",connected_socket));
}
connected_socket=0;
}
I already tried adding another ( but it just gives another error message:
Samael@samael-l5if2k3z ~/dawn/src
$ make
g++ -c -Wall -g -O connect.cpp -o obj/connect.o
connect.cpp: In member function `void connection_data::close_socket()':
connect.cpp:219: error: expected primary-expression before ')' token
connect.cpp:219: error: expected `;' before ')' token
make: *** [connect.o] Error 1
I don't know whats wrong but I'd really appreciate the help if anyone knows the answer. | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Fri 04 May 2007 03:33 AM (UTC) |
Message
| if(shutdown(connected_socket, 2)!=0
Should be
if(shutdown(connected_socket, 2)!=0)
Is this really stock DoT? I don't see how this got released in a public build. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Fri 04 May 2007 04:17 AM (UTC) |
Message
| Maybe he never compiled it under Cygwin. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #3 on Fri 04 May 2007 04:21 AM (UTC) |
Message
| I don't see how a missing parenthesis would compile anywhere. :P |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #4 on Fri 04 May 2007 04:50 AM (UTC) |
Message
| It has:
#ifdef __CYGWIN__
blah blah
#endif
If the #if condition is not met, then the code inside is not considered for compilation. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #5 on Fri 04 May 2007 04:57 AM (UTC) Amended on Fri 04 May 2007 04:58 AM (UTC) by Zeno
|
Message
| |
Posted by
| Ixliam
(5 posts) Bio
|
Date
| Reply #6 on Tue 22 May 2007 03:53 PM (UTC) |
Message
| The DOT website is now back online at dawnoftime.org. I am working on bringing it back up to full capacity. | Top |
|
Posted by
| Samael
(4 posts) Bio
|
Date
| Reply #7 on Sat 26 May 2007 02:50 PM (UTC) |
Message
| Sorry it took me this long to respond but I've been busy lately. But Zeno was right the once I added the missing parenthesis connect.cpp compiled correctly. Then it reached dawnstat.cpp and I hit a couple more errors. This is a brand new download of Dawn of Time. The compiler looks like this:
g++ -c -Wall -g -O dawnstat.cpp -o obj/dawnstat.o
dawnstat.cpp: In function `void dawnstat_initiate_connection()':
dawnstat.cpp:334: error: aggregate `addrinfo hints' has incomplete type and cann
ot be defined
dawnstat.cpp:335: error: invalid application of `sizeof' to incomplete type `add
rinfo'
dawnstat.cpp:336: error: `AI_NUMERICHOST' undeclared (first use this function)
dawnstat.cpp:336: error: (Each undeclared identifier is reported only once for e
ach function it appears in.)
dawnstat.cpp:338: error: `AF_INET6' undeclared (first use this function)
dawnstat.cpp:344: error: `freeaddrinfo' undeclared (first use this function)
dawnstat.cpp:348: error: `getaddrinfo' undeclared (first use this function)
dawnstat.cpp:369: error: `gai_strerror' undeclared (first use this function)
dawnstat.cpp:409: error: invalid use of undefined type `struct addrinfo'
dawnstat.cpp:63: error: forward declaration of `struct addrinfo'
dawnstat.cpp:409: error: invalid use of undefined type `struct addrinfo'
dawnstat.cpp:63: error: forward declaration of `struct addrinfo'
dawnstat.cpp:409: error: invalid use of undefined type `struct addrinfo'
dawnstat.cpp:63: error: forward declaration of `struct addrinfo'
dawnstat.cpp:439: error: invalid use of undefined type `struct addrinfo'
dawnstat.cpp:63: error: forward declaration of `struct addrinfo'
dawnstat.cpp:439: error: invalid use of undefined type `struct addrinfo'
dawnstat.cpp:63: error: forward declaration of `struct addrinfo'
dawnstat.cpp: In function `void dawnstat_process_connect()':
dawnstat.cpp:537: error: invalid use of undefined type `struct addrinfo'
dawnstat.cpp:63: error: forward declaration of `struct addrinfo'
dawnstat.cpp:537: error: invalid use of undefined type `struct addrinfo'
dawnstat.cpp:63: error: forward declaration of `struct addrinfo'
make: *** [dawnstat.o] Error 1
I kinda got lost because I assume something was missing but I wasn't sure where.
The area it refers is this:
#ifdef IPV6_SUPPORT_ENABLED
struct addrinfo hints;
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_flags=AI_NUMERICHOST; // we have an ip address
if(addr->ipv6){
hints.ai_family = AF_INET6;
}else{
hints.ai_family = AF_INET;
}
hints.ai_socktype = SOCK_STREAM;
if(res){
freeaddrinfo(res);
res=NULL;
}
int r = getaddrinfo(addr->address, // ip address in text form
"80", &hints, &res);
// check that it was converted successfully
if (r) {
#ifdef WIN32
if(r==WSAHOST_NOT_FOUND){
dawnstat_logf("getaddrinfo error %d - couldn't convert '%s' to a valid ip address.",
r, addr->address);
}else if(r==WSAEAFNOSUPPORT && addr->ipv6){
dawnstat_logf("\n"
"getaddrinfo error %d - couldn't convert '%s' to a valid ip address\n"
" - getaddrinfo reported this system has no support for the AF_INET6 address family.\n"
" This error message is normal if this system doesn't support ipv6, as it\n"
" was an ipv6 address getaddrinfo() was asked to convert.",
r, addr->address);
}else{
dawnstat_logf("dawnstat_initiate_connection(): getaddrinfo(%s) error %d",
addr->address, r);
}
#else
{
dawnstat_logf("dawnstat_initiate_connection(): getaddrinfo(%s) error %d - '%s'",
addr->address, r, gai_strerror(r));
Thanks for the help, if you need more info I can provide, just ask. | Top |
|
Posted by
| Nexela
USA (14 posts) Bio
|
Date
| Reply #8 on Sat 26 May 2007 06:14 PM (UTC) |
Message
| In addition to the first fix I believe you have to disable the IPV6 support to get DOT to compile in cygwin.
in wincfg.h or similar comment out #define WIN32_IPV6 or some such.. |
wait! wait! I didnt want to format! | Top |
|
Posted by
| Samael
(4 posts) Bio
|
Date
| Reply #9 on Mon 28 May 2007 12:13 AM (UTC) Amended on Mon 28 May 2007 12:16 AM (UTC) by Samael
|
Message
| The thing is, it's already commented out in that file.
/*
* IPV6 support - to enable uncomment the following define.
* note: this will automatically turn on WIN32_USE_WINSOCK2 in include.h
* and requires the IPv6 headers within the development environment.
*/
//#define WIN32_IPV6
#endif //WINCFG_H
Thanks for the help, but that won't work. And if I go to command line and do this:
C:\Documents and Settings\Samael>ipv6 uninstall
IPv6 is not installed.
Succeeded.
Any help is appreciated. | Top |
|
Posted by
| Nexela
USA (14 posts) Bio
|
Date
| Reply #10 on Mon 28 May 2007 08:59 PM (UTC) |
Message
| Your lucky day, I found a cache of the dawn of time cygwin getting started guide, someone might wanna repost and sticky this.
19:36 03/02/2004 - Kal
--- Notes for compiling and getting started with Dawn 1.69r on Cygwin ---
1. Download the src from http://www.dawnoftime.org/download/dawn1.69r-src.tgz
2. Download the support files from http://www.dawnoftime.org/download/dawn1.69r-support.tgz
3. use tar to uncompress both files (tar -xzvf dawn1.69r-*.tgz)
4. change into the src/configure directory (cd dawn1.69/src/configure)
5. run the configure script (./configure)
6. change into the src directory (cd ..)
7. edit config.h, removing the line at the bottom which reads "#define IPV6_SUPPORT_ENABLED"
8. edit connect.cpp, go around line 218.
9. change the text which reads
"if(shutdown(connected_socket, 2)!=0{" for:
"if(shutdown(connected_socket, 2)!=0){" (insert the extra ')' directly before the '{').
10. use make to compile the code
11. change into the parent directory (cd ..)
12. start dawn in create directories mode (./dawn --createdirs)
13. start dawn normally (./dawn)
note: The manual editing of config.h and connect.cpp will not be required in Dawn1.69s. |
wait! wait! I didnt want to format! | Top |
|
Posted by
| Samael
(4 posts) Bio
|
Date
| Reply #11 on Tue 29 May 2007 02:05 AM (UTC) Amended on Tue 29 May 2007 03:13 AM (UTC) by Samael
|
Message
| Thank you so much Nexela, your a lifesaver!!!
Would someone tell Ixliam that the register function for the DoT forums isn't working correctly.
I also got this strange error message. Didn't seem to affect the compile just wonder what it was.
g++ -c -Wall -g -O map.cpp -o obj/map.o
map.cpp: In function `void do_map(char_data*, char*)':
map.cpp:766: warning: right-hand operand of comma has no effect
map.cpp:768: warning: right-hand operand of comma has no effect
I'm pretty sure it isn't serious though. so yeah. Thanks for the help. You guys rock.
Oh there seems to be on small bug somewhere. After I created my first character it game me the 'Hit Return to Continue' message.
Quote:
If this is a new mud which you have just started up and have just created a
player which you want to convert into an administrative character (commonly
called an immortal) read 'help NEWMUD-GETTING-IMP' for further details.
[Hit Return to continue]
After the first one I got a blank space so I thought it was finifhed. I clicked on the NEWMUD-GETTING-IMP link, and the mud crashed. Apparently you have to click/hit enter twice but that's not much of a big deal. Anyway, Peace. | Top |
|
Posted by
| Nexela
USA (14 posts) Bio
|
Date
| Reply #12 on Tue 29 May 2007 04:13 AM (UTC) |
Message
| remove just the ,range part from both lines 766 and 768 to fix the warnings |
wait! wait! I didnt want to format! | 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.
40,855 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top