Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ntp-4.2.6 doesn't compile for Windows

68 views
Skip to first unread message

Hassan

unread,
Dec 31, 2009, 10:47:42 AM12/31/09
to
Hello everybody,

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.


David J Taylor

unread,
Dec 31, 2009, 11:06:24 AM12/31/09
to
"Hassan" <> wrote in message
news:cce8a7cb-d63b-4f10...@p8g2000yqb.googlegroups.com...

> Hello everybody,
>
> I can't compile ntp-4.2.6 for windows.
[]
> 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

Dave Hart

unread,
Dec 31, 2009, 11:42:29 AM12/31/09
to
On Dec 31, 15:47 UTC, Hassan wrote:
> 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

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

Hassan

unread,
Dec 31, 2009, 1:45:37 PM12/31/09
to
On Dec 31, 4:06 pm, "David J Taylor" <david-tay...@blueyonder.delete-

I really need to have a working ntp from code.
Thank you for trying to help.

Hassan

unread,
Dec 31, 2009, 2:00:16 PM12/31/09
to

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

Dave Hart

unread,
Dec 31, 2009, 2:38:14 PM12/31/09
to Hassan
On Dec 31, 19:00 UTC, Hassan wrote:
> I can't use express edition because we have to use VC6 to compile ntp.

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

Richard B. Gilbert

unread,
Dec 31, 2009, 6:47:07 PM12/31/09
to

It is not easy to build NTPD for Windows. That's why the folks at
Meinberg Funkuhren provide a pre-built version

Danny Mayer

unread,
Jan 2, 2010, 2:12:43 PM1/2/10
to
Danny Mayer wrote:

> Hassan wrote:
>> On Dec 31, 4:42 pm, Dave Hart <daveh...@gmail.com> wrote:
>>> On Dec 31, 15:47 UTC, Hassan wrote:
>>>
>>>> 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
>> I can't use express edition because we have to use VC6 to compile ntp.
>>
>
> 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
>

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

Danny Mayer

unread,
Dec 31, 2009, 10:39:57 PM12/31/09
to
Hassan wrote:
> On Dec 31, 4:42 pm, Dave Hart <daveh...@gmail.com> wrote:
>> On Dec 31, 15:47 UTC, Hassan wrote:
>>
>>> 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
> I can't use express edition because we have to use VC6 to compile ntp.
>

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

--

Hassan

unread,
Jan 4, 2010, 5:21:44 AM1/4/10
to
> questi...@lists.ntp.orghttp://lists.ntp.org/listinfo/questions

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

David J Taylor

unread,
Jan 4, 2010, 5:51:01 AM1/4/10
to
"Hassan" <hbdi...@gmail.com> wrote in message
news:6cbc9a0c-400a-4e35...@a15g2000yqm.googlegroups.com...
[]

> 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

Dave Hart

unread,
Jan 4, 2010, 8:22:50 AM1/4/10
to Hassan
On Jan 4, 10:21 UTC, Hassan wrote:
> 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 ?

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

Steve Kostecke

unread,
Jan 4, 2010, 11:20:49 AM1/4/10
to
On 2010-01-04, Hassan <hbdi...@gmail.com> wrote:

> 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/

David Woolley

unread,
Jan 4, 2010, 4:49:08 PM1/4/10
to
Steve Kostecke wrote:
>
> 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.
>

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.

0 new messages