From owner-freebsd-ports@FreeBSD.ORG Sat Mar 21 13:50:34 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A4551AC; Sat, 21 Mar 2015 13:50:34 +0000 (UTC) Received: from hades.sorbs.net (mail.sorbs.net [67.231.146.200]) by mx1.freebsd.org (Postfix) with ESMTP id 64AB68E8; Sat, 21 Mar 2015 13:50:33 +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 <0NLK00A15EOWTE00@hades.sorbs.net>; Sat, 21 Mar 2015 06:55:45 -0700 (PDT) Message-id: <550D7726.1060704@sorbs.net> Date: Sat, 21 Mar 2015 14:50:30 +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: <550D4CA0.8000606@sorbs.net> <550D61BF.3030403@FreeBSD.org> <550D636B.5020000@sorbs.net> <550D6D0F.7080401@FreeBSD.org> In-reply-to: <550D6D0F.7080401@FreeBSD.org> Cc: Jeremie Le Hen , 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: Sat, 21 Mar 2015 13:50:34 -0000 Guido Falsi wrote: > On 03/21/15 13:26, Michelle Sullivan wrote: > >> Guido Falsi wrote: >> >>> On 03/21/15 11:49, Michelle Sullivan wrote: >>> >>> >>>> Jeremie Le Hen wrote: >>>> >>>> >>>>> Actually, I've just realized that I fixed net/unison232 in my local tree :o). >>>>> >>>>> Would you mind submitting it and applying the same for unison240? >>>>> >>>>> Here is the patch: >>>>> >>>>> Index: Makefile >>>>> =================================================================== >>>>> --- Makefile (revision 381259) >>>>> +++ Makefile (working copy) >>>>> @@ -34,20 +34,18 @@ >>>>> >>>>> .include >>>>> >>>>> +BUILD_DEPENDS+= ocamlc:${PORTSDIR}/lang/ocaml >>>>> .if ${PORT_OPTIONS:MX11} >>>>> MAKE_ARGS+= UISTYLE=gtk2 >>>>> PLIST_SUB+= TEXT="" >>>>> -BUILD_DEPENDS+= ocamlc:${PORTSDIR}/lang/ocaml \ >>>>> - lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2 \ >>>>> +BUILD_DEPENDS+= lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2 \ >>>>> icotool:${PORTSDIR}/graphics/icoutils >>>>> RUN_DEPENDS+= lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2 >>>>> PATCH_DEPENDS+= ${BUILD_DEPENDS} >>>>> -CONFLICTS+= ocaml-nox11* >>>>> SUB_FILES+= ${PORTNAME}.desktop >>>>> .else >>>>> MAKE_ARGS+= UISTYLE=text >>>>> PLIST_SUB+= TEXT="@comment " >>>>> -BUILD_DEPENDS+= ocamlc:${PORTSDIR}/lang/ocaml-nox11 >>>>> PATCH_DEPENDS+= ${BUILD_DEPENDS} >>>>> .endif >>>>> >>>>> >>>>> >>>>> >>>> This breaks -nox11 when building with pourdriere... >>>> >>>> =================================================== >>>> ===> Patching for unison-2.48.3_1 >>>> =========================================================================== >>>> =================================================== >>>> ===> unison-2.48.3_1 depends on executable: ocamlc - not found >>>> ===> Verifying install for ocamlc in /usr/ports/lang/ocaml >>>> ===> unison-2.48.3_1 depends on package: >>>> /packages/All/ocaml-4.01.0_4.tbz - not found >>>> ===> USE_PACKAGE_DEPENDS_ONLY set - not building missing dependency >>>> from source >>>> *** [build-depends] Error code 1 >>>> >>>> Stop in /usr/ports/net/unison. >>>> ===> Cleaning for unison-2.48.3_1 >>>> build of /usr/ports/net/unison ended at Sat Mar 21 12:32:36 CET 2015 >>>> >>>> -BUILD_DEPENDS+= ocamlc:${PORTSDIR}/lang/ocaml-nox11 >>>> >>>> should be there in the 'else' section of OPTIONS:MX11 (perhaps as >>>> BUILD_DEPENDS= instead of BUILD_DEPENDS+=) >>>> >>>> >>> Which is almost what the port did, and caused an error about multiple >>> origins, as reported by jlh. >>> >>> I'm willing to find a solution to this, but at this point I need a way >>> to reproduce the problem and really understand where the problem is/was. >>> >>> I do build regularly this port on poudriere in two jails, one with X11 >>> set and one with it unset and never saw this happen. >>> >>> I suspect it happens when there is some misalignment with the X11 option >>> between ports (some with, some wothout), which is perfectly legitimate >>> but makes things difficult to cope with, since the ocaml package changes >>> it's suffix depending on that option. >>> >>> can you send me the full log for the failed build? I'd like to ask the >>> same from jlh if he still has it, so I can understand what is really >>> going on. >>> >>> >> I think the problem comes in when you build with poudriere because when >> you're building without the build will just select the correct options >> and build ocaml appropriately.. The build then continues as ocaml is >> installed. >> > > I have two poudriere jails I use to create package sets for some > machines of mine, one builds packages with the X11 option, the other > without (using OPTIONS_UNSET+=X11 among other options, which ensures all > packages will get the same option, unless overridden per package, which > I'm not doing in this case). > > I've just started those two from scratch for a verification, the one > without X11 just completed successfully building ocaml with correct > pkgname (with -nox11 suffix) and successfully build unison-nox11. I'll > also test these packages at runtime later just to be sure, but I'm > confident they are working correctly. > > But looking at the old logs I see no indication of these problems. I > have an explanation for both cases, I'll check them, but it requires > time for poudriere runs. > > >> When building with poudriere the build_depends looks for the package but >> the package selection process doesn't look for the -nox11 suffix as this >> is set in the makefile of the port and not in the package selection process. >> >> (If I explained that correctly ;-) ) >> > > Not exactly. Let's see (anyone correct me if I'm wrong in the explanation): > > with the port as it was, like this(trimmed): > > .if ${PORT_OPTIONS:MX11} > BUILD_DEPENDS+= ocamlc:${PORTSDIR}/lang/ocaml > .else > BUILD_DEPENDS+= ocamlc:${PORTSDIR}/lang/ocaml-nox11 > .endif > > poudriere will see the port with a variable origin, depending on the X11 > option. If in the same poudriere run there is any other port which > depends on ocaml, but with a different origin (which is quite possible, > maybe some other port without an X11 option, which unconditionally > depends on ${PORTSDIR}/lang/ocaml) poudriere will notice this and report > conflicting origins. > > This is the problem jlh was seeing. I never noticed it since ocaml is > the only port depending on ocaml I ever build. > > The only solution to this one is not having a variable origin. > > Changing that to a fixed DEPENDS as the port is now, poudriere will look > into the ocaml port to discover it's pkg name, the x11 suffix for the > pkg filename isn't derived from the depends, but from the depended port > Makefile, so poudriere should in fact try to build the ocaml port with > the required pkgname automatically, named depending on the X11 option. > > This leads me to think there is some misalignment of the X11 option in > your setup, that's why I asked for the full log of the failed build, I > need to check the environment. > > >> Your package build initially was correct. I believe pkgng is wrong - >> either that or the whole build system needs to be updated so that the >> package installation looks at the set options and makefiles when >> deciding which package to find and install. Personally I thing ocaml >> (and similar) should not have the -nox11 options in the package name and >> should just install as a dependency.... but I expect that will cause >> other issues even more weird and wonderful. >> > > -nox11 as a suffix is quite common and compiled in defaults are a > documented use for PKGNAMESUFFIX, so I can't criticize that. > > Anyway poudriere uses the port build system to create dependency lists > and it does look inside the port Makefiles. Again, I suspect you are > building ocaml with X11 enabled and unison with X11 disabled. I'm not > sure I know a correct way to make it work. > > It will anyway generate a conflicting package set, since ocaml and > ocaml-nox11 conflict with each other. > > Having a variable origin for a port isn't a solution... The generated > packages would anyway have conflicts between them, which is a > consequence of the problem jlh reported. > > I'm doing some testing but if you could provide me the build log of the > failed unison build it would help. > > You maybe right .. somehow I have a misaligned make.conf for 93amd64 vs 93i386 (everything built without error until 93i386) root@93i386:~ # more /usr/local/etc/poudriere.d/93amd64-make.conf NO_WARNING_PKG_INSTALL_EOL=yes WITH_MODPERL2=yes OPTIONS_UNSET=X11 NLS DEFAULT_VERSIONS+=apache=2.2 TEX_DEFAULT=tetex root@93i386:~ # more /usr/local/etc/poudriere.d/93i386-make.conf NO_WARNING_PKG_INSTALL_EOL=yes WITH_MODPERL2=yes OPTIONS_UNSET=NLS DEFAULT_VERSIONS+=apache=2.2 perl5=5.16 PERL5_DEFAULT=5.16 TEX_DEFAULT=tetex WITH_NEW_MESA=yes root@93i386:~ # more /usr/local/etc/poudriere.d/93i386-options/net_unison/options # This file is auto-generated by 'make config'. # Options for unison-2.40.102_3 _OPTIONS_READ=unison-2.40.102_3 _FILE_COMPLETE_OPTIONS_LIST=DOCS X11 OPTIONS_FILE_UNSET+=DOCS OPTIONS_FILE_UNSET+=X11 Which means that if unsetting X11 on in the port and not globally ocaml is built with X11 and unison without - which poudriere will fail on when it tries to find the dependencies... which means my thoughts were exactly the opposite ... poudriere scans the dependency tree on startup which picks up the -nox11 package as a dependency then builds with x11 when it builds ocaml... Michelle -- Michelle Sullivan http://www.mhix.org/