Build on OSX Mavericks

Dan Olson at
Sat Jan 25 02:09:43 PST 2014

David Nadlinger <code at> writes:

> Hi Russel,
> On Fri, Jan 24, 2014 at 8:16 PM, Russel Winder <russel at> wrote:
>> gen/logger.h:75:16, invalid operands to binary expression
>> ('std::ostream' (aka 'basic_ostream<char>') and 'char const[2]')
> This appears to be
> Patches would be greatly appreciated, since I can't easily upgrade my
> MacBook to Mavericks (the installer chokes on the MBR/GPT partition
> table combo present on its disk), and I don't think Kai has a working
> 10.8 setup either.
> If you just want to use LDC, you can just comment out the offending
> line, as it only affects debug log output (-vv).
> David

This thread of timely. However I am running 10.8.5 Mountain Lion.

I ran into the same compiler error tonight after switching my LDC
compile from gcc-4.8 to system clang with -stdlib=libc++ so it will use
libc++ instead of libstdc++.

I think the error is that template in logger.h uses operator<< for
ostream& which is not defined when instantiated.

This worked for me,

--- a/gen/logger.h
+++ b/gen/logger.h
@@ -15,7 +15,8 @@
-#include <iosfwd>
+//#include <iosfwd>
+#include <ostream>
 namespace llvm {
     class Type;

I'll bet libstdc++ headers pulled in more classes and avoided the error.

Now I it looks like I have to build libconfig++ against libc++ too
(macport libconfig-hr uses libstdc++). I am getting an ldc2 link error.
Oh well.

More information about the digitalmars-d-ldc mailing list