Discussion:
[MacPorts] #57403: ROOT 6 compilation via cling fails
MacPorts
2018-10-17 09:47:15 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: High | Milestone:
Component: ports | Version:
Keywords: mojave | Port: root6
----------------------+--------------------------
After updating to macOS10.14 (and reinstalling all ports) I cannot compile
my ROOT macros anymore (interpreting does still work, as far as I see).
Compiling a simple macro e.g.:

{{{
#include "TROOT.h"
#include <iostream>

void test() {
std::cout<<"adsf"<<std::endl;
}
}}}
using {{{root test.C+}}} fails with various `unknown type errors`:

{{{
Processing test.C+...
Info in <TMacOSXSystem::ACLiC>: creating shared library
/Users/me/Desktop/./test_C.so
warning: no such sysroot directory: '-I/opt/local/libexec/root6/etc/root'
In file included from input_line_1:1:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/new:91:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/exception:82:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:86:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:94:
/opt/local/libexec/root6/etc/root/cling/lib/clang/5.0.0/include/stdlib.h:8:15:
fatal error: 'stdlib.h' file not found
#include_next <stdlib.h>
^~~~~~~~~~
In file included from input_line_3:1:
In file included from
/opt/local/libexec/root6/include/root/RtypesCore.h:25:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stddef.h:46:
/opt/local/libexec/root6/etc/root/cling/lib/clang/5.0.0/include/stddef.h:51:9:
error: unknown type name '__PTRDIFF_TYPE__'
typedef __PTRDIFF_TYPE__ ptrdiff_t;
}}}

ROOT seems to use header files for clang5 while AppleClang is currently at
version 10.0. The full log file is attached.
--
Ticket URL: <https://trac.macports.org/ticket/57403>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 09:47:29 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------
Changes (by hansgans):

* Attachment "log" added.

log
--
Ticket URL: <https://trac.macports.org/ticket/57403>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 10:06:14 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------

Comment (by hansgans):

Ok installing some headers solves the problem:

`open
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg`
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 10:20:30 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------

Comment (by cjones051073):

Yes, its a requirement to have the command line tools installed.
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 10:23:38 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------

Comment (by cjones051073):

b.t.w. compiling scripts with ACLiC is really no longer needed, with
ROOT6. cling is a proper compiler so use run the scripts interpreted. i.e.
without the + at the end...

It was recommended to do this with ROOT5, as CINT was not that good, but
cling has fixed this and is fully standards compliant, so really its no
longer needed.
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 12:12:26 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------

Comment (by hansgans):

I was aware the `xcode-select --install` is necessary. But nowhere is
mentioned that installing `macOS_SDK_headers_for_macOS_10.14.pkg` is
mandatory since mojave. Should this probably be mentioned in the MacPorts
installation instructions?
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 12:26:22 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------

Comment (by cjones051073):

Maybe... Please bring this up on the devel mailing list.

The issue is new and specific to macOS 10.14, which is why its not
mentioned.

https://lists.macports.org/pipermail/macports-
dev/2018-September/039399.html
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 12:28:21 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------

Comment (by cjones051073):

Also note, not using ACLiC also works around the issue.
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 14:51:39 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------
Changes (by mf2k):

* priority: High => Normal


Comment:

The Priority field is for use by Macports team members only.
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 15:15:43 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------

Comment (by jmroot):

A standard installation of the command line tools does not provide
/usr/include on Mojave. You can't rely on it existing, and that extra
package with the headers will likely go away at some point in the future.
System headers are provided by the SDK.
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 15:22:28 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------

Comment (by cjones051073):

Indeed. However, this is an issue that the upstream ROOT maintainers will
have to eventually address. its not MP specific.
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-17 15:25:17 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------

Comment (by cjones051073):

Upstream are already aware.

https://root-forum.cern.ch/t/error-while-compiling-root-6-14-04-on-
macos-10-14-mojave/30987/5

Chris
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-07 03:29:17 UTC
Permalink
#57403: ROOT 6 compilation via clang fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-07 05:57:54 UTC
Permalink
#57403: ROOT 6 compilation via cling fails
-----------------------+--------------------------
Reporter: hansgans | Owner: cjones051073
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: mojave
Port: root6 |
-----------------------+--------------------------
--
Ticket URL: <https://trac.macports.org/ticket/57403#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...