tech-pkg archive

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

Inconsistent ${WRKDIR} with cross-compiling



My pkgsrc cross-compile adventure seems to have revealed an inconsistency in the definition of ${WRKDIR} between the building and cleaning phases.  I’m losing track of the variable definitions along the way, so perhaps someone with greater familiarity with cross-compiling will recognize the issue and suggest a fix.

I am cross-compiling the databases/sqlite3 package, which depends on cross/cross-libtool-base.  The latter is being built as a native package so +BUILD_INFO contains the following

ABI=64
MACHINE_ARCH=x86_64
MACHINE_GNU_ARCH=x86_64

which correspond to the build machine.  As a result (and in common with other native dependencies), ${WRKDIR} is just  “…/work” during the cross-libtool-base build that is triggered by building the databases/sqlite3 package.  This is evident in the lines below taken from the attached make.out file, which is a transcript of the sqlite3 build with PKG_DEBUG_LEVEL=1.

=> Verifying reinstall for ../../cross/cross-libtool-base
set -e; /bin/rm -f /tmp/work/pkgsrc-current/NetBSD-10.0_BETA-earmv7hf/cross/cross-libtool-base/work/.package_done /tmp/work/pkgsrc-current/NetBSD-10.0_BETA-earmv7hf/cross/cross-libtool-base/work/.install_done

However, “make clean-depends” in the databases/sqlite3 package defines a different value for ${WRKDIR} and consequently does not actually remove the files just built for cross-libtool-base.  In this case, the arch suffix is added and ${WRKDIR} is “…/work.earmv7hf”.  This is evident in the lines below taken from the attached clean.out file, which is a transcript of the sqlite3 "make clean-depends” with PKG_DEBUG_LEVEL=1.

===> Cleaning for cross-libtool-base-earmv7hf-2.4.7nb8
set -e;								 if test -d /tmp/work/pkgsrc-current/NetBSD-10.0_BETA-earmv7hf/cross/cross-libtool-base/work.earmv7hf; then					 if test -w /tmp/work/pkgsrc-current/NetBSD-10.0_BETA-earmv7hf/cross/cross-libtool-base/work.earmv7hf; then				 /bin/rm -fr /tmp/work/pkgsrc-current/NetBSD-10.0_BETA-earmv7hf/cross/cross-libtool-base/work.earmv7hf;				 else							 echo "=>" /tmp/work/pkgsrc-current/NetBSD-10.0_BETA-earmv7hf/cross/cross-libtool-base/work.earmv7hf" not writable, skipping";	 fi;							 fi

This suggests that different logic is in play for defining WRKDIR across the make targets when cross-compiling.

Cheers,
Brook


Attachment: make.out
Description: Binary data

Attachment: clean.out
Description: Binary data



Home | Main Index | Thread Index | Old Index