weird (buggy?) build dependency on a clang port

René J.V. Bertin rjvbertin at gmail.com
Thu Sep 8 07:09:55 PDT 2016


Hi,

I have the following in my KDevelop5 PortFile:

compiler.blacklist *gcc* {clang < 602} macports-clang-3.3 macports-clang-3.4 macports-clang-3.5
compiler.fallback-append macports-clang-3.9 macports-clang-3.8 macports-clang-3.7 macports-clang-3.6

I have installed:

{{{
port installed "llvm*" "clang*"
The following ports are currently installed:
  clang-3.7 @3.7.1_2+analyzer+nortti
  clang-3.8 @3.8.1_3+analyzer+nortti (active)
  clang-3.9 @3.9.0_0+analyzer+nortti (active)
  clang_select @1.0_0 (active)
  llvm-3.7 @3.7.1_1+nortti (active)
  llvm-3.8 @3.8.1_0+nortti (active)
  llvm-3.9 @3.9.0_0+nortti (active)
  llvm_select @1.0_0 (active)
}}}

IOW, I have clang-mp-3.8 and clang-mp-3.9 available, and clang-mp-3.7 "in dormant stock".

When I do `port info kf5-kdevelop`, I'm told that

{{{
Build Dependencies:   cmake, pkgconfig, gettext, python27, clang-3.7
}}}

I can still understand (=/= agree) that the compiler selection procedure is designed to take the lowest version of a compiler that is supposed to be able to build given code. But why does it not take the lowest *available* version, and why does it tell me to install (= activate) clang-3.7 rather than install clang-3.6 (from scratch)?

Is there any way I can rewrite the compiler selection logic such that it picks from the available compilers without forcing me to specify a compiler explicitly?

Worse: when I add clang-3.6 and clang-3.7 to the above blacklist declaration I get the warning that "all compilers are either blacklisted or unavailable"...

When I rewite the Portfile to

compiler.blacklist *gcc* {clang < 602} macports-clang-3.3 macports-clang-3.4 macports-clang-3.5
compiler.whitelist       macports-clang-3.9 macports-clang-3.8 macports-clang-3.7 macports-clang-3.6
compiler.fallback        macports-clang-3.9 macports-clang-3.8 macports-clang-3.7 macports-clang-3.6

the result is the opposite: the build dependency is always on clang-3.9, whether that port is activated or not.

Thanks,
René


More information about the macports-dev mailing list