From owner-freebsd-ports@FreeBSD.ORG Thu Mar 26 11:59:08 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BE7F4AB; Thu, 26 Mar 2015 11:59:08 +0000 (UTC) Received: from hades.sorbs.net (mail.sorbs.net [67.231.146.200]) by mx1.freebsd.org (Postfix) with ESMTP id 035EBBF8; Thu, 26 Mar 2015 11:59:07 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from isux.com (firewall.isux.com [213.165.190.213]) by hades.sorbs.net (Oracle Communications Messaging Server 7.0.5.29.0 64bit (built Jul 9 2013)) with ESMTPSA id <0NLT002BMIV84W00@hades.sorbs.net>; Thu, 26 Mar 2015 05:04:23 -0700 (PDT) Message-id: <5513F487.4040105@sorbs.net> Date: Thu, 26 Mar 2015 12:59:03 +0100 From: Michelle Sullivan User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.24) Gecko/20100301 SeaMonkey/1.1.19 To: Guido Falsi Subject: Re: net/unison240 depends on lang/ocaml-nox11 References: <5507555C.7030508@FreeBSD.org> <5507F80F.70609@FreeBSD.org> <55080F30.9010104@FreeBSD.org> <550B65A1.9080402@apeiron.net> <550DAD30.4080905@FreeBSD.org> <550DB13D.7020005@apeiron.net> <550DB247.2050800@FreeBSD.org> <20150326022129.GA7814@apeiron.net> <5513E5AD.8050103@FreeBSD.org> In-reply-to: <5513E5AD.8050103@FreeBSD.org> Cc: Jeremie Le Hen , Geoffrey Mainland , freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 11:59:08 -0000 Guido Falsi wrote: > On 03/26/15 03:21, Geoffrey Mainland wrote: > >> On Sat, Mar 21, 2015 at 07:02:47PM +0100, Guido Falsi wrote: >> >>> On 03/21/15 18:58, Geoffrey Mainland wrote: >>> >>>> On 3/21/15 10:41 AM, Guido Falsi wrote: >>>> If you still think there is no difference, I will send you full build >>>> logs both with and without the patch. >>>> >>> I'd need the logs anyway, since I don't know what the cause of the error >>> you are seeing is. >>> >>> I also need to know if in the same poudriere run you were building any >>> other port depending on ocaml. >>> >> Poudriere logs are posted here: >> >> https://zeno.apeiron.net/unison/test1/ >> >> With the config at the above link, poudriere won't even start a build >> as it complains (rightly) about dependency conflicts. >> >> Removing lang/ocaml-nox11 from test.pklist gets the build to start, >> but it ultimately fails because I have OPTIONS_UNSET=X11 in the >> make.conf. You can see the logs from this failed poudriere build here: >> >> https://zeno.apeiron.net/poudriere/build.html?mastername=test-9-amd64-git&build=2015-03-25_22h09m00s >> >> The successful poudriere build, with the above patch to unison, is here: >> >> https://zeno.apeiron.net/poudriere/build.html?mastername=test-9-amd64-git&build=2015-03-25_21h34m02s >> >> I would like a way to have ocaml and unison, both X11-free, as I am >> running on a headless machine. That used to be possible, and still is >> if I patch unison as shown above. >> > > Looking at this data I'd say you are trying to use an incorrect config: > > You don't need to specify both the unison-nox11 port and the ocaml-nox11 > port in the list of ports to be built. > > Having OPTIONS_UNSET=X11 in make.conf you could ask for just net/unison > and poudriere, respecting the OPTIONS_UNSET will build both unison and > ocaml without any X11 support. In such a case you'd have a unison > package, not stating it is not supporting X11 but in fact it will have > no X11 binaries (this can be verified by looking into the package, which > is just a txz archive) > > You can also request poudriere to build only net/unison-nox11, in such a > case you end up with both packages with "-nox11" in their name. I think > this is the best choice. > > you could also request poudriere to build both net/unison-nox11 and > lang/ocaml and get the exact same result, but it is redundant, poudriere > will anyway build ocaml from lang/ocaml, respecting the OPTIONS_USET. > > I can't apply your patch which would bring the port to be semantically > the same as before my last modification, because it would break another > legitimate and use, which is if you build any other port in the same run > which asks for unison-nox11(which requires lang/ocaml-nox11 with your > patch) and at the same time compiles some other ports depending on > lang/ocaml. This would ensue a duplicate origin error, with no > workaround for the user. > > You can see this situation as a limitation of the framework, if you > like, but while there is an easy solution for you (just ask poudriere to > build only unison-nox11 with OPTIONS_UNSET=X11 in make.conf and it will > build and keep updated both unison-nox11 and ocaml-nox11), there is no > solution for the duplicate origin, unless other ports are modified, > which could also break even more things. > > You know thinking about it - the problem is in poudriere - or more of the way it builds depends, and that could be the way the ports framework thinks about things... and possibly pkg.. My thoughts about the fix would be to have poudriere pick up the options when installing pre-built depends and specifically with the global 'unset' (which conflicts with the default 'set') have poudriere and/or ports check for both ocaml and ocaml-noxll.... or on build pick up the options of what is being depended upon... or remove the -nox11 suffix completely (which would likely cause more issues.) unison shouldn't care which version of ocaml is installed.. unless X11 is 'on' in which case ocaml needs to be compiled with X11 as well. eg: ocaml + unison = OK ocaml-nox11 + unison = NOT OK ocmal + unison-nox11 = OK ocmal-nox11 + unison-nox11 = OK Now poudriere sees the global and local X11 unset options when computing deps and builds as specified in the options, but doesn't account for unison-nox11 wanting ocaml-nox11 but ocaml is ok... The solution (if possible) would seem to be tell unison that without X11 being set both ocaml and ocaml-nox11 are valid dependencies and either are needed... Of course that means the pkg manager needs to know this as well... which neither pkg nor pkg_* can do.... though if in poudriere both can be built so who cares? The solution then would seem to be to get unison to request the dependency of ocaml-nox11 if X11 is unset in unison and building in poudriere (can this be detected?).. or that the risk that no-one would be stupid to ocaml-nox11 + unison (which a conflict of ocaml-nox11* should solve) and therefore just test for ocaml is installed by filesystem test and not via pkg test when building without X11.... which would seem to be the solution to all of the above.... unless I'm missing something. The other solution for may just be to patch the ocaml Makefile from: OPTIONS_DEFAULT=X11 TK THREADS to OPTIONS_DEFAULT?=X11 TK THREADS Which if I understand the param correctly will change from always set the defaults to X11 TK THREADS to set the defaults if there is no previous config. Michelle -- Michelle Sullivan http://www.mhix.org/