[MacPorts] #44125: cmake needs to support building against / with a deployment target set (prevents libc++ support on Snow Leopard for cmake projects)

MacPorts noreply at macports.org
Tue Jul 22 07:09:14 PDT 2014


#44125: cmake needs to support building against / with a deployment target set
(prevents libc++ support on Snow Leopard for cmake projects)
---------------------------+--------------------------------
  Reporter:  mojca@…       |      Owner:  macports-tickets@…
      Type:  defect        |     Status:  closed
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:
Resolution:  fixed         |   Keywords:
      Port:  cmake libcxx  |
---------------------------+--------------------------------

Comment (by mojca@…):

 I don't think it's an autoconf problem only. (The code for `HAVE_STAT64`
 is gone from our sources already, but nonetheless.)

 I was aware of the function `respondsToSelector` in Cocoa. I wasn't aware
 of existence of "weak linking" for "regular code".

 So the following tutorial is semi-wrong about the need for using
 `-isysroot`?
   * http://www.cocoawithlove.com/2009/09/building-for-earlier-os-versions-
 in.html

 From what I understand every developer should be aware of Mac-specifics
 then and try to write the code in such a way that weak linking would work
 properly? But that includes changes in `C/C++` sources as well, right?
 Does CMake make it any easier to support weak linking? (It's difficult
 enough to find resources online. I found some, but they contain some
 relatively ugly mac-specific code to support weak linking.)


 But unless I'm mistaken you are describing/solving a '''slightly'''
 different problem with weak linking. In that particular case I would be
 perfectly happy if `stat64` wouldn't be called on a system that supports
 it. As long as the binaries work, I'm happy, I don't need heavily
 optimized code. The problem is that the check for `stat64` was successful
 when it shouldn't have been.

 (Weak linking would be better of course, but the basic problem/bug that
 caused `Bus error` was elsewhere. Is any configuration check needed at all
 when weak linking is used? I would think that configuration is then only
 needed on other platforms.)

-- 
Ticket URL: <https://trac.macports.org/ticket/44125#comment:24>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list