I can't compile ntp-4.2.6 for windows.
I am using Visual Studio 6.0, and i get the following error and
warning :
libntp - Win32 Release
...
decodenetnum.c
D:\MISTRAL-ClientSMDI\ntp\ntp-4.2.6\libntp\decodenetnum.c(25) : error
C2079: 'hints' uses undefined struct 'addrinfo'
...
D:\MISTRAL-ClientSMDI\ntp\ntp-4.2.6\libntp\decodenetnum.c(46) :
warning C4013: 'getaddrinfo' undefined; assuming extern returning int
Can please anybody tell me what is the problem ?
Is the project badly configured ?
Thank you in advance.
I can't help you directly, I wish I could, but if it helps the
read-compiled binaries for Windows are available here:
http://www.davehart.net/ntp/win/x86/
There are quite a few different versions. I'm using:
ntp-4.2.6-win-x86-bin.zip
Cheers,
David
I don't have VC6 to try building with. I can tell you with the
current compiler, struct addrinfo is declared in ws2tcpip.h, which is
included from ports/winnt/include/config.h. I'm guessing you're using
the original SDK components (headers and libs) that came with VC6 and
predate IPv6-related structures and functions like struct addrinfo and
getaddrinfo(). Still, that doesn't quite make sense to me because I
was under the impression Danny Mayer builds NTP on VC6 using the
original VC6-bundled headers and libs successfully.
You could consider downloading and installing the free "express
edition" of VC9/Visual C++ 2008, which I know builds NTP successfully
several times a day for me:
http://www.microsoft.com/Express/VC/
Cheers,
Dave Hart
I really need to have a working ntp from code.
Thank you for trying to help.
I can't use express edition because we have to use VC6 to compile ntp.
But now that I've searched, I can't find the declaration of struct
addrinfo in VC6 headers !!
What should I download to have it declared ? Is there a code that
enables VC6 to support IPv6 ?
What about struct addrinfo definition found in ntp-4.2.6\lib\isc
\win32\netdb.h ?
Thank you in advance
I am curious why you are restricted to such an ancient compiler. It
is deficient in its lack of supporting implicitly converting unsigned
64-bit integers to doubles, causing substantial ugliness in ports/
winnt/ntpd/nt_clockstuff.c. I am looking forward to the day we can
drop support for VC6 from the NTP sources, so please enlighten me on
why that is a problem for you. In particular, I'm having a hard time
inferring why VC++ 2008 EE, or any VS 2003 or later, wouldn't suffice.
> But now that I've searched, I can't find the declaration of struct
> addrinfo in VC6 headers !!
> What should I download to have it declared ? Is there a code that
> enables VC6 to support IPv6 ?
According to http://en.wikipedia.org/wiki/Microsoft_Windows_SDK
"the Windows Server 2003 Platform SDK released in February 2003 was
the last SDK to provide full support of Visual Studio 6.0. Some older
PSDK versions, including the February 2003 SDK can still be downloaded
from the Microsoft Download center [...]"
which links to the 15 (nice) separate downloads comprising that SDK.
I didn't search, there may be a web installer or a way to download
a .iso. The release notes or installation instructions included with
the SDK should tell you how to integrate it with Visual Studio 6. You
could be a bit more adventurous and try a newer SDK and integrate the
headers and libraries manually somehow.
Good luck,
Dave Hart
It is not easy to build NTPD for Windows. That's why the folks at
Meinberg Funkuhren provide a pre-built version
I was wrong about this. ntp_rfc2553.h was already being included. It was
a problem with platform.h in the lib/isc/win32 file which was
unconditionally defining ISC_PLATFORM_HAVEIPV6. However, there were a
number of other bugs which prevented this from being built using the VC6
compiler. I have put in fixes for all these for the next release of the
stable build. I expect them to be in 4.2.6p1-RC3 when that gets
released. See bug items 1448-1450.
Danny
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
questions mailing list
ques...@lists.ntp.org
http://lists.ntp.org/listinfo/questions
Understood.
> But now that I've searched, I can't find the declaration of struct
> addrinfo in VC6 headers !!
> What should I download to have it declared ? Is there a code that
> enables VC6 to support IPv6 ?
> What about struct addrinfo definition found in ntp-4.2.6\lib\isc
> \win32\netdb.h ?
Instead of that, try including ntp_rfc2553.h in decodenetnum.c. That
will define what you need. Make sure that ISC_PLATFORM_HAVEIPV6 is not
defined. Hopefully you can get the getaddrinfo() emulation. You need
that. I will look tomorrow at my VC6 build system.
Danny
--
Hello Danny,
That's great you have fixed those bugs.
But I really can't wait the release of the 4.2.6p1-RC3 to get it
working.
Can you please send me the fixes ?
On the other hand, I can't connect to the bugs list ?
The browser says that "connection is not certified" or something
alike ! (the warning is in french, and I don't know if I've translated
it correctly)
Thank you in advance
I had the same problem. Just add the certificate to those you accept.
How you do that will depend on your browser.
Cheers,
David
I've created a tarball with the pending 4.2.6p1-RC3 fixes already
integrated into ntp-stable, plus Danny's 1448-1450 fixes:
http://davehart.net/ntp/bug1448/ntp-4.2.6p1-RC2-1448-50.tar.gz
Note it will extract into ntp-4.2.6p1-RC2/
Cheers,
Dave Hart
> On the other hand, I can't connect to the bugs list ? The browser says
> that "connection is not certified" or something alike ! (the warning
> is in french, and I don't know if I've translated it correctly)
You need to load our CA's root certificate in your browser. Please visit
http://www.cacert.org/index.php?id=3 to do so.
I've updated http://bugs.ntp.org/ to include this link.
--
Steve Kostecke <kost...@ntp.org>
NTP Public Services Project - http://support.ntp.org/
Or rather the person or organisation that owns the PC should do this.
They may delegate it back to you, but it involves a security policy
decision which most IT departments would not want their users to make
for themselves.