harfbuzz - strange compiler issues with gcc on 10.5

Ryan Schmidt ryandesign at macports.org
Wed Aug 14 13:05:06 UTC 2019



On Aug 14, 2019, at 02:14, Riccardo Mottola wrote:

> as a dependency, harfbuzz is being installed on my 10.5 64bit system.
> 
> The default picked up compiler is gcc6 and I get the following errors. I ask, because I have seen this errors in other builds and even some of my own code, it is in the system headers.
> 
> /opt/local/bin/g++-mp-6 -DHAVE_CONFIG_H -I. -I..  -pthread -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include  -fno-rtti -pipe -Os -DHB_NO_PRAGMA_GCC_DIAGNOSTIC_ERROR -D_GLIBCXX_USE_CXX11_ABI=0 -m64 -fno-exceptions -fno-threadsafe-statics -fvisibility-inlines-hidden -MT test_ot_name-test-ot-name.o -MD -MP -MF .deps/test_ot_name-test-ot-name.Tpo -c -o test_ot_name-test-ot-name.o `test -f 'test-ot-name.cc' || echo './'`test-ot-name.cc
> In file included from /System/Library/Frameworks/Security.framework/Headers/Security.h:57:0,
>                  from /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LSSharedFileList.h:32,
>                  from /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LaunchServices.h:37,
>                  from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:41,
>                  from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20,
>                  from hb-coretext.h:37,
>                  from hb-coretext.cc:35:
> /System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:102:46: error: shift expression '(1853123693 << 8)' overflows [-fpermissive]
>      kSecAuthenticationTypeNTLM             = AUTH_TYPE_FIX_ ('ntlm'),
>                                               ^
> /System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:102:46: error: enumerator value for 'kSecAuthenticationTypeNTLM' is not an integer constant
>      kSecAuthenticationTypeNTLM             = AUTH_TYPE_FIX_ ('ntlm'),
>                                               ^
> /System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:103:46: error: shift expression '(1836281441 << 8)' overflows [-fpermissive]
>      kSecAuthenticationTypeMSN              = AUTH_TYPE_FIX_ ('msna'),
>                                               ^
> /System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:103:46: error: enumerator value for 'kSecAuthenticationTypeMSN' is not an integer constant
>      kSecAuthenticationTypeMSN              = AUTH_TYPE_FIX_ ('msna'),
>                                               ^
> /System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:104:46: error: shift expression '(1685086561 << 8)' overflows [-fpermissive]
>      kSecAuthenticationTypeDPA              = AUTH_TYPE_FIX_ ('dpaa'),
> 
> <... and many more very similar ...>
> 
> 
> So probably either something can be tweaked when using gcc6 or it is too "new" for the system headers?

I would guess that this "problem" (if it is one) slipped into the system headers because the version of gcc that was in use at the time did not check for this problem.

I would guess you can instruct gcc 6 not to consider this to be an error somehow.


> I tried building with clang-3.7 but it doesn't work, because the port wants then to issue -stdlib=macports-libstdc++, which clang 3.7 does not understand.

We didn't backport that feature to clang-3.7? I wonder why we didn't.


> Clang-3.9 is no more and I am unable to get clang 5.0 on 10.5, but that is a different issue, I suppose and will report it separately.




More information about the macports-users mailing list