Build on OSX Mavericks

Kai Nacke kai at redstar.de
Wed Mar 5 08:36:06 PST 2014


Hi Dan!

On Saturday, 25 January 2014 at 10:09:44 UTC, Dan Olson wrote:
> David Nadlinger <code at klickverbot.at> writes:
>
>> Hi Russel,
>>
>> On Fri, Jan 24, 2014 at 8:16 PM, Russel Winder 
>> <russel at winder.org.uk> 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 
>> https://github.com/ldc-developers/ldc/issues/544.
>>
>> 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 @@
>  #ifndef LDC_GEN_LOGGER_H
>  #define LDC_GEN_LOGGER_H
> 
> -#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.

The work-around was to include iostream. But it was applied only
to master branch. I merged it yesterday into the other
branches....

Regards,
Kai


More information about the digitalmars-d-ldc mailing list