tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: RFC: distbb for cross-compiling packages
Our discussion stopped about two months ago but I'd like to revive it
again because the problem has not been resolved yet. In short, I think
we discussed two related but different problems.
1) The first one is API provided by pkgsrc for cross builds and bulk
build tools.
2) The second is the way how packagers separate build host and target
platform dependencies.
> I read your patch:
...
> It seems the essence is to add a new variable TARGET_BUILD_DEPENDS,
> and to set that variable instead of BUILD_DEPENDS from blink
> statements. Then, dependencies via BUILD_DEPENDS are dropped from the
> list of dependencies, because TARGET_BUILD_DEPENDS is used instead of
> BUILD_DEPENDS.
Yes, this is correct. Just a minor addition. Dependencies from
BUILD_DEPENDS are dropped from target host deps and added to build host
dependencies.
> So that would put us in a situation where an implied BUILD_DEPENDS in
> e.g. devel/boost-headers:
> BUILDLINK_DEPMETHOD.boost-headers?= build
> would get turned into TARGET_BUILD_DEPENDS.
> But a BUILD_DEPENDS in a Makefile would be dropped as a package
> dependency, but perhaps required on the host?
My patch works correctly for this package,
boost-heast is marked a a target dependency.
I'm not sure about devel/boost-jam, though.
0 ~>_GCC_VERSION=4.5 USE_CROSS_COMPILE=yes pkg_src_summary \
-f 'PKGNAME PKGPATH DEPENDS TARGET_BUILD_DEPENDS BUILD_DEPENDS' \
devel/boost-libs | pkg_summary4view
-----------------------------------------------------------
PKGNAME: boost-libs-1.48.0nb2
PKGPATH: devel/boost-libs
TARGET_BUILD_DEPENDS:
boost-headers-1.48.*:../../devel/boost-headers
boost-jam-1.48.*:../../devel/boost-jam
BUILD_DEPENDS: checkperms>=1.1:../../sysutils/checkperms
0 0 ~>pkg_src_summary \
-f 'PKGNAME PKGPATH DEPENDS TARGET_BUILD_DEPENDS BUILD_DEPENDS' \
devel/boost-libs | pkg_summary4view
-----------------------------------------------------------
PKGNAME: boost-libs-1.48.0nb2
PKGPATH: devel/boost-libs
BUILD_DEPENDS: boost-headers-1.48.*:../../devel/boost-headers
boost-jam-1.48.*:../../devel/boost-jam
checkperms>=1.1:../../sysutils/checkperms
0 0 ~>
> An example is
> devel/unidiff/Makefile
> which has BUILD_DEPENDS on shar (because it's used in the build). I see
> that there are many cases like this.
The same as above.
> Another example is
> geography/emerillon/Makefile
> which has BUILD_DEPENDS on gnome-common and vala.
> It seems that gnome-common probably ought to be bl3'd, but there is no
> bl3 file, but it seems like a target dependency.
Even with my patch gnome-common is in BUILD_DEPENDS (that is marked as
build host dependency). This kind of problems should be fixed on
per-package basis. I guess there are only a few of such problematic
packages because bl3 framework is used very actively and BUILD_DEPENDS
(including USE_TOOLS) is used mostly for build host deps.
> BUILD_DEPENDS is a bad construct, because it doesn't let anyone
> express build vs target vs both.
> "dependencies" is naturally a target-type construct. Any use of the
> bare word "dependency" for other than target IMHO risks confusion and
> should be avoided.
I tend to agree but why not to separate two different issues. First --
API provided by pkgsrc for cross builds (As far as I remember we achived
concensus about TARGET_BUILD_DEPENDS + BUILDHOST_BUILD_DEPENDS as such
API). Second -- remove/replace BUILD_DEPENDS with something that
distinguishes target and buid host deps more explicitely.
> So what I would do, were I to do this, is more or less:
I skipped this section because I think we have to resolve problem 1)
(for the beginning) which is independent from 2). Though, I agree with
your proposal about BUILDHOST_BUILD_DEPENDS and TARGET{HOST,}_BUILD_DEPENDS and
can provide the updated patch. I believe solving problem 1) (API for
cross builds) will be a big step forward for pkgsrc.
--
Best regards, Aleksey Cheusov.
Home |
Main Index |
Thread Index |
Old Index