.L command doesn't work on mac os x 10.9.2?

I love the idea of cling very much, and I downloaded the latest binary for mac os x.
But when I try to load a library , tons of errors:

[code]$ cling

****************** CLING ******************

  • Type C++ code and press enter to run it *
  •         Type .q to exit             *

[cling]$ .L /System/Library/Frameworks/AGL.framework/AGL
In file included from input_line_3:1:
/System/Library/Frameworks/AGL.framework/AGL:1:1: error: source file is not valid UTF-8

fatal error: too many errors emitted, stopping now [-ferror-limit=]
Assertion failed: (Pos != Map->end() && “no lookup entry for decl”), function removeDecl, file /ec/build/cling-ec31eb9db8a3-full-1503528/cling-src-ec31eb9db8a3fca85f8bf31466623b455cc00663/tools/clang/lib/AST/DeclBase.cpp, line 1140.
Abort trap: 6[/code]

It seems that it’s parsing the AGL library as source code?

This is because cling cannot figure out this is a library. There is no extension and the the ‘magic bits’ (specific to the shared libraries) seems not to be set. Are you sure is the ‘right’ binary to load?


I will have a look…

Cheers, Axel.


Fixed in the master; we just never came across MachO bundles.


Hi Axel,

I am able to reproduce same on windows. It works fine, when I do below operation
.L test.cpp but NOT with including any libraries.

Please let me know whether the same patch is available on widows or not?

Thanks and Regards,