[MacPorts] #56463: htop: compiler on older systems

MacPorts noreply at macports.org
Tue May 15 19:50:03 UTC 2018

#56463: htop: compiler on older systems
  Reporter:  iEFdev  |      Owner:  neverpanic
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:  2.4.4
Resolution:          |   Keywords:  lion legacy-os
      Port:  htop    |

Comment (by iEFdev):

 Replying to [comment:2 ryandesign]:
 > MacPorts does not use gcc as the default compiler on Lion. /usr/bin/gcc
 is not gcc on Lion and later.

 Yes, I know, but that was what I had installed. But, now it looks like
 `gcc5+` is the one(s) that works…

 > We don't generally want to build ports with FSF GCC. If any compiler is
 unsatisfactory for whatever reason, the port should blacklist it and let
 MacPorts choose the next best compiler, which, if all Xcode compilers are
 unsatisfactory, will be a newer version of clang provided by MacPorts.

 I don't know if this is right/correct or not, but I tried to blacklist
 some, to find one who would work.

 To blacklist I looked a bit at the Wine port, [https://github.com/macports
 here], and also used [https://trac.macports.org/wiki/UsingTheRightCompiler
 these] [https://gist.github.com/yamaya/2924292 two] pages.

 As I added more compilers to the blacklist, it eventually wanted me to
 install `{clang,llvm}-5.0` - so I did that, but that one didn't work
 either. Seems like `gcc5` is the lowest working one.

 --- Portfile.orig       2018-05-10 15:35:35.000000000 +0200
 +++ Portfile    2018-05-13 04:01:07.000000000 +0200
 @@ -2,6 +2,7 @@

  PortSystem          1.0
  PortGroup           github 1.0
 +PortGroup           compiler_blacklist_versions 1.0

  github.setup        hishamhm htop 2.2.0
  checksums           rmd160  13d2fc4d5414db6ac5653ef87a6216f4e2090bbf \
 @@ -30,3 +31,9 @@
  pre-configure {
      system -W ${worksrcpath} "sh autogen.sh"
 +compiler.blacklist-append {clang < 800} \
 +                          {*gcc-[3-4].*} \
 +                          {*clang-3.[0-9]} \
 +                          {*clang-4.[0-2]}
 +compiler.fallback-append  macports-gcc-5

 // That's what I used in the end.

 I haven't got anything newer to try with, so I don't know which version is
 used on those systems. This is what I have installed (and tried with):
 $ port installed {gcc,clang,llvm}*
 The following ports are currently installed:
   clang-3.4 @3.4.2_12+analyzer+arm_runtime (active)
   clang-3.7 @3.7.1_5+analyzer (active)
   clang-3.8 @3.8.1_9+analyzer (active)
   clang-3.9 @3.9.1_8+analyzer+libstdcxx (active)
   clang-4.0 @4.0.1_5+analyzer+libstdcxx (active)
   clang-5.0 @5.0.1_1+analyzer+libstdcxx (active)
   clang_select @2_0 (active)
   gcc5 @5.5.0_0 (active)
   gcc7 @7.3.0_0 (active)
   gcc_select @0.1_8 (active)
   llvm-3.4 @3.4.2_12 (active)
   llvm-3.7 @3.7.1_4 (active)
   llvm-3.8 @3.8.1_3 (active)
   llvm-3.9 @3.9.1_5 (active)
   llvm-4.0 @4.0.1_2 (active)
   llvm-5.0 @5.0.1_0 (active)
   llvm_select @2_0 (active)

 But again, I don't know if this is right/correct or not… Feels like there
 should be a simplier way to do it, & that I'm prob doing something wrong
 here. But hopefully it is helpful in some way. :)

 Anyway, the error… It's been like this since `htop` became 2.0 -> So it's
 not just the last update.

Ticket URL: <https://trac.macports.org/ticket/56463#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS

More information about the macports-tickets mailing list