Thread overview
Re: Build on OSX Mavericks
Jan 24, 2014
David Nadlinger
Jan 25, 2014
Dan Olson
Mar 05, 2014
Kai Nacke
Jan 24, 2014
Russel Winder
Mar 05, 2014
Russel Winder
January 24, 2014
Hi Russel,

On Fri, Jan 24, 2014 at 8:16 PM, Russel Winder <russel@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
January 24, 2014
On Fri, 2014-01-24 at 20:43 +0100, David Nadlinger wrote:

David,

> This appears to be https://github.com/ldc-developers/ldc/issues/544.

That is definitely the case.

> 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.

I have a MacBook running Lion (10.7.5) which refuses to upgrade to
Mountain Lion and hence Mavericks (10.9.1), so I'll try building on
there to ensure I can.

> If you just want to use LDC, you can just comment out the offending line, as it only affects debug log output (-vv).

Seems like a feasible workaround :-)

If I get a chance over the next few days I'll see if I can suss out something more permanent as a fix.

Thanks.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

January 25, 2014
David Nadlinger <code@klickverbot.at> writes:

> Hi Russel,
>
> On Fri, Jan 24, 2014 at 8:16 PM, Russel Winder <russel@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.
-- 
Dan
March 05, 2014
On Sun, 2014-01-26 at 18:24 +0000, Russel Winder wrote: […]
> I can confirm that LDC builds, installs and appears to run fin for me on Lion. Sadly the build doesn't work on Mavericks.

I can't remember what the problem was, but it certainly seemed to work fine yesterday.

[…]

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

March 05, 2014
Hi Dan!

On Saturday, 25 January 2014 at 10:09:44 UTC, Dan Olson wrote:
> David Nadlinger <code@klickverbot.at> writes:
>
>> Hi Russel,
>>
>> On Fri, Jan 24, 2014 at 8:16 PM, Russel Winder <russel@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