Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Building net-misc/ntp with useflag "parse-clocks"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Stilzchen
n00b
n00b


Joined: 24 Mar 2005
Posts: 70
Location: Beelen

PostPosted: Sat Aug 31, 2019 7:59 am    Post subject: Building net-misc/ntp with useflag "parse-clocks" Reply with quote

Hi,

I migrate my server based on an SolidRun CuBox-i4Pro from Debian to Gentoo.

The server has a local refclock connected. Its a Expert mouseCLOCK USB v2.0 which is fully supported by ntp. And to be able to use that I must build net-misc/ntp with the useflag "parse-clocks".
Without this useflag the refclock is invalid, as I can see in the logfile
Code:

refclock_newpeer: clock type 8 invalid


But Portage let me don't build the ntp package with useflag "parse-clocks"
Code:

USE="parse-clocks" emerge -av ntp

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] net-misc/ntp-4.2.8_p13::gentoo  USE="ipv6 readline ssl threads -caps -debug -libressl -openntpd (-parse-clocks) -samba (-selinux) -snmp -vim-syntax -zeroconf" 0 KiB

Useflag is in brackets and not enabled.

For a test I build net-misc/ntp with parse-clocks support on a x86_64 maschine (my desktop pc) and enabled the refclock with success.

What is needed to enable the useflag at the arm box?

My ntp.conf:
Code:

driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp
logconfig =all
statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

server 127.127.1.0
fudge 127.127.1.0 stratum 10

# DCF77 - Expert mouseCLOCK USB II
server 127.127.8.0 mode 19

# NTP-Server im Internet
server 3.de.pool.ntp.org iburst minpoll 13 maxpoll 15

restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

restrict 127.0.0.1 10.13.37.254
restrict ::1
broadcast 10.13.37.255


My emerge --info:
Code:

root@gaia:~]# emerge --info
Portage 2.3.69 (python 3.6.5-final-0, default/linux/arm/17.0/armv7a, gcc-7.3.0, glibc-2.29-r2, 4.19.66-gentoo armv7l)
=================================================================
System uname: Linux-4.19.66-gentoo-armv7l-ARMv7_Processor_rev_10_-v7l-with-gentoo-2.6
KiB Mem:     2055660 total,    219768 free
KiB Swap:    4428792 total,   2901404 free
Timestamp of repository gentoo: Fri, 30 Aug 2019 20:30:34 +0000
Head commit of repository gentoo: 1b622cf26193181ad5d8255eb63f44e99a5d630d

Head commit of repository sakaki-tools: 0a6d1b558a8bf4100f0a682542359d160778c112

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.14.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

sakaki-tools
    location: /usr/local/portage/sakaki-tools
    sync-type: git
    sync-uri: https://github.com/sakaki-/sakaki-tools.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="@FREE"
CBUILD="armv7a-unknown-linux-gnueabihf"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
CHOST="armv7a-unknown-linux-gnueabihf"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j1 --load-average=3.95"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="https://ftp.fau.de/gentoo https://mirror.netcologne.de/gentoo/ https://ftp.halifax.rwth-aachen.de/gentoo/ https://ftp.snt.utwente.nl/pub/os/linux/gentoo https://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1 -l3.95"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl arm armv5te armv6 armv6t2 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 mysql ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode vhosts xattr zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 vfp" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Regards,
Stilzchen


Last edited by Stilzchen on Sat Aug 31, 2019 7:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Mistwolf
Apprentice
Apprentice


Joined: 07 Mar 2007
Posts: 189
Location: Edmonton, AB

PostPosted: Sat Aug 31, 2019 3:37 pm    Post subject: Reply with quote

parse-clocks USE flag requires net-misc/pps-tools.
Code:
parse-clocks? ( net-misc/pps-tools )


pps-tools is not available in stable arm.

Code:
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="6"

inherit toolchain-funcs

DESCRIPTION="User-space tools for LinuxPPS"
HOMEPAGE="https://github.com/redlab-i/pps-tools"
SRC_URI="https://github.com/redlab-i/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
IUSE=""
Back to top
View user's profile Send private message
Stilzchen
n00b
n00b


Joined: 24 Mar 2005
Posts: 70
Location: Beelen

PostPosted: Sat Aug 31, 2019 4:19 pm    Post subject: Reply with quote

A very old version is available in the arm portage tree (0.0.20120407).
I tried with this one and also I enabled the newest version 1.0.2 by writing a package.accept_keywords file. For testing I also enabled the ~arm keyword for ntp itself.

Code:

root@gaia:~]# cat /etc/portage/package.accept_keywords/ntp
net-misc/pps-tools ~arm
net-misc/ntp ~arm


I tried all combinations between ntp-4.2.8_p13 and ntp-4.2.8_p13-r2 with pps-tools-0.0.20120407 and pps-tools-1.0.2.
Same results.

At my x86_64 maschine I had ntp-4.2.8_p13 and pps-tools-1.0.2 working.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21725

PostPosted: Sat Aug 31, 2019 4:24 pm    Post subject: Reply with quote

The flag is use-masked:
Code:
# grep -B2 -r parse-clocks /usr/portage/profiles/arch/base/package.use.mask
# Robin H. Johnson <robbat2@gentoo.org> (2011-07-10)
# PPS should work on all arches, but only keyworded on amd64/x86
>=net-misc/ntp-4.2.6_p3-r1 parse-clocks
You must override this mask locally if you want to enable that flag on an architecture where the developers have not unmasked it for you.
Back to top
View user's profile Send private message
Stilzchen
n00b
n00b


Joined: 24 Mar 2005
Posts: 70
Location: Beelen

PostPosted: Sat Aug 31, 2019 7:08 pm    Post subject: Reply with quote

Yes, that's it.
I overwrite this global setting and then I build ntp successfully with parse-clocks useflags. And with that useflag my refclock is working very well!

I will

  • mark this thread as closed
  • contact the arm maintainers that this useflag is nessessary


And after 14 year using Gentoo I have to learn more about package.env.

Thanks a lot,
Stilzchen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum