I am new to this forum. Please forgive me in advance if this is a silly question.
I installed the binary of cling on OS X yosemite and when I run it I get the output below. I also tried compiling cling from git and get the same output. Can anyone please help?
Alessandros-Mac-mini:cling alessandro$ bin/cling
****************** CLING ******************
Type C++ code and press enter to run it *
Type .q to exit *
[cling]$ int a = 10
IncrementalExecutor::executeFunction: symbol ‘_ZN5cling7runtime8internal15setValueNoAllocEPvS2_S2_S2_y’ unresolved while linking function’_Z15__cling_Un1Qu30Pv’!
[cling]$
Not a silly question at all But I cannot reproduce that. I built with clang --version Apple LLVM version 6.0 (clang-600.0.56) i.e. XCode 6.1.1 and do not see the problem you report. Let me know the details of which compiler you use and how you configure.
I use the same version:
Alessandros-Mac-mini:~ alessandro$ clang --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
Alessandros-Mac-mini:~ alessandro$
I use the following configure within the src directory:
./configure --enable-cxx11 --enable-optimized --disable-assertions --prefix=/Applications/YDS.app/Contents/Tools/cling
I have updated cling to use a new JIT engine, hoping that it might also address the missing symbol issue as a byproduct. Alas it now fails even for our nightly builds and all my efforts to reproduce this have failed so far.
I’ll try to reproduce your config findings next - tomorrow afternoon if things go according to plan!
How about loading frameworks? It is pretty crucial on OS X . Is there a quick patch (like for example looking in the path for a directory with path extension “.framework”) ?