[MacPorts] #57412: cxx11 1.1 portgroup: add dependency on cctools

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #57412: cxx11 1.1 portgroup: add dependency on cctools

MacPorts
#57412: cxx11 1.1 portgroup: add dependency on cctools
------------------------+--------------------
 Reporter:  ryandesign  |      Owner:  (none)
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:
 Keywords:              |       Port:
------------------------+--------------------
 aria2 fails to build on 10.6, because it requires C++11, and although it
 uses the cxx11 1.1 portgroup, which uses a newer clang, it still uses the
 old Xcode ranlib which doesn't understand the files produced by that new
 clang:

 {{{
 /bin/sh ../libtool  --tag=CC   --mode=link /opt/local/bin/clang-mp-5.0
 -Wall -pipe -Os -arch x86_64 -no-undefined -version-info 0:1:0
 -L/opt/local/lib -Wl,-headerpad_max_install_names -lintl -arch x86_64 -o
 libwslay.la   wslay_frame.lo wslay_event.lo wslay_queue.lo wslay_net.lo
 libtool: warning: '-version-info/-version-number' is ignored for
 convenience libraries
 libtool: link: ar cru .libs/libwslay.a .libs/wslay_frame.o
 .libs/wslay_event.o .libs/wslay_queue.o .libs/wslay_net.o
 /usr/bin/ranlib: object: .libs/libwslay.a(wslay_frame.o) malformed object
 (unknown load command 2)
 ar: internal ranlib command failed
 }}}

 Perhaps the portgroup should have a dependency on cctools, which provides
 a newer ranlib.

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

Re: [MacPorts] #57412: cxx11 1.1 portgroup: add dependency on cctools

MacPorts
#57412: cxx11 1.1 portgroup: add dependency on cctools
-------------------------+--------------------
  Reporter:  ryandesign  |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:              |
-------------------------+--------------------

Comment (by kencu):

 Agree, it's a concert of build system supports, not just the compiler.

 Probably also `ld64`, if that's not automatic.

 Some ports may still need to be tweaked by passing in the newer build
 system locations, as they default to the system ones, but this would help
 most of them.

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

Re: [MacPorts] #57412: cxx11 1.1 portgroup: add dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: cxx11 1.1 portgroup: add dependency on cctools
-------------------------+--------------------
  Reporter:  ryandesign  |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:              |
-------------------------+--------------------
Changes (by ryandesign):

 * cc: jeremyhu (added)


Comment:

 clang-5.0, for example, already has a runtime dependency on ld64, but not
 on cctools. Maybe the clang ports are the correct place for the cctools
 dependency to go. Jeremy, what do you think?

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

Re: [MacPorts] #57412: cxx11 1.1 portgroup: add dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: cxx11 1.1 portgroup: add dependency on cctools
-------------------------+--------------------
  Reporter:  ryandesign  |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:              |
-------------------------+--------------------

Comment (by kencu):

 is everyone OK if we just make port:cctools a clang runtime dep for every
 system? It would just be much simpler that way in the clang-3.9+
 portfiles, I can't see how it would cause any harm, and it will save us
 running into this issue again soon with 10.7 or 10.8, at the lack of some
 specificity.

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools (was: cxx11 1.1 portgroup: add dependency on cctools)

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-5.0, clang-6.0, clang-7.0,    |
  clang-devel                                    |
-------------------------------------------------+-------------------------
Changes (by ryandesign):

 * port:   => clang-5.0, clang-6.0, clang-7.0, clang-devel


Comment:

 Which compilers would we need to add it to? Do we need to watch out for a
 possible circular dependency?

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-5.0, clang-6.0, clang-7.0,    |
  clang-devel                                    |
-------------------------------------------------+-------------------------

Comment (by cjones051073):

 cctools only declares dependencies on various llvm versions, not on the
 clang compilers derived from them. Should be tested but I think if you
 then only add cctools dependencies in clang, and not llvm, you should
 avoid circular dependencies...

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-5.0, clang-6.0, clang-7.0,    |
  clang-devel                                    |
-------------------------------------------------+-------------------------

Comment (by kencu):

 in my usage, clang-3.9+ producd the newer objects that require cctools.

 that leaves clang 3.4, 3.7, and all yhe xcode clangs for bootstrapping.

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-5.0, clang-6.0, clang-7.0,    |
  clang-devel                                    |
-------------------------------------------------+-------------------------

Comment (by ryandesign):

 Ok. I was worried for a minute about the fact that cctools has llvm
 variants, but that's just llvm, not clang, and only clang needs the
 cctools dependency, so we should be fine.

 clang-3.9 and later already include the following block:

 {{{
 if {[string match macports-clang-* ${configure.compiler}]} {
     depends_build-append port:cctools
     depends_skip_archcheck-append cctools
 }
 }}}

 I guess we should change that to `depends_lib` and revbump.

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-3.9, clang-4.0, clang-5.0,    |
  clang-6.0, clang-7.0, clang-devel              |
-------------------------------------------------+-------------------------
Changes (by ryandesign):

 * port:  clang-5.0, clang-6.0, clang-7.0, clang-devel => clang-3.9,
     clang-4.0, clang-5.0, clang-6.0, clang-7.0, clang-devel


Comment:

 Wait, no, that block is in the global part of the portfile that affects
 all subports. We don't want to change that.

 clang-3.9 and later also already have this block in the clang subport:

 {{{
     # Older Xcode's lipo doesn't support x86_64h slices
     # https://trac.macports.org/ticket/53159#ticket
     if {[vercmp $xcodeversion "6.0.0"] < 0} {
         depends_build-append port:cctools
         depends_skip_archcheck-append cctools
     }
 }}}

 I guess that's where we should change `depends_build` to `depends_lib` and
 revbump.

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-3.9, clang-4.0, clang-5.0,    |
  clang-6.0, clang-7.0, clang-devel              |
-------------------------------------------------+-------------------------

Comment (by kencu):

 I was thinking of adding it here:
 {{{
  elseif {${subport} eq "clang-${llvm_version}"} {
     homepage            http://clang.llvm.org/
     description         C, C++, Objective C and Objective C++ compiler
     long_description    Clang is an "LLVM native" C/C++/Objective-C
 compiler, \
                         which aims to deliver amazingly fast compiles
 (e.g. \
                         about 3x faster than GCC when compiling
 Objective-C \
                         code in a debug configuration), extremely useful
 error \
                         and warning messages and to provide a platform for
 \
                         building great source level tools. The included
 Clang \
                         Static Analyzer is a tool that automatically finds
 bugs in \
                         your code, and is a great example of the sort of
 tool \
                         that can be built using the Clang frontend as a \
                         library to parse C/C++ code.

     depends_lib         port:libxml2 port:libomp port:llvm-${llvm_version}
 port:python27
     depends_run         port:clang_select port:ld64
     depends_skip_archcheck-append ld64
 }}}
 adding it to the depends_run section, and probably also to the
 depends_skip_archcheck section

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-3.9, clang-4.0, clang-5.0,    |
  clang-6.0, clang-7.0, clang-devel              |
-------------------------------------------------+-------------------------

Comment (by ryandesign):

 From what I can tell, Xcode `ranlib` on Lion and newer is new enough. So I
 would probably only add the cctools lib dependency when `[vercmp
 $xcodeversion 4] < 0`.

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-3.9, clang-4.0, clang-5.0,    |
  clang-6.0, clang-7.0, clang-devel              |
-------------------------------------------------+-------------------------

Comment (by kencu):

 At present, the cctools on 10.7+ can handle things.

 Personally, as above [ticket:57412#comment:4] I'd add the dependency to
 all os versions, like we do with ld64, and cover all the future troubles
 we are soon likely to see related to this, but adding cctools to <= 10.6
 solves today's issue.

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:14>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-3.9, clang-4.0, clang-5.0,    |
  clang-6.0, clang-7.0, clang-devel              |
-------------------------------------------------+-------------------------

Comment (by kencu):

 Oh, one thing -- this 10.6.8 machine I have runs Xcode 4.2 as well as the
 older version, and Xcode 4.2 fails to load the newer objects as well. So
 the cutoff for a functional cctools is presently above Xcode 4.2, but
 below 10.7's (which is 4.5 I think).

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:15>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-3.9, clang-4.0, clang-5.0,    |
  clang-6.0, clang-7.0, clang-devel              |
-------------------------------------------------+-------------------------

Comment (by kencu):

 looking at this ticket [ticket:53159] that was referenced in a block
 above, it looks like we should require cctools on Mountain Lion as well.
 So I guess you're right, we should just change depends_build to
 depends_lib as you mentioned [ticket:57412#comment:9] or we'll just be
 back here in no time to do it.

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:16>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  clang-3.9, clang-4.0, clang-5.0,    |
  clang-6.0, clang-7.0, clang-devel              |
-------------------------------------------------+-------------------------

Comment (by kencu):

 See <https://github.com/macports/macports-ports/pull/2900> for a PR that
 should represent this.

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:17>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  kencu
      Type:  defect                              |     Status:  closed
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:  fixed                               |   Keywords:
      Port:  clang-3.9, clang-4.0, clang-5.0,    |
  clang-6.0, clang-7.0, clang-devel              |
-------------------------------------------------+-------------------------
Changes (by kencu):

 * owner:  (none) => kencu
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"b3299729b0c810ec5047b5a45318b03e68445d78/macports-ports"
 b3299729b0c810ec5047b5a45318b03e68445d78/macports-ports] (master):
 {{{
 #!ConfigurableCommitTicketReference repository="macports-ports"
 revision="b3299729b0c810ec5047b5a45318b03e68445d78"
 clang-3.9+ : make cctools a lib dependency

 so cctools is available both at build and at runtime
 on all systems less than Xcode 6.0.0
 closes: https://trac.macports.org/ticket/57412
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/57412#comment:18>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #57412: clang ports: add runtime dependency on cctools

MacPorts
In reply to this post by MacPorts
#57412: clang ports: add runtime dependency on cctools
-------------------------------------------------+-------------------------
  Reporter:  ryandesign                          |      Owner:  kencu
      Type:  defect                              |     Status:  closed
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:  fixed                               |   Keywords:
      Port:  clang-3.9, clang-4.0, clang-5.0,    |
  clang-6.0, clang-7.0, clang-devel              |
-------------------------------------------------+-------------------------

Comment (by ryandesign):

 In [changeset:"71771542b317c0f76516c09c212644b4cfe60ef1/macports-ports"
 71771542b317c0f76516c09c212644b4cfe60ef1/macports-ports] (master):
 {{{
 #!ConfigurableCommitTicketReference repository="macports-ports"
 revision="71771542b317c0f76516c09c212644b4cfe60ef1"
 wine*: Don't prevent using clang-5.0 anymore

 See: https://trac.macports.org/ticket/57412
 }}}

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