Quantcast

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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

MacPorts
#53994: highlight @3.36 fails to build with libc++
---------------------+-----------------------
 Reporter:  1-61803  |      Owner:
     Type:  defect   |     Status:  new
 Priority:  Normal   |  Milestone:
Component:  ports    |    Version:
 Keywords:           |       Port:  highlight
---------------------+-----------------------
 It also fails with 3.28 and 3.35. According to #53719, 3.35 builds on
 `10.6` and there's also a workaround posted for 3.36 on `10.7` that I
 haven't tried yet on `10.8`.

--
Ticket URL: <https://trac.macports.org/ticket/53994>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

MacPorts
#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  |
------------------------+-----------------
Changes (by 1-61803):

 * Attachment "highlight_failed_main.log" added.


--
Ticket URL: <https://trac.macports.org/ticket/53994>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

MacPorts
In reply to this post by MacPorts
#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 ryandesign):

 Yes, this is another case of a build system that does not understand that
 it needs to use CXXFLAGS at link time as well when linking C++ code. The
 workaround posted in #53719 should be sufficient until the port or the
 build system is fixed.

--
Ticket URL: <https://trac.macports.org/ticket/53994#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

MacPorts
In reply to this post by MacPorts
#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):

 I confirm `sudo port install highlight configure.cxxflags="-stdlib=libc++"
 configure.cxx="clang++ -stdlib=libc++"` builds 3.36 on `10.8`.

--
Ticket URL: <https://trac.macports.org/ticket/53994#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

MacPorts
In reply to this post by MacPorts
#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
Loading...