libass: Compilation errors on prerelease PowerPC Mac OS X Snow Leopard
Compilation fails on this:
In file included from ass_utils.c:30:
ass.h:421: error: wrong number of arguments specified for ‘deprecated’ attribute
ass.h:520: error: wrong number of arguments specified for ‘deprecated’ attribute
In file included from ass.c:35:
ass.h:421: error: wrong number of arguments specified for ‘deprecated’ attribute
ass.h:520: error: wrong number of arguments specified for ‘deprecated’ attribute
libtool: compile: /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -std=gnu99 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wredundant-decls -Wno-missing-field-initializers -D_GNU_SOURCE -pipe -Os -arch ppc -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -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/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -MT ass_string.lo -MD -MP -MF .deps/ass_string.Tpo -c ass_string.c -o ass_string.o >/dev/null 2>&1
make[2]: *** [ass_utils.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
libtool: compile: /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include -std=gnu99 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wredundant-decls -Wno-missing-field-initializers -D_GNU_SOURCE -pipe -Os -arch ppc -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -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/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -MT ass_strtod.lo -MD -MP -MF .deps/ass_strtod.Tpo -c ass_strtod.c -o ass_strtod.o >/dev/null 2>&1
mv -f .deps/ass_string.Tpo .deps/ass_string.Plo
make[2]: *** [ass.lo] Error 1
The older version builds:
36-47% port -v installed libass
The following ports are currently installed:
libass @0.13.7_0 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-02-14T20:14:23+0800'
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 43 (18 by maintainers)
Commits related to this issue
- ass.h: fix compilation with old gcc While the deprecated attribute wass added to GCC in https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e23bd2185fae41772d012231e005b789b3a9e6dc first released in GCC 3.... — committed to libass/libass by TheOneric 2 years ago
- fontselect: eagerly compute is_postscript in get_font_info This lets us get rid of the font format check in ass_coretext, which is not available on Mac OS X 10.5 and prerelease 10.6. This fixes https... — committed to astiob/libass by astiob 2 years ago
- fontselect: eagerly compute is_postscript in get_font_info This lets us get rid of the font format check in ass_coretext, which is not available on Mac OS X 10.5 and prerelease 10.6. This fixes https... — committed to astiob/libass by astiob 2 years ago
- fontselect: eagerly compute is_postscript in get_font_info This lets us get rid of the font format check in ass_coretext, which is not available on Mac OS X 10.5 and prerelease 10.6. This fixes https... — committed to astiob/libass by astiob 2 years ago
- Support Core Text on Mac OS X 10.5 Based on the logic in HarfBuzz's hb-coretext. See: 1. https://github.com/harfbuzz/harfbuzz/pull/952 2. https://github.com/harfbuzz/harfbuzz/pull/1180 Core Text w... — committed to astiob/libass by astiob a year ago
- fontselect: eagerly compute is_postscript in get_font_info This lets us get rid of the font format check in ass_coretext, which is not available on Mac OS X 10.5 and prerelease 10.6. This fixes https... — committed to astiob/libass by astiob 2 years ago
- Support Core Text on Mac OS X 10.5 Based on the logic in HarfBuzz's hb-coretext. See: 1. https://github.com/harfbuzz/harfbuzz/pull/952 2. https://github.com/harfbuzz/harfbuzz/pull/1180 Core Text w... — committed to astiob/libass by astiob a year ago
- Support Core Text on Mac OS X 10.5 Based on the logic in HarfBuzz's hb-coretext. See: 1. https://github.com/harfbuzz/harfbuzz/pull/952 2. https://github.com/harfbuzz/harfbuzz/pull/1180 Core Text w... — committed to astiob/libass by astiob a year ago
Although 1630dbeeef3b541e86af0c324a53a05a4f5a4b22 alone should also suffice on your 10.6 in my understanding.
If you do absolutely need individual patches, then you need the following commits (from oldest to newest), as seen in https://github.com/libass/libass/pull/664:
@barracuda156 Just build
master, please. If you need a tarball because Git is unavailable, GitHub provides them: https://github.com/libass/libass/archive/refs/heads/master.tar.gzYou’re right that this isn’t in a release yet. This will undoubtedly be in the next release, but we usually gather up more substantive changes before making a release. At the end of the day, though, we don’t have a fixed release schedule and just make releases when it seems like we have enough changes that warrant them.
OK, on DirectWrite, this behaviour is apparently caused by this font’s
STATtable. Here’s a copy with the STAT table removed: Manrope-Regular-woSTAT.zip; and DirectWrite reports its full name as “Manrope Regular”. But I doubt Leopard would’ve known anything about this table: it seems to be a pretty recent table, and it’s absent from Apple’s documentation even now.Assuming you mean effectively just removing the
kCTFontFormatOpenTypePostScriptline, no, it just makes it compile but at runtime the font selection code doesn’t do what it’s supposed to do. The proper fix is to do this:In fact, this would even let us support Mac OS X 10.5 by additionally using this incantation to get the font’s file path.
I’ve submitted https://github.com/libass/libass/pull/664 for this. If you happen to have a 10.5 machine available for testing (no matter whether Intel or PowerPC), I’d appreciate it if you could try it there, too. The same test ASS file as above should do nicely, and it’s enough to just verify that the output image looks the same.
As a no-longer-relevant reminder, on any Mac you can also use Fontconfig instead of the Core Text–based backend: install Fontconfig, and when building libass on the 10A190, use
./configure --disable-coretext.@barracuda156: did you manage to run the test?
@TheOneric Yes, with both patches together it does build with
gcc-4.2, if that is what you wanted to know.