Closed donly closed 1 year ago
+1
CXX libharfbuzz_subset_la-hb-subset-cff2.lo CXX libharfbuzz_subset_la-hb-subset-input.lo hb-subset-cff1.cc:405:33: error: variable 'supp_size' set but not used [-Werror,-Wunused-but-set-variable] unsigned int size0, size1, supp_size; ^ CXX libharfbuzz_subset_la-hb-subset-plan.lo 1 error generated. make[4]: [libharfbuzz_subset_la-hb-subset-cff1.lo] Error 1 make[4]: Waiting for unfinished jobs.... make[3]: [all-recursive] Error 1 make[2]: [all] Error 2 make[1]: *** [all-recursive] Error 1
Same here
You have to edit hb-subset-cff1.cc remove all the three references to the variable supp_size It's true what the compiler says: the var is unuseful: declared, set to 0 then set to another value but never used for computational purposes. Another solution would be to leave it and remove the "-Wunused-but-set-variable" flag to ignore it but we are compiling to have optimized code isn't it? hb-subset-cff1.cc.txt
+1 same
I have the same error u.u
If you want a copy paste, here is a quick and dirty patch to get you going. (replace in build.bash
)
function build_harfbuzz () {
if [[ ! -e "${SRC}/lib/pkgconfig/harfbuzz.pc" ]]; then
echo '♻️ ' Start compiling harfbuzz
cd ${CMPLD}
cd harfbuzz-2.7.2
sed -i -e 's/unsigned int size0, size1, supp_size;/unsigned int size0, size1;/g' ./src/hb-subset-cff1.cc
sed -i -e 's/supp_size = 0;//g' ./src/hb-subset-cff1.cc
sed -i -e 's/supp_size += SuppEncoding::static_size \* supp_codes.length;//g' ./src/hb-subset-cff1.cc
./configure --prefix=${SRC} --disable-shared --enable-static
make -j ${NUM_PARALLEL_BUILDS}
make install
fi
}
If you want a copy paste, here is a quick and dirty patch to get you going. (replace in
build.bash
)function build_harfbuzz () { if [[ ! -e "${SRC}/lib/pkgconfig/harfbuzz.pc" ]]; then echo '♻️ ' Start compiling harfbuzz cd ${CMPLD} cd harfbuzz-2.7.2 sed -i -e 's/unsigned int size0, size1, supp_size;/unsigned int size0, size1;/g' ./src/hb-subset-cff1.cc sed -i -e 's/supp_size = 0;//g' ./src/hb-subset-cff1.cc sed -i -e 's/supp_size += SuppEncoding::static_size \* supp_codes.length;//g' ./src/hb-subset-cff1.cc ./configure --prefix=${SRC} --disable-shared --enable-static make -j ${NUM_PARALLEL_BUILDS} make install fi }
Thanks for the suggestion, saved hours for me.