From owner-freebsd-ports@freebsd.org Tue Jun 13 12:05:09 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4605ABF2868 for ; Tue, 13 Jun 2017 12:05:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 262CA79038 for ; Tue, 13 Jun 2017 12:05:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 22C02BF2867; Tue, 13 Jun 2017 12:05:09 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2274EBF2865 for ; Tue, 13 Jun 2017 12:05:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACB4979034 for ; Tue, 13 Jun 2017 12:05:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v5DC4w5Y023522 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 13 Jun 2017 15:04:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v5DC4w5Y023522 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v5DC4weY023521; Tue, 13 Jun 2017 15:04:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 13 Jun 2017 15:04:58 +0300 From: Konstantin Belousov To: Jov Cc: FreeBSD Ports Mailing List Subject: Re: problem about port need /proc to build Message-ID: <20170613120458.GW2088@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2017 12:05:09 -0000 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/255953740813414433eceedc99c2bef3c3f6e307/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.