Opened 2 years ago
Last modified 2 years ago
#65795 assigned defect
harfbuzz-icu can't be compiled on 10.5 i386 anymore
Reported by: | catap (Kirill A. Korinsky) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | harfbuzz-icu |
Description
An attempt to install harfbuzz-icu
fails with error:
libtool: compile: /opt/local/bin/clang++-mp-7.0 -DHAVE_CONFIG_H -I. -I.. -pthread -I/opt/local/include -fno-rtti -pipe -Os -DHB_NO_PRAGMA_GCC_DIAGNOSTIC_ERROR -stdlib=macports-libstdc++ -D_GLIBCXX_USE_CXX11_ABI=0 -arch i386 -fno-exceptions -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -MT libharfbuzz_la-hb-common.lo -MD -MP -MF .deps/libharfbuzz_la-hb-common.Tpo -c hb-common.cc -fno-common -DPIC -o .libs/libharfbuzz_la-hb-common.o In file included from main.cc:349: In file included from ./hb-static.cc:27: In file included from ./hb.hh:189: /opt/local/include/gcc/c++/cmath:1149:11: error: no member named 'llrint' in the global namespace; did you mean 'lrint'? using ::llrint; ~~^ /usr/include/architecture/i386/math.h:382:17: note: 'lrint' declared here extern long int lrint ( double ); ^ In file included from main.cc:349: In file included from ./hb-static.cc:27: In file included from ./hb.hh:189: /opt/local/include/gcc/c++/cmath:1150:11: error: no member named 'llrintf' in the global namespace; did you mean 'lrintf'? using ::llrintf; ~~^ /usr/include/architecture/i386/math.h:383:17: note: 'lrintf' declared here extern long int lrintf ( float ); ^ In file included from main.cc:349: In file included from ./hb-static.cc:27: In file included from ./hb.hh:189: /opt/local/include/gcc/c++/cmath:1151:11: error: no member named 'llrintl' in the global namespace; did you mean 'lrintl'? using ::llrintl; ~~^ /usr/include/architecture/i386/math.h:475:17: note: 'lrintl' declared here
Change History (5)
comment:1 Changed 2 years ago by catap (Kirill A. Korinsky)
comment:2 Changed 2 years ago by kencu (Ken)
TLDR; try adding legacysupport. Usually works.
this error in the MacOSX10.5 and 10.6 math headers is quite commonly noted when using older gcc versions or when building with clang against the libgcc headers, and is usually fixed by adding legacysupport:
It was fixed in clang when building with libc++ with this patch in the libc++ headers, which I carried along to all newer clangs since, so you don't see it there:
gcc7+ fixed this internally, so you won't see this issue any longer when building with new gcc versions, even without legacysupport.
I had to fix this manually when building webkit2-gtk using clang and -stdlib=macoports-libstdc++ many many years ago:
https://github.com/macports/macports-ports/commit/78896778109ce1f25a02c4c167d1e6d6ddf33d4d
but it's possible that last fix might be able to be replaced by using legacysupport now; I haven't tried that.
comment:3 Changed 2 years ago by catap (Kirill A. Korinsky)
Ken, not this time :(
/opt/local/bin/clang++-mp-7.0 -DHAVE_CONFIG_H -I. -I.. -pthread -I/opt/local/include -I/opt/local/include/LegacySupport -fno-rtti -pipe -Os -DHB_NO_PRAGMA_GCC_DIAGNOSTIC_ERROR -stdlib=macports-libstdc++ -D_GLIBCXX_USE_CXX11_ABI=0 -arch i386 -fno-exceptions -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -MT main-main.o -MD -MP -MF .deps/main-main.Tpo -c -o main-main.o `test -f 'main.cc' || echo './'`main.cc In file included from main.cc:349: In file included from ./hb-static.cc:27: In file included from ./hb.hh:189: In file included from /opt/local/include/LegacySupport/cmath:54: /opt/local/include/gcc/c++/cmath:1149:11: error: no member named 'llrint' in the global namespace; did you mean 'lrint'? using ::llrint; ~~^ /usr/include/architecture/i386/math.h:382:17: note: 'lrint' declared here extern long int lrint ( double ); ^ In file included from main.cc:349: In file included from ./hb-static.cc:27: In file included from ./hb.hh:189: In file included from /opt/local/include/LegacySupport/cmath:54: /opt/local/include/gcc/c++/cmath:1150:11: error: no member named 'llrintf' in the global namespace; did you mean 'lrintf'? using ::llrintf; ~~^ /usr/include/architecture/i386/math.h:383:17: note: 'lrintf' declared here extern long int lrintf ( float ); ^
comment:4 Changed 2 years ago by catap (Kirill A. Korinsky)
I assume that LegacySupport is broken since this commit: https://github.com/macports/macports-legacy-support/commit/780d2b010b9e3443dcb42c1438b9fe2a5f94a69c
leopard:~ catap$ clang-mp-7.0 -dM -E -x c /dev/null | grep LONG_LONG #define __LONG_LONG_MAX__ 9223372036854775807LL #define __SIZEOF_LONG_LONG__ 8 leopard:~ catap$
comment:5 Changed 2 years ago by catap (Kirill A. Korinsky)
Nope, I'm wrong. The issue came from another condition: https://github.com/macports/macports-legacy-support/blob/master/include/MacportsLegacySupport.h#L128-L134
It decided that __MP_LEGACY_SUPPORT_CXX11_CMATH__
should be 0
for clang-7.
Open a PR https://github.com/macports/macports-legacy-support/pull/51 which I hope can be included to the next release.
blacklisting clang helps