View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009438 | ardour | bugs | public | 2023-08-25 04:31 | 2023-09-23 12:21 |
Reporter | ergen | Assigned To | |||
Priority | low | Severity | minor | Reproducibility | sometimes |
Status | new | Resolution | open | ||
Platform | Apple Macintosh | OS | MacOS | OS Version | 10.12 or later |
Product Version | 7.5 | ||||
Summary | 0009438: update ardour-build-tools/build-stack | ||||
Description | - change zlib source to github - run curl without -k if it fails initially - build harfbuzz before freetype to prevent undefined HB_SCRIPT_ADLAM/HB_SCRIPT_OSAGE error | ||||
Tags | No tags attached. | ||||
|
0001-change-zlib-source-to-github-try-curl-without-k-buil.patch (4,111 bytes)
From 147c5fccc1b0090d792150a6e00d50ab9c920de0 Mon Sep 17 00:00:00 2001 From: perry <pbtnguyen@gmail.com> Date: Fri, 25 Aug 2023 00:28:03 -0400 Subject: [PATCH] change zlib source to github;try curl without -k;build harfbuzz before freetype --- build-stack | 78 ++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/build-stack b/build-stack index 2fb1354..7cd0fe1 100755 --- a/build-stack +++ b/build-stack @@ -69,7 +69,7 @@ function fetch_as () { fi echo "--- Downloading.. $2" if uname -a | grep --silent arwin ; then - curl -L -k -o $1 $2 + curl -L -k -o $1 $2 || curl -L -o $1 $2 else wget --no-check-certificate -O $1 $2 fi @@ -346,7 +346,7 @@ defmod 'glib' '2.56.4' 'http://ftp.gnome.org/pub/gnome/sources/glib/2.56/' 'xz' defmod 'pkgconfig' 'pkg-config' '0.29.2' 'http://pkgconfig.freedesktop.org/releases/' 'gz' defmod 'termcap' '1.3.1' 'http://ftpmirror.gnu.org/termcap/' 'gz' defmod 'readline' '8.2' 'http://ftpmirror.gnu.org/readline/' 'gz' -defmod 'zlib' '1.2.13' 'https://zlib.net/' 'gz' +defmod 'zlib' '1.2.13' 'https://github.com/madler/zlib/releases/download/v1.2.13/' 'gz' defmod 'libiconv' '1.16' 'https://ftp.gnu.org/pub/gnu/libiconv/' 'gz' defmod 'gettext' '0.21' 'http://ftpmirror.gnu.org/gettext/' 'gz' defmod 'expat' '2.5.0' 'https://downloads.sourceforge.net/project/expat/expat/2.5.0/' 'gz' @@ -905,6 +905,43 @@ else basic_builder pixman fi +tar xf $MOD_harfbuzz_local_tarball && \ +( + set -e + cd $MOD_harfbuzz_unpacked + # work around clang Werror,Wunused-but-set-variable + patch -p1 << EOF +diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc +index f3ed518..029ccf6 100644 +--- a/src/hb-subset-cff1.cc ++++ b/src/hb-subset-cff1.cc +@@ -402,12 +402,11 @@ struct cff_subset_plan { + void plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan) + { + const Encoding *encoding = acc.encoding; +- unsigned int size0, size1, supp_size; ++ unsigned int size0, size1; + hb_codepoint_t code, last_code = CFF_UNDEF_CODE; + hb_vector_t<hb_codepoint_t> supp_codes; + + subset_enc_code_ranges.resize (0); +- supp_size = 0; + supp_codes.init (); + + subset_enc_num_codes = plan->num_output_glyphs () - 1; +@@ -443,7 +442,6 @@ struct cff_subset_plan { + code_pair_t pair = { supp_codes[i], sid }; + subset_enc_supp_codes.push (pair); + } +- supp_size += SuppEncoding::static_size * supp_codes.length; + } + } + supp_codes.fini (); +EOF + + basic_buildonly harfbuzz +) || die "harfbuzz build failed" + if [ x$OSX = x ] ; then echo "=== freetype (w/bytecode patch)" tar xf $MOD_freetype_local_tarball && \ @@ -974,43 +1011,6 @@ else ) || die "cairo build failed" fi -tar xf $MOD_harfbuzz_local_tarball && \ -( - set -e - cd $MOD_harfbuzz_unpacked - # work around clang Werror,Wunused-but-set-variable - patch -p1 << EOF -diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc -index f3ed518..029ccf6 100644 ---- a/src/hb-subset-cff1.cc -+++ b/src/hb-subset-cff1.cc -@@ -402,12 +402,11 @@ struct cff_subset_plan { - void plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan) - { - const Encoding *encoding = acc.encoding; -- unsigned int size0, size1, supp_size; -+ unsigned int size0, size1; - hb_codepoint_t code, last_code = CFF_UNDEF_CODE; - hb_vector_t<hb_codepoint_t> supp_codes; - - subset_enc_code_ranges.resize (0); -- supp_size = 0; - supp_codes.init (); - - subset_enc_num_codes = plan->num_output_glyphs () - 1; -@@ -443,7 +442,6 @@ struct cff_subset_plan { - code_pair_t pair = { supp_codes[i], sid }; - subset_enc_supp_codes.push (pair); - } -- supp_size += SuppEncoding::static_size * supp_codes.length; - } - } - supp_codes.fini (); -EOF - - basic_buildonly harfbuzz -) || die "harfbuzz build failed" - basic_builder fribidi GLOBAL_CONF="$GLOBAL_CONF $PANGO_CONF --with-included-modules=yes" \ -- 2.39.2 (Apple Git-143) |
|
can you elaborate on why you swapped harfbuzz and freetype? Also did you mean curl -L -o $1 $2 || curl -L -k -o $1 $2 IIRC insecure was for old OSX builders, which did not have updated certs. So we can probably get rid of that, too. |
|
I was getting error 'undefined "HB_SCRIPT_ADLAM"/"HB_SCRIPT_OSAGE"' when building freetype. I believe the issue is that freetype is expecting those symbols, which are defined by harfbuzz, which in the original build script is built after freetype. When I built harfbuzz before freetype the error went away. after I did this i read that freetype is not actually even used on macos https://ardour.org/current_dependencies.html -- if this is true should freetype just be removed from the build stack for macos? maybe harfbuzz too? your suggestion regarding curl definitely seems better practice than mine, i was mainly just trying to introduce the least amount of change in behavior. i'll try building fresh without inseucre and update the patch accordingly. |
|
I have applied the curl change. I'm still curious about the freetype issue. There is circular dependency: freetype can use harfbuzz and harfbuzz can use freetype. In our case this is a non-issue since freetype is not directly used and text rendering happens via pango/cairo -> harfbuzz -> freetype/CoreFont. The build script runs regularly and on different systems for nightly and local builds on High Siearra (Intel), Mojave (Intel) , BigSur (Intel and M1) and Venuta (M2). So it's curious that you ran into those issues, while it works otherwis |