NTPD Meinberg support

demo

demo
Hallo,

ich habe da so meine Probleme eine Meinberg DCF 77 C51 Funkuhr unter FreeBSD 5.3 ProdRel anzusprechen.

Da der Support fuer diese Uhr scheinbar nicht beim configure des Ports angegeben wurde, weiß ich nun nicht, wie ich dem Port /usr/ports/net/ntp das -enable-MEINBERG beibringen kann!

Das Kompilieren das ntpd's from the scratch funktioniert leider unter BSD auch nicht so recht und bricht beim make ab.

ungefähr so
root# make
"Makefile", line 675: warning: invalid syntax: .warning:
make: don't know how to make .warning. Stop

das kann man dann überall rausschmeißen und er kompiliert etwas weiter, aber die Problem wollen nicht enden.

Möglicherweise hat das ja schonmal jemand hinbekommen.
 
MrFixit schrieb:


Gute Idee. Danke
damit bleiben dann die Fehlermeldungen 675 weg und er fängt an zu kompilieren. Dann kommt die mir auch schon bekannte Fehlermeldung

ntpdc.c: In function `openhost':
ntpdc.c:452: error: `EAI_NODATA' undeclared (first use in this function)
ntpdc.c:452: error: (Each undeclared identifier is reported only once
ntpdc.c:452: error: for each function it appears in.)
gmake[3]: *** [ntpdc.o] Error 1
gmake[3]: Leaving directory `/home/ntpd/ntpd_neu/ntp-4.2.0/ntpdc'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/ntpd/ntpd_neu/ntp-4.2.0/ntpdc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/ntpd/ntpd_neu/ntp-4.2.0'
gmake: *** [all] Error 2

welche ich folgendermaßen zu beheben versuchte:

root# grep -r EAI_NODATA /usr/include/
/usr/include/lwres/netdb.h:#undef EAI_NODATA
/usr/include/lwres/netdb.h:#define EAI_NODATA 7 /* no address associated with hostname */
/usr/include/netdb.h:#define EAI_NODATA 7 /* no address associated with hostname */
/usr/include/heim_err.h: HEIM_EAI_NODATA = -1980176505,
/usr/include/roken-common.h:#define EAI_NODATA 7 /* no address associated with nodename */

vi ntpdc/ntpdc.h

folgende Zeile eingefügt
#include "lwres/netdb.h"

danach wird wieder weiterkompiliert bis zu folgender Fehlermeldung

env CSET=`cat ../version` ../scripts/mkver ntpdc
Version <ntpdc 4.2.0@1.1161-r Fri Jun 10 08:57:51 CEST 2005 (1)>
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I/usr/include -g -O2 -Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -c version.c
gcc -g -O2 -Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -L/usr/lib -o ntpdc ntpdc.o ntpdc_ops.o version.o ../libntp/libntp.a -lreadline -lmd -lkvm
ntpdc.o(.text+0x27f): In function `openhost':
/home/ntpd/ntpd_neu/ntp-4.2.0/ntpdc/ntpdc.c:451: undefined reference to `lwres_getaddrinfo'
ntpdc.o(.text+0x3fd):/home/ntpd/ntpd_neu/ntp-4.2.0/ntpdc/ntpdc.c:465: undefined reference to `lwres_gai_strerror'
ntpdc.o(.text+0x435):/home/ntpd/ntpd_neu/ntp-4.2.0/ntpdc/ntpdc.c:457: undefined reference to `lwres_getaddrinfo'
ntpdc.o(.text+0x45c):/home/ntpd/ntpd_neu/ntp-4.2.0/ntpdc/ntpdc.c:462: undefined reference to `lwres_getaddrinfo'
ntpdc.o(.text+0xad5): In function `docmd':
/home/ntpd/ntpd_neu/ntp-4.2.0/ntpdc/ntpdc.c:1407: undefined reference to `lwres_getaddrinfo'
gmake[3]: *** [ntpdc] Error 1
gmake[3]: Leaving directory `/home/ntpd/ntpd_neu/ntp-4.2.0/ntpdc'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/ntpd/ntpd_neu/ntp-4.2.0/ntpdc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/ntpd/ntpd_neu/ntp-4.2.0'
gmake: *** [all] Error 2

:confused:
naja, das geht jetzt langsam ins eingemachte ...
Da werde ich ntp wohl doch auf HP Solaris oder Linux aktivieren müssen. Da macht der Dienst keine Probleme und läßt sich einfach so kompilieren ;'(
... auch wenn mir das wiederstrebt
 
demo schrieb:
Da der Support fuer diese Uhr scheinbar nicht beim configure des Ports angegeben wurde, weiß ich nun nicht, wie ich dem Port /usr/ports/net/ntp das -enable-MEINBERG beibringen kann!
schau dir doch mal das makefile an. da gibt's doch so konstrukte wie
Code:
.if defined(ENABLE_RAWDCF)
CONFIGURE_ARGS+=	--enable-RAWDCF
.endif
ich wuerde daraus schliessen, dass eine einfache unabhaengige zeile mit CONFIGURE_ARGS+=--enable-MEINBERG bereits funktioniert.
 
Diese Idee war noch besser.
Es hat funktioniert. Der Support für die Uhr ist da :-)


Ich hatte sowas ursprünglich in dieser Weise Versucht
vi /usr/src/usr.sbin/ntp/config.h
#define CLOCK_MEINBERG 1

das blieb allerdings ohne weiteren Erfolg. Da gab es dann irgendwelche Abhängigkeiten!

Vielen Dank nochmal!
 
Zurück
Oben