[MacPorts] #44062: root6: make it work on 10.6

MacPorts noreply at macports.org
Wed Jun 18 17:32:24 PDT 2014


#44062: root6: make it work on 10.6
----------------------+-------------------------
  Reporter:  mojca@…  |      Owner:  mojca@…
      Type:  defect   |     Status:  new
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:
Resolution:           |   Keywords:  snowleopard
      Port:  root6    |
----------------------+-------------------------

Comment (by mojca@…):

 Replying to [comment:31 jeremyhu@…]:
 > Replying to [comment:6 mojca@…]:
 > > The problem is that the `cmake` `PortGroup` adds
 > > {{{
 > > -DCMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.6.sdk" \
 > > -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6"
 > > }}}
 >
 > That is a bug in the cmake PortGroup.  It should use whatever base tells
 it is the SDK and deployment targets.

 The bigger problem is that specifying no value automatically assumes
 `-DCMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.6.sdk"`. That's more like a
 problem in CMake.

 We can certainly take a look in the portgroup, but CMake blindly adding
 `-isysroot` when nobody asked for it seems more annoying.

 > Replying to [comment:12 mojca@…]:
 > > I fixed the first error by boldly editing
 `/opt/local/libexec/llvm-3.4/bin/../include/c++/v1/cmath` and replacing:
 > > {{{
 > > - #endif __APPLE__
 > > + #endif // __APPLE__
 > > }}}
 > > (Jeremy, doesn't this look like a bug in `clang-3.4`?)
 >
 > Yes, but meh.  Feel free to push a patch, but I wouldn't bother with a
 revbump for that.

 I'm sorry. I actually didn't realize that this was just a warning rather
 than an error.

 > Replying to [comment:15 mojca@…]:
 > > The solution mentioned in that ticket was [https://github.com/root-
 mirror/root/commit/d194bd7a33136b9d491a1fcdcc10fbc16c80956c this one]:
 > > {{{
 > > #!diff
 > > --- core/thread/inc/ThreadLocalStorage.h.orig
 > > +++ core/thread/inc/ThreadLocalStorage.h
 > > @@ -44,7 +44,7 @@
 > >  #endif
 > >
 > >  #if defined(R__MACOSX)
 > > -#  if defined(__clang__)
 > > +#  if defined(__clang__) && defined(MAC_OS_X_VERSION_10_7)
 > >  #    define R__HAS___THREAD
 > >  #  else
 > >  #    define R__HAS_PTHREAD
 > > }}}
 > >
 > > Is it possible that `MAC_OS_X_VERSION_10_7` is defined on 10.6? I
 believe that I need to rebuild everything in order to test. Simply running
 `make` after changing that file didn't really help.
 >
 > Yes.  Checking for the existence of the MAC_OS_X_VERSION_10_7 macro is
 certainly not the right thing to do.  Shame on them.  The compiler and
 deployment target determine if TLS is supported, not the existence of some
 macro.

 However the code that fails is in comment:16. That one is even more wrong,
 but I don't know what the proper patch should be.

 After applying a bunch of patches + manually patching a rule to add -lX11
 the package seems to work (to the extent that ROOT can be said to work ...
 crashes are to be expected).

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


More information about the macports-tickets mailing list