[MacPorts] #53994: highlight @3.36 fails to build with libc++

MacPorts noreply at macports.org
Fri Apr 21 09:16:38 UTC 2017


#53994: highlight @3.36 fails to build with libc++
------------------------+-----------------
  Reporter:  1-61803    |      Owner:
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:
      Port:  highlight  |
------------------------+-----------------

Comment (by 1-61803):

 Thanks to Ken Cunningham for the guidance, see
 [https://lists.macports.org/pipermail/macports-
 users/2017-April/043190.html this post] and related thread.

 On `10.8` I had 3 possibilities:
 1. run this command, see also ticket:53719#comment:12.
 {{{
 sudo port install highlight configure.cxxflags="-stdlib=libc++"
 configure.cxx="clang++ -stdlib=libc++"
 }}}
 2. patch the portfile with the flags in 1.

 3. install a newer compiler and change runtime.

 I did the latter: installed `clang-3.9` and set `libc++`.

 a. modify `/opt/local/etc/macports/macports.conf` (see
 [https://trac.macports.org/wiki/LibcxxOnOlderSystems here]).
 {{{
 default_compilers  macports-clang-3.9
 cxx_stdlib         libc++
 buildfromsource    always
 delete_la_files    yes
 }}}
 b. patch the compiler to use `libc++` in <`10.9`.

  · check out [https://github.com/macports/macports-
 ports/tree/bb3b700f76b27c5c50af1dc84f5a4a234b188135/lang/llvm-3.9
 bb3b700f76] from macports-ports (`clang-3.9` @3.9.0_2) and patch it
 manually, ''or''

  · use the files from
 [https://github.com/kencu/SnowLeopardPorts/tree/master/lang/llvm-3.9 Ken's
 GitHub repo]

 Basically, in the portfile add
 {{{
 # patch clang to always default to -stdlib=libc++, even on <10.9
 patchfiles-append 999-patch-clang-3.9-Toolchains-default-always-
 libcxx.diff
 }}}
 and in the patchfile
 {{{
 --- ./tools/Clang/lib/Driver/ToolChains.cpp.orig        2016-12-21
 00:45:00.000000000 -0800
 +++ ./tools/Clang/lib/Driver/ToolChains.cpp     2016-12-21
 00:45:42.000000000 -0800
 @@ -73,7 +73,7 @@
         isTargetWatchOSBased())
      return ToolChain::CST_Libcxx;

 -  return ToolChain::CST_Libstdcxx;
 +  return ToolChain::CST_Libcxx;
  }
 }}}

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


More information about the macports-tickets mailing list