Request to tag a version of Cling which builds on macOS

Hi, I’m a contributor to Homebrew (package manager for macOS)
By creating a Homebrew Formula for Cling, users of Cling would be easily able to install and use cling by just running brew install cling

I created a Pull request for the same here: https://github.com/Homebrew/homebrew-core/pull/18124
According to Homebrew guidelines, a git tag in the upstream repository is to be specified in Homebrew Formula. But the latest v0.4 tag doesn’t build.

Can you please tag a version which builds?

Below are the build time errors that I’m facing in macOS Sierra 10.12.6

[ 64%] Building CXX object tools/cling/lib/MetaProcessor/CMakeFiles/obj.clingMetaProcessor.dir/MetaParser.cpp.o
Scanning dependencies of target clingUserInterface
[ 64%] Building CXX object tools/cling/lib/UserInterface/CMakeFiles/clingUserInterface.dir/UserInterface.cpp.o
In file included from /tmp/cling-20170915-21432-177gwfq/cling-0.4/src/tools/cling/lib/UserInterface/UserInterface.cpp:12:
/tmp/cling-20170915-21432-177gwfq/cling-0.4/src/tools/cling/include/cling/Interpreter/Exception.h:31:36: error: expected ';' at end of declaration list
    virtual ~InterpreterException() LLVM_NOEXCEPT;
                                   ^
                                   ;
/tmp/cling-20170915-21432-177gwfq/cling-0.4/src/tools/cling/include/cling/Interpreter/Exception.h:48:37: error: expected ';' at end of declaration list
    virtual ~InvalidDerefException() LLVM_NOEXCEPT;
                                    ^
                                    ;
/tmp/cling-20170915-21432-177gwfq/cling-0.4/src/tools/cling/include/cling/Interpreter/Exception.h:63:28: error: expected ';' at end of declaration list
    ~CompilationException() LLVM_NOEXCEPT;
                           ^
                           ;
[ 64%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/MacroPPCallbacks.cpp.o
3 errors generated.
make[2]: *** [tools/cling/lib/UserInterface/CMakeFiles/clingUserInterface.dir/UserInterface.cpp.o] Error 1
make[1]: *** [tools/cling/lib/UserInterface/CMakeFiles/clingUserInterface.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 64%] Building CXX object tools/bugpoint/CMakeFiles/bugpoint.dir/OptimizerDriver.cpp.o
[ 64%] Building CXX object tools/cling/lib/MetaProcessor/CMakeFiles/obj.clingMetaProcessor.dir/MetaProcessor.cpp.o
In file included from /tmp/cling-20170915-21432-177gwfq/cling-0.4/src/tools/cling/lib/Interpreter/AutoloadCallback.cpp:28:
/tmp/cling-20170915-21432-177gwfq/cling-0.4/src/tools/cling/lib/Interpreter/DeclUnloader.h:267:5: error: unknown type name 'LLVM_CONSTEXPR'
    LLVM_CONSTEXPR static bool isDefinition(void*) { return false; }
    ^
/tmp/cling-20170915-21432-177gwfq/cling-0.4/src/tools/cling/lib/Interpreter/DeclUnloader.h:267:20: error: expected member name or ';' after declaration specifiers
    LLVM_CONSTEXPR static bool isDefinition(void*) { return false; }
    ~~~~~~~~~~~~~~ ^
/tmp/cling-20170915-21432-177gwfq/cling-0.4/src/tools/cling/lib/Interpreter/AutoloadCallback.cpp:127:47: error: cannot initialize a parameter of type 'bool *' with an rvalue of type 'bool'
                                /*SkipCache*/ false, /*OpenFile*/ false,
                                              ^~~~~
/tmp/cling-20170915-21432-177gwfq/cling-0.4/src/tools/cling/../clang/include/clang/Lex/Preprocessor.h:1766:37: note: passing argument to parameter 'IsMapped' here
                              bool *IsMapped,
                                    ^
[ 64%] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/clangStaticAnalyzerCheckers.dir/CheckObjCDealloc.cpp.o
[ 64%] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/clangStaticAnalyzerCore.dir/Environment.cpp.o
[ 64%] Building CXX object tools/bugpoint/CMakeFiles/bugpoint.dir/ToolRunner.cpp.o
3 errors generated.
make[2]: *** [tools/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/AutoloadCallback.cpp.o] Error 1
make[1]: *** [tools/cling/lib/Interpreter/CMakeFiles/obj.clingInterpreter.dir/all] Error 2
[ 66%] Linking CXX static library ../../../../../lib/libclangStaticAnalyzerCheckers.a
[ 66%] Built target clangStaticAnalyzerCheckers
make: *** [all] Error 2

Yikes! Which compiler is that?

(And thanks for trying to put cling into Homebrew!)

1 Like

Compiler and other details should be available in the below snippet ( The latest head builds successfully)

ORIGIN: https://github.com/Homebrew/brew
HEAD: 2e43d95498eedd3c61f7c013a0a419c2c0aac098
Last commit: 68 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 17df6f9a4544f3313042aad71e4a33db8d4857cd
Core tap last commit: 45 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.1 build 802
Git: 2.14.1 => /usr/local/opt/git/bin/git
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_101, 1.8.0_91
macOS: 10.12.6-x86_64
Xcode: N/A
CLT: 8.3.2.0.1.1492020469
X11: 2.7.11 => /opt/X11

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.12
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/super:/usr/local/opt/cmake/bin:/usr/local/opt/z3/bin:/usr/local/opt/ocaml/bin:/usr/local/opt/git/bin:/usr/bin:/bin:/usr/sbin:/sbin

Hi Axel. Please let me know if you need any other info?
I even tried v0.3 even that doesnt build. But latest head builds without any errors.

I think we’ll just tag a new version. I will let you know during the coming days.

1 Like

Thanks! Looking forward to it.

@Axel Gentle ping.

I haven’t forgotten you - I simply did not find a time slice for this yet. I’ll be back in two weeks and expect to do it then.

1 Like

Totally alright. Thanks!

Thanks to @vvassilev we finally have a cling tag! See https://github.com/root-project/cling/releases/tag/v0.5

Enjoy and apologies for the delay!

Thanks! :smiley: @Axel and @vvassilev

brew install cling now works ! :confetti_ball:

1 Like