It does appear to be from Chrony. Tonight one of our developers appears to
have a solution around the issue, which may be induced by us. Sorry to
waste people's time if that is the case. Details of our findings are posted
below since I first posted here, but will move over to the Chrony project
and flag the issue there.

>From the development team:
So, the string “socket path too” does not exist in any of the linuxptp
sources. This is appears to be strictly a chrony problem. Either I am
missing the correct ./configure incantation, or there is not good support
for cross compiling. Bear in mind that I am not using manpages or
documents, and thus some other elements may also be equally troubled.
Basically, it seems to be using PREFIX wrongly. Typically PREFIX points to
a staging install area which at run time will be replaced with ‘/’. So,
installing files we use $PREFIX, but building code we use ‘/’ since
run-time will be in the target root filesystem. Unfortunately config.h is
built with DEFAULT_COMMAND_SOCKET pointing to the host staging directory.

The config script does not seem to have the ability to separate these 2
ideas:
  1. I am building on a host system, installing to a staging directory, to
deploy on a target system.
  2. I am running on a target system and the staging directory does not
exist, only the run-time filesystem.

The file config.h is modified by ./config based on LOCALSTATEDIR. Here’s
the problem, running make install tries to modify files in LOCALSTATEDIR.
Therefore LOCALSTATEDIR *absolutely must* be my host computers staging
directory.

I have fixed the yocto recipe in this way:
S = "${WORKDIR}/chrony-3.3"
D = "${WORKDIR}/image"
Where ‘workdir’ is
‘/home/sanderson/jethro/mercury/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/chrony/3.3-r0/’
and this is what breaks the bank for the path length of 108 bytes.

Note that this is just a project build folder, and things next get
installed into the image project by Yocto.
There ‘workdir’ there is something like:

‘/home/sanderson/jethro/mercury/tmp/work/mercury-poky-linux-gnueabi/core-image-base/1.0-r0/rootfs/’
But at run-time this all simply becomes ‘/’ when things are on the actual
target system.



do_configure() {

     if [ ! -f Makefile ]

     then

       ./configure --disable-ipv6 --disable-rtc --prefix=${D}
--exec-prefix=${D}/usr \

--localstatedir=${D}/var --datarootdir=${D}/usr/share \

           --chronyrundir=/var/run --chronyvardir=/var/lib

       echo "<<<<< Modifying ${S}/config.h"

       echo "<<<<< to remove ${D}"

          sed -i 's|${D}||g' ${S}/config.h

        fi

}



If I don’t put the ${D} in the configure arguments above, it tries to
install the thing on my local computer – this is not acceptable. However,
on the target system at run-time the whole of ${D} is an empty string.

For my case the only place this seems broken is at creation of config.h
where the run-time localstatedir needs to start after the ${D}. However,
this may be equally broken for those who use other features like docs or
manpages properly.

On Wed, Aug 8, 2018 at 7:43 PM Richard Cochran <richardcoch...@gmail.com>
wrote:

> On Wed, Aug 08, 2018 at 02:47:01PM -0700, Jonathan Hull wrote:
> > Fatal error : Unix socket path too long
>
> That message must be coming from chronyd.  Miroslav?
>
> Thanks,
> Richard
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to