[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  EoD with Cygwin.

EoD with Cygwin.

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


Pages: 1 2  

Posted by Aha McCoy   USA  (11 posts)  [Biography] bio
Date Tue 01 Mar 2005 11:22 PM (UTC)
Message
The error is an a reference error to gethostbyaddr_r....Is there a weay I can bypass this?
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Wed 02 Mar 2005 03:30 AM (UTC)
Message
Ah.... whats the error? Copy the exact error, what version of code are you using, and when is it occuring? Compile? Run time?

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Aha McCoy   USA  (11 posts)  [Biography] bio
Date Reply #2 on Wed 02 Mar 2005 11:42 AM (UTC)
Message
comm.o(.text+0x1030):comm.c: undefined reference to `_gethostbyaddr_r'



I know there's a way to fix it, but I don't remember the way. x.x


The EoD base is the one on MudMagic.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #3 on Wed 02 Mar 2005 04:59 PM (UTC)
Message
Samson already gave you a suggestion of what seems to be the most likely culprit:
Quote:
It doesn't have it because it's entirely possible Cygwin doesn't have the functions the header is declaring. Best bet: disable the backtracing stuff when using Cygwin.
So, you should just disable that part of the code.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Aha McCoy   USA  (11 posts)  [Biography] bio
Date Reply #4 on Wed 02 Mar 2005 05:11 PM (UTC)

Amended on Wed 02 Mar 2005 05:12 PM (UTC) by Aha McCoy

Message
Tried that, it needs to be changed to a certain format, it's not having a BrackTrace error....
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #5 on Wed 02 Mar 2005 05:23 PM (UTC)
Message
Ah... err... no. You could not have tried that because it would have worked. :-)

He did not say it was generating a backtracing error. He said to disable the backtracing which means to comment out the code that does a reverse DNS lookup on incoming connections.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Aha McCoy   USA  (11 posts)  [Biography] bio
Date Reply #6 on Wed 02 Mar 2005 06:54 PM (UTC)

Amended on Wed 02 Mar 2005 07:06 PM (UTC) by Aha McCoy

Message
Uh...........What do I put?



And where?

Edit: grep backtracing *.* showed me nothing at all.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #7 on Wed 02 Mar 2005 08:22 PM (UTC)
Message
As I said:
Quote:
He said to disable the backtracing which means to comment out the code that does a reverse DNS lookup on incoming connections.
The part that does the reverse DNS lookup is precisely the function that is giving you trouble. You should be able to just comment it out and things should work. Probably. :)

You might want to find a codebase for Cygwin specifically, or better yet for Win32 if that's where you're running your code.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Aha McCoy   USA  (11 posts)  [Biography] bio
Date Reply #8 on Wed 02 Mar 2005 09:35 PM (UTC)
Message
What exactly IS the function? x.x
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #9 on Wed 02 Mar 2005 10:02 PM (UTC)
Message
Look at your error message, that tells you what function it is not finding in the link phase. You want to remove the part of code that refers to that function.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Aha McCoy   USA  (11 posts)  [Biography] bio
Date Reply #10 on Wed 02 Mar 2005 10:08 PM (UTC)

Amended on Wed 02 Mar 2005 10:17 PM (UTC) by Aha McCoy

Message
I tried removing it before, but it ****ed up....
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #11 on Wed 02 Mar 2005 10:10 PM (UTC)
Message
Please be more specific and also please mind your language on this public forum.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Aha McCoy   USA  (11 posts)  [Biography] bio
Date Reply #12 on Wed 02 Mar 2005 10:17 PM (UTC)
Message
I'm sorry.....


Can yopu help me make a line fix to it?


There's a sertain line where it'll work....
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #13 on Wed 02 Mar 2005 10:26 PM (UTC)
Message
I don't have the code in front of me so I don't know exactly how to fix it. Could you post the lines surrounding the error?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Aha McCoy   USA  (11 posts)  [Biography] bio
Date Reply #14 on Wed 02 Mar 2005 10:31 PM (UTC)
Message
Well........Here's the function where the error is......:


void lookup_address(DUMMY_ARG *darg)
{
struct hostent *from = 0;
struct hostent ent;
char buf[16384]; // enough ??
int err;

thread_count++;

gethostbyaddr_r( darg->buf, sizeof(darg->buf), AF_INET, &ent, buf, 16384, &from, &err);

if (from && from->h_name)
{
free_string(darg->d->host);
darg->d->host = str_dup(from->h_name);
}

/*
* Brilliant system there Mr. Jobo
*/
darg->d->lookup_status++;

free_string(darg->buf);
darg->status = 0;

thread_count--;

pthread_exit(0);
}
[Go to top] 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.


39,373 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]