[HarfBuzz] 'CoverageFormat1::Iter' cannot access private struct declared in class 'CoverageFormat1'
Ryan Schmidt
freedesktop-2012d at ryandesign.com
Tue Oct 30 15:16:24 PDT 2012
On 16/9/12 02:15, Behdad Esfahbod wrote:
> On 09/13/2012 07:32 AM, Samiullah Khawaja wrote:
>
>> I am trying to build hurfbuzz 0.9.3 in Visual Studio 2005. It gives me
>> following error in file: hb-ot-layout-common-private.h on line: 561
>>
>> 'CoverageFormat1::Iter' cannot access private struct declared in class
>> 'CoverageFormat1'.
>>
>> I did some investigation and found that the Iter is declared private in the
>> CoverageFormat1 struct and thus the compiler error occurs.
>
> Humm. This sounds like a difference in how "friend" handling works in VS
> 2005. I'm leaning towards not having to support such an old compiler. I
> tried adding additional friend declarations to help resolve this but adding
> "friend Coverage::Iter" before Coverage itself is fully defined doesn't seem
> to work, so I'm out of ideas for a simple fix short of making the Iter's
> public. That's probably not a big deal, but diverts from the current design
> of HarfBuzz.
I am seeing a similar problem building harfbuzz 0.9.5 with Apple gcc 4.0.1 on OS X 10.5 Leopard:
hb-ot-layout-common-private.hh:406: error: 'struct OT::CoverageFormat1::Iter' is private
hb-ot-layout-common-private.hh:646: error: within this context
hb-ot-layout-common-private.hh:500: error: 'struct OT::CoverageFormat2::Iter' is private
hb-ot-layout-common-private.hh:647: error: within this context
make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1
I should mention I'm writing on behalf of the MacPorts project, where I'm on a quest to update our pango port to version 1.32.x, and of course pango now requires harfbuzz. So my interest is in ensuring that harfbuzz and pango build and work correctly on all the platforms MacPorts runs on (currently OS X 10.4 through 10.8).
Using Apple gcc 4.2.1 instead works around the problem on Leopard, and I can make our harfbuzz port do that if need be, but it's not nearly that easy to do that on OS X 10.4 Tiger, because Apple gcc 4.0.1 is the newest version of gcc available in the Apple developers tools on Tiger.
Since harfbuzz is required by pango, and pango is an integral component of so much other software, please consider supporting these older compilers so that users of older systems are not left out.
More information about the HarfBuzz
mailing list