Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jun 2017 20:17:16 +0800
From:      Jov <amutu@amutu.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        FreeBSD Ports Mailing List <ports@freebsd.org>
Subject:   Re: problem about port need /proc to build
Message-ID:  <CADyrUxNSgcCwnuiLARtfCoxpTNU9VZMY78E8cxayFW0X9HLpWA@mail.gmail.com>
In-Reply-To: <20170613120458.GW2088@kib.kiev.ua>
References:  <CADyrUxPyFRpstE1ZNvBnGgEHMPN=cffuEgNt4vryWy0kOi-3NA@mail.gmail.com> <20170613120458.GW2088@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
It is not the NEW PORT need /proc, it is the tool used to build the port
need /proc, which is bazel.And I know the /proc is not the way FreeBSD to
do it and I really do not like it.

Anyway ,I submitted a patch to bazel to use procstat_getpathname replace
the /proc method: https://github.com/bazelbuild/bazel/pull/3179

2017-06-13 20:04 GMT+08:00 Konstantin Belousov <kostikbel@gmail.com>:

> On Tue, Jun 13, 2017 at 06:57:40PM +0800, Jov wrote:
> > Hi ports hackers,
> >
> > I am porting tensorflow to FreeBSD, It uses bazel to manage the
> > dependencies and do the build.The port work now is mostly done (see:
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219609,I have local
> patch
> > to fix the network need for do-configure) except one problem which I am
> not
> > sure. So I write this mail to ask.
> >
> > The problem is bazel use /proc to locate its binary when start,
> > see:
> > https://github.com/bazelbuild/bazel/blob/255953740813414433eceedc99c2be
> f3c3f6e307/src/main/cpp/blaze_util_freebsd.cc
> > :
> > string GetSelfPath() {
> > char buffer[PATH_MAX] = {};
> > ssize_t bytes = readlink("/proc/curproc/file", buffer, sizeof(buffer));
> > if (bytes == sizeof(buffer)) {
> > // symlink contents truncated
> > bytes = -1;
> > errno = ENAMETOOLONG;
> > }
> > I am not sure this is acceptable for FreeBSD ports.I now set
> USE_PROCFS=yes
> > for poudriere and it can pass the testport.
> >
> > If port needs /proc is not acceptable, I will patch devel/bazel to use
> > sysctl get its binary path.
>
> It is not a question about being acceptable or not to use /proc, but
> about user convenience.  FreeBSD does not automatically configure
> procfs mount and base utilities function without procfs.  As result,
> users typically do not need it.
>
> If your port adds dependency on procfs, then it also adds requirements on
> the machine configuration and some inconvenience to its users.  Some
> programs cannot function without procfs, e.g. jvm.  But if it can be
> trivially avoided, it is better to avoid.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADyrUxNSgcCwnuiLARtfCoxpTNU9VZMY78E8cxayFW0X9HLpWA>