From owner-freebsd-ports@freebsd.org Tue Jun 13 12:17:39 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 1848ABF2E86 for ; Tue, 13 Jun 2017 12:17:39 +0000 (UTC) (envelope-from amutu@amutu.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id E2268799A4 for ; Tue, 13 Jun 2017 12:17:38 +0000 (UTC) (envelope-from amutu@amutu.com) Received: by mailman.ysv.freebsd.org (Postfix) id E1662BF2E85; Tue, 13 Jun 2017 12:17:38 +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 E0DCBBF2E83 for ; Tue, 13 Jun 2017 12:17:38 +0000 (UTC) (envelope-from amutu@amutu.com) Received: from mail-oi0-x231.google.com (mail-oi0-x231.google.com [IPv6:2607:f8b0:4003:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A719C799A3 for ; Tue, 13 Jun 2017 12:17:38 +0000 (UTC) (envelope-from amutu@amutu.com) Received: by mail-oi0-x231.google.com with SMTP id k145so59732753oih.3 for ; Tue, 13 Jun 2017 05:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amutu-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KXm7r77OZSCpa4e3O3/gfPkHOlGezzEW3fpbTzeyy7o=; b=lXmfq7W1zoZ5yn7YKHHlPsDhN43J7TcEknqH2FvPGPnXE+XZWf9sxg5nXvXfr0GVia f9fpMkWAYYF69iSJRzVTW2KIEhfKzEJSqieUANDcZxFbrAgJwx1Nberxc6bGAklSzEiL P9YFJTN8cmnI3JgGEebHnT9UXa+xHLnpGlHj1yf4qAPp7/5B3Kw4D0Cgl5VLXx+P1xnM Vg5vulltESguVMdVDVzEm5fnLY/y+SQrkvl261TbvzouyIIBGE93pD64C2T1Oi2dQiPM 8+jTrE5TkE9lOJ+dgDybqoo09U3Y5bxgE4y1LBXKfrLpvPCEd7yL3DwwZIZIAUqvFgvA 3QyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=KXm7r77OZSCpa4e3O3/gfPkHOlGezzEW3fpbTzeyy7o=; b=LkP2Bu382FYulA2dxx9raDoml10mn5FIMtDu3DEyWK9tWqS1qApBmDK6UHIN6PltuT ljOOl2gFDw6MRyYZ+j85Xfihb8VjarRUuru7t9f2/iXzcJij50nbuBmSHFNenoi4M3iM QJS/st5YQn1zRMT/1ssH5RVhCHuADbeLNcWuPbHkRp/Xcm99n1w307ZuDo0Kjy7+p15f Ruf+NaU9LmbzHPxuEhWeydwadJ92Wi+4MHLYhvYwAGLgLoq5ZKK2tVLD5yn57ROaufDX pBCB3pOt6A+IaHaGgaoITd3Ez34vf7dD+2HhlA3A1UvTOhDO6Z/VlhbtWjKBX+4Udd9h nFIQ== X-Gm-Message-State: AODbwcDjUvntxnoDp9me35HLRKvJlP42qwXl9pLI3x2e1XWtPULEXSXF DNeCTwSoLoUd9K0fag5zWQ== X-Received: by 10.202.87.84 with SMTP id l81mr21498990oib.216.1497356257862; Tue, 13 Jun 2017 05:17:37 -0700 (PDT) Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com. [209.85.218.47]) by smtp.gmail.com with ESMTPSA id d96sm6472020otb.18.2017.06.13.05.17.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 05:17:37 -0700 (PDT) Received: by mail-oi0-f47.google.com with SMTP id s3so68394963oia.0 for ; Tue, 13 Jun 2017 05:17:37 -0700 (PDT) X-Received: by 10.202.83.133 with SMTP id h127mr5024620oib.135.1497356257028; Tue, 13 Jun 2017 05:17:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.133.136 with HTTP; Tue, 13 Jun 2017 05:17:16 -0700 (PDT) In-Reply-To: <20170613120458.GW2088@kib.kiev.ua> References: <20170613120458.GW2088@kib.kiev.ua> From: Jov Date: Tue, 13 Jun 2017 20:17:16 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: problem about port need /proc to build To: Konstantin Belousov Cc: FreeBSD Ports Mailing List Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:17:39 -0000 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 : > 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. >