archcheck needed for depends_build and depends_run?

Clemens Lang cal at macports.org
Sat Aug 11 01:54:22 PDT 2012


Hi,

I wonder wether the architecture check in src/macports1.0/macports.tcl
starting at line 2038[1] is really necessary for build- and run-style
dependencies. We're already deliberately excluding fetch and extract
dependencies from being rebuilt in the target architecture of the port
we're trying to build.

Consider the following experience I'm having while trying to write a
Portfile for TextMate 2 (which is i386 only):
  - TextMate 2 uses ninja as build system. Since we have the archcheck
    for build dependencies, ninja will get installed +universal,
    although the i386 code will never be executed at all, because
    setting build.cmd to ninja will not magically use i386 ninja, but
    x86_64 ninja, beacuse it's the default on my system.
  - The TextMate 2 build system uses pkill from the proctools port. I
    can't build TextMate 2, because proctools doesn't have a universal
    variant (although any executable pkill would be just fine,
    regardless of its architecture).

There are only a few cases where we actually need build- or
run-dependencies in the correct architecture:
  - The software behaves different depending on which architecture it
    was compiled for. This should never or almost never be the case.
  - Libraries from a build dependency are actually linked against in the
    build process (but not after it). I don't think there is any port
    doing this, as it's rather uncommon.
  - The dependency behaves different depending on whether it was
    installed with +universal. IIRC some gcc ports interpret
    "+universal" as "generate universal binaries when compiling, but not
    a universal compiler". Since compilers ship standard library and
    sometimes startup symbols, they should be added to depends_lib
    anyway, and would not be affected by the proposed change.

Thus, I propose the attached patch to be applied to
src/macports1.0/macports.tcl, disabling the dependency architecture
check for build- and run-style dependencies.

Any comments?

[1] http://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl?marks=2038-2090#L2038
-- 
Clemens Lang

-------------- next part --------------
A non-text attachment was scrubbed...
Name: macports-disable-archcheck-for-build-and-run-deps.diff
Type: text/x-diff
Size: 1132 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20120811/094d16e9/attachment.bin>


More information about the macports-dev mailing list