public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ntp-dev-4.2.5p235-RC build failure: MOD_NANO not #defined
@ 2009-10-20 18:38 James Cloos
  2009-10-20 19:27 ` [ntp:hackers] " Dave Hart
  0 siblings, 1 reply; 7+ messages in thread
From: James Cloos @ 2009-10-20 18:38 UTC (permalink / raw)
  To: hackers, linux-kernel; +Cc: Roman Zippel, Thomas Gleixner, john stultz

I get this when trying to build the 235 RC:

make[1]: Entering directory `.../work/ntp-dev-4.2.5p235-RC/ntpd'
if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I..  -I../include -I../lib/isc/include -I../lib/isc/nothreads/include -I../lib/isc/unix/include -I../libopts -I/usr/include  -march=pentium3 -O2 -Wno-error   -Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Winit-self -Wstrict-overflow -Wno-strict-prototypes -MT ntp_loopfilter.o -MD -MP -MF ".deps/ntp_loopfilter.Tpo" -c -o ntp_loopfilter.o ntp_loopfilter.c; \
        then mv -f ".deps/ntp_loopfilter.Tpo" ".deps/ntp_loopfilter.Po"; else rm -f ".deps/ntp_loopfilter.Tpo"; exit 1; fi
ntp_loopfilter.c: In function 'local_clock':
ntp_loopfilter.c:521: error: 'MOD_NANO' undeclared (first use in this function)
ntp_loopfilter.c:521: error: (Each undeclared identifier is reported only once
ntp_loopfilter.c:521: error: for each function it appears in.)
make[1]: *** [ntp_loopfilter.o] Error 1
make[1]: Leaving directory `.../work/ntp-dev-4.2.5p235-RC/ntpd'
make: *** [all] Error 2

In ntp_loopfilter.c, MOD_NANO is protected w/in an #ifdef STA_NANO.

I find STA_NANO #defined in <linux/timex.h>, but I cannot find a
definition for MOD_NANO anywhere.

That said, <linux/timex.h> does #define several MOD_ defines in a block
called /* xntp 3.4 compatibility names */ to match the ADJ_ defines;
it #defines ADJ_NANO, but does not include a MOD_NANO #define in that
compatability block.

Also, my <sys/timex.h> (from glibc-2.10.1) says:

sys/timex.h> /* These definitions from linux/timex.h as of 2.6.30.  */


Should ntp_loopfilter.c be using ADJ_NANO instead of MOD_NANO?

Or should timex.h #define MOD_NANO ADJ_NANO?

All of the additions to linux/timex.h since 2.6.30 then are protected
within an #ifdef __KERNEL__ and would, therefore, make no difference.

(In case it is an lk issue, I've included lkml and (following lkml style)
my best guess at the relevant CCs; in case it is an ntpd issue it is also
sent to the ntp hackers list; I do not know whether the latter list
requires subscription to post....)

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ntp:hackers] ntp-dev-4.2.5p235-RC build failure: MOD_NANO not  #defined
  2009-10-20 18:38 ntp-dev-4.2.5p235-RC build failure: MOD_NANO not #defined James Cloos
@ 2009-10-20 19:27 ` Dave Hart
  2009-10-20 20:45   ` john stultz
  0 siblings, 1 reply; 7+ messages in thread
From: Dave Hart @ 2009-10-20 19:27 UTC (permalink / raw)
  To: James Cloos
  Cc: hackers, linux-kernel, Roman Zippel, john stultz, Thomas Gleixner

Please see:

https://support.ntp.org/bugs/show_bug.cgi?id=1219

which points the finger at the Linux header and has a reference to:

https://bugzilla.redhat.com/show_bug.cgi?id=505566

titled: timex.h: #define MOD_NANO ADJ_NANO missing

Cheers,
Dave Hart

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ntp:hackers] ntp-dev-4.2.5p235-RC build failure: MOD_NANO not  #defined
  2009-10-20 19:27 ` [ntp:hackers] " Dave Hart
@ 2009-10-20 20:45   ` john stultz
  2009-10-20 23:22     ` James Cloos
  0 siblings, 1 reply; 7+ messages in thread
From: john stultz @ 2009-10-20 20:45 UTC (permalink / raw)
  To: davehart_gmail_exchange_tee
  Cc: James Cloos, hackers, linux-kernel, Roman Zippel, Thomas Gleixner

On Tue, Oct 20, 2009 at 12:27 PM, Dave Hart <davehart@gmail.com> wrote:
> Please see:
>
> https://support.ntp.org/bugs/show_bug.cgi?id=1219
>
> which points the finger at the Linux header and has a reference to:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=505566
>
> titled: timex.h: #define MOD_NANO ADJ_NANO missing

The kernel has already been fixed, but glibc still needs to pick up the change.

See the kernel commit here:
http://git.kernel.org/?p=linux/kernel/git/tip/linux-2.6-tip.git;a=commitdiff;h=c95b4502ad7fe8f3b9954aec794b00ac0046ab3a

thanks
-john

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ntp:hackers] ntp-dev-4.2.5p235-RC build failure: MOD_NANO not  #defined
  2009-10-20 20:45   ` john stultz
@ 2009-10-20 23:22     ` James Cloos
  2009-10-21  0:43       ` john stultz
  0 siblings, 1 reply; 7+ messages in thread
From: James Cloos @ 2009-10-20 23:22 UTC (permalink / raw)
  To: john stultz
  Cc: davehart_gmail_exchange_tee, hackers, linux-kernel, Roman Zippel,
	Thomas Gleixner

>>>>> "john" == john stultz <johnstul@us.ibm.com> writes:

john> The kernel has already been fixed, but glibc still needs to pick up the change.
john> See the kernel commit here:
john> http://git.kernel.org/?p=linux/kernel/git/tip/linux-2.6-tip.git;a=commitdiff;h=c95b4502ad7fe8f3b9954aec794b00ac0046ab3a

Ah.  I only looked in my (up to date) clone of Linus’ tree; I didn’t
check the trees-to-pull.

Will that be part of a pull request for the current rc or only for the
next merge window?

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ntp:hackers] ntp-dev-4.2.5p235-RC build failure: MOD_NANO not #defined
  2009-10-20 23:22     ` James Cloos
@ 2009-10-21  0:43       ` john stultz
  2009-10-21 23:03         ` Reg Clemens
  0 siblings, 1 reply; 7+ messages in thread
From: john stultz @ 2009-10-21  0:43 UTC (permalink / raw)
  To: James Cloos
  Cc: davehart_gmail_exchange_tee, hackers, linux-kernel, Roman Zippel,
	Thomas Gleixner

On Tue, 2009-10-20 at 19:22 -0400, James Cloos wrote:
> >>>>> "john" == john stultz <johnstul@us.ibm.com> writes:
> 
> john> The kernel has already been fixed, but glibc still needs to pick up the change.
> john> See the kernel commit here:
> john> http://git.kernel.org/?p=linux/kernel/git/tip/linux-2.6-tip.git;a=commitdiff;h=c95b4502ad7fe8f3b9954aec794b00ac0046ab3a
> 
> Ah.  I only looked in my (up to date) clone of Linus’ tree; I didn’t
> check the trees-to-pull.

Huh. I guess I was mistaken and had mixed up my bookmarks. You're right,
I thought it was already upstream, but I've been looking at the wrong
tree. The patch is not yet in mainline.

> Will that be part of a pull request for the current rc or only for the
> next merge window?

Ingo, any eta on when commit c95b4502ad7fe8f3b9954aec794b00ac0046ab3a
will be pushed? Not sure how it got missed this last cycle.

thanks
-john



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ntp:hackers] ntp-dev-4.2.5p235-RC build failure: MOD_NANO not  #defined
  2009-10-21  0:43       ` john stultz
@ 2009-10-21 23:03         ` Reg Clemens
  2009-10-22  1:58           ` Harlan Stenn
  0 siblings, 1 reply; 7+ messages in thread
From: Reg Clemens @ 2009-10-21 23:03 UTC (permalink / raw)
  To: john stultz
  Cc: James Cloos, davehart_gmail_exchange_tee, hackers, linux-kernel,
	Roman Zippel, Thomas Gleixner, reg


Isnt it just time to get rid of these MOD_ constructs in ntp?

A quick find/grep of the code shows that there are only 7 usages left
in the ntpd main line.

There are 2 in tickadj.

There are 15 in ntptime.

It would take less time to change these to the STA_*** forms than
to see this question ever come up again.

-- 
                                        Reg.Clemens
                                        reg@dwf.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ntp:hackers] ntp-dev-4.2.5p235-RC build failure: MOD_NANO not #defined
  2009-10-21 23:03         ` Reg Clemens
@ 2009-10-22  1:58           ` Harlan Stenn
  0 siblings, 0 replies; 7+ messages in thread
From: Harlan Stenn @ 2009-10-22  1:58 UTC (permalink / raw)
  To: Reg Clemens
  Cc: john stultz, hackers, davehart_gmail_exchange_tee, Roman Zippel,
	linux-kernel, reg, Thomas Gleixner

> Isnt it just time to get rid of these MOD_ constructs in ntp?

Could be, but the spec says:

/*
 * The following defines and structures define the user interface for
 * the ntp_gettime() and ntp_adjtime() syscalls.
 *
 * Control mode codes (timex.modes)
 */
#define MOD_OFFSET	0x0001	/* set time offset */
#define MOD_FREQUENCY	0x0002	/* set frequency offset */
#define MOD_MAXERROR	0x0004	/* set maximum time error */
#define MOD_ESTERROR	0x0008	/* set estimated time error */
#define MOD_STATUS	0x0010	/* set clock status bits */
#define MOD_TIMECONST	0x0020	/* set PLL time constant */
#define MOD_PPSMAX	0x0040	/* set PPS maximum averaging time */
#define MOD_TAI		0x0080	/* set TAI offset */
#define	MOD_MICRO	0x1000	/* select microsecond resolution */
#define	MOD_NANO	0x2000	/* select nanosecond resolution */
#define MOD_CLKB	0x4000	/* select clock B */
#define MOD_CLKA	0x8000	/* select clock A */

/*
 * Status codes (timex.status)
 */
#define STA_PLL		0x0001	/* enable PLL updates (rw) */
#define STA_PPSFREQ	0x0002	/* enable PPS freq discipline (rw) */
#define STA_PPSTIME	0x0004	/* enable PPS time discipline (rw) */
#define STA_FLL		0x0008	/* enable FLL mode (rw) */
#define STA_INS		0x0010	/* insert leap (rw) */
#define STA_DEL		0x0020	/* delete leap (rw) */
#define STA_UNSYNC	0x0040	/* clock unsynchronized (rw) */
#define STA_FREQHOLD	0x0080	/* hold frequency (rw) */
#define STA_PPSSIGNAL	0x0100	/* PPS signal present (ro) */
#define STA_PPSJITTER	0x0200	/* PPS signal jitter exceeded (ro) */
#define STA_PPSWANDER	0x0400	/* PPS signal wander exceeded (ro) */
#define STA_PPSERROR	0x0800	/* PPS signal calibration error (ro) */
#define STA_CLOCKERR	0x1000	/* clock hardware fault (ro) */
#define STA_NANO	0x2000	/* resolution (0 = us, 1 = ns) (ro) */
#define STA_MODE	0x4000	/* mode (0 = PLL, 1 = FLL) (ro) */
#define STA_CLK		0x8000	/* clock source (0 = A, 1 = B) (ro) */

H

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-10-22  2:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 18:38 ntp-dev-4.2.5p235-RC build failure: MOD_NANO not #defined James Cloos
2009-10-20 19:27 ` [ntp:hackers] " Dave Hart
2009-10-20 20:45   ` john stultz
2009-10-20 23:22     ` James Cloos
2009-10-21  0:43       ` john stultz
2009-10-21 23:03         ` Reg Clemens
2009-10-22  1:58           ` Harlan Stenn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox