tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RFC: distbb for cross-compiling packages



 >>>   BUILD_DEPENDS should be about target, and is really a weak case of bl3
 >> I think in most cases BUILD_DEPENDS are build host dependencies too.
 >> I could not find cases where BUILD_DEPENDS is set manually in package's
 >> Makefile and contains target-platform dependency.

> This is where I am not following.  In the example you posted, there are
> a lot of packages listed as BUILD_DEPENDS which provide header files.
> Those are in my mind target dependencies and the packages should be
> installed in the target chroot to provide the .h files.  It's basically
> always wrong to include a build .h file in a cross compile.

Let me repeat one fragment from the typescript. After applying my patch
BUILD_DEPENDS and TARGET_BUILD_DEPENDS are set like the following
when USE_CROSS_COMPILE is set to YES.

======================================================================
0 xdm>export _GCC_VERSION=4.5.3 USE_CROSS_COMPILE=yes

0 xdm>make clean
===> Cleaning for xdm-1.1.11

0 xdm>pkg_src_summary -f \
      PKGNAME,PKGPATH,BUILD_DEPENDS,TARGET_BUILD_DEPENDS \
      x11/xdm | pkg_summary4view
-----------------------------------------------------------
PKGNAME:        xdm-1.1.11
PKGPATH:        x11/xdm
BUILD_DEPENDS:  checkperms>=1.1:../../sysutils/checkperms
                libtool-base>=2.2.6bnb3:../../devel/libtool-base
                pkg-config>=0.19:../../devel/pkg-config
TARGET_BUILD_DEPENDS:inputproto>=1.4:../../x11/inputproto
                kbproto>=1.0.2:../../x11/kbproto
                renderproto>=0.9.3nb1:../../x11/renderproto
                renderproto>=0.9:../../x11/renderproto
                xcb-proto>=1.4:../../x11/xcb-proto
                xextproto>=7.0:../../x11/xextproto
                xineramaproto>=1.1.1:../../x11/xineramaproto
                xproto>=7.0.9:../../x11/xproto

0 0 xdm>make /tmp/obj-pkgsrc/x11/xdm/work/.depends

0 xdm>cat /tmp/obj-pkgsrc/x11/xdm/work/.depends
bootstrap       digest>=20010302        ../../pkgtools/digest
build   kbproto>=1.0.2  ../../x11/kbproto
build   xproto>=7.0.9   ../../x11/xproto
build   xcb-proto>=1.4  ../../x11/xcb-proto
build   xextproto>=7.0  ../../x11/xextproto
build   inputproto>=1.4 ../../x11/inputproto
build   renderproto>=0.9.3nb1   ../../x11/renderproto
build   xineramaproto>=1.1.1    ../../x11/xineramaproto
full    sessreg-[0-9]*  ../../x11/sessreg
full    libXaw>=1.0.5   ../../x11/libXaw
full    libXmu>=1.0.0   ../../x11/libXmu
full    libXft>=2.1.14nb1       ../../x11/libXft
full    libXinerama>=1.0.1      ../../x11/libXinerama

0 xdm>
======================================================================

Result:
  - BUILD_DEPENDS contains only build host dependencies
  - TARGET_BUILD_DEPENDS contains target dependencies only (headers).
  - "depends" target doesn't require build host packages (checkperms,
    libtool-base and pkg-config) anymore.

This is exactly what is required by cross-build tools.

>   th      BUILD_DEPENDS:  checkperms>=1.1:../../sysutils/checkperms
>   BH                      inputproto>=1.4:../../x11/inputproto
>   BH                      kbproto>=1.0.2:../../x11/kbproto
>   th                      libtool-base>=2.2.6bnb3:../../devel/libtool-base
>   th                      pkg-config>=0.19:../../devel/pkg-config
>   BH                      renderproto>=0.9.3nb1:../../x11/renderproto
>   BH                      renderproto>=0.9:../../x11/renderproto
>   BH                      xcb-proto>=1.4:../../x11/xcb-proto
>   BH                      xextproto>=7.0:../../x11/xextproto
>   BH                      xineramaproto>=1.1.1:../../x11/xineramaproto
>   BH                      xproto>=7.0.9:../../x11/xproto

> The rest, *proto, are .h files that should be present in the target
> destdir, and should be "th".

I apologize. I really swapped "BH" and "th" by mistake. I'm sorry for that.

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index