<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Oops, sorry, didn't Reply all.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Hi Behdad,<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="">> 2 questions/remarks after trying to build HarfBuzz for iPhone:<br><br>
On OS X?  What toolchain to you use?<br></div></div></div></div></blockquote><br>On OS X. I was trying to cross-compile for iOS using the official Apple toolchain.<br> <br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class=""><br>> - The build process adds the -mstructure-size-boundary=8 flag when building on ARM, but clang doesn’t support it. Couldn’t that flag added on ARM only when the compiler is GCC?<br>
<br>

Should be fixed in master.  Please check.<br></div></div></div></div></blockquote><br>It doesn’t work for me. The configure output says:<br><span style="font-family:'courier new',monospace">checking alignment of struct{char}... 0</span><br>
<br>and configure.log:<br><span style="font-family:'courier new',monospace">configure:16748: /Applications/Xcode.app/</span><span style="font-family:'courier new',monospace">Contents/Developer/Toolchains/</span><span style="font-family:'courier new',monospace">XcodeDefault.xctoolchain/usr/</span><span style="font-family:'courier new',monospace">bin/clang -c -arch armv7 -isysroot /Applications/Xcode.app/</span><span style="font-family:'courier new',monospace">Contents/Developer/Platforms/</span><span style="font-family:'courier new',monospace">iP</span><br>
<span style="font-family:'courier new',monospace">conftest.c:65:37: error: expected member name or ';' after declaration specifiers</span><br><span style="font-family:'courier new',monospace">typedef struct { char x; struct{char} y; } ac__type_alignof_;</span><br>
<span style="font-family:'courier new',monospace">                                ~~~~^</span><br><span style="font-family:'courier new',monospace">conftest.c:65:37: warning: expected ';' at end of declaration list</span><br>
<span style="font-family:'courier new',monospace">typedef struct { char x; struct{char} y; } ac__type_alignof_;</span><br><span style="font-family:'courier new',monospace">                                    ^</span><br>
<span style="font-family:'courier new',monospace">                                    ;</span><br><span style="font-family:'courier new',monospace">conftest.c:69:12: error: variable length array declaration can not have 'static' storage duration</span><br>
<span style="font-family:'courier new',monospace">static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];</span><br><span style="font-family:'courier new',monospace">           ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span style="font-family:'courier new',monospace">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><br>
<span style="font-family:'courier new',monospace">1 warning and 2 errors generated.</span><br><br>And of course if I run <i>make</i> the compilation tries to use the -mstructure-size-boundary=8 flag.<br><br>But I made it work adding just a semicolon to your code (and updating the shell variable name):<br>
<span style="font-family:'courier new',monospace">diff --git a/</span><a href="http://configure.ac" target="_blank" style="font-family:'courier new',monospace">configure.ac</a><span style="font-family:'courier new',monospace"> b/</span><a href="http://configure.ac" target="_blank" style="font-family:'courier new',monospace">configure.ac</a><br>
<span style="font-family:'courier new',monospace">index fc64be1..ef71edf 100644</span><br><span style="font-family:'courier new',monospace">--- a/</span><a href="http://configure.ac" target="_blank" style="font-family:'courier new',monospace">configure.ac</a><br>
<span style="font-family:'courier new',monospace">+++ b/</span><a href="http://configure.ac" target="_blank" style="font-family:'courier new',monospace">configure.ac</a><br><span style="font-family:'courier new',monospace">@@ -72,7 +72,7 @@ AC_CHECK_HEADERS(unistd.h sys/mman.h)</span><br>
<span style="font-family:'courier new',monospace"> </span><br><span style="font-family:'courier new',monospace"> # Compiler flags</span><br><span style="font-family:'courier new',monospace"> AC_CANONICAL_HOST</span><br>
<span style="font-family:'courier new',monospace">-AC_CHECK_ALIGNOF([struct{</span><span style="font-family:'courier new',monospace">char}])</span><br><span style="font-family:'courier new',monospace">+AC_CHECK_ALIGNOF([struct{</span><span style="font-family:'courier new',monospace">char;}])</span><br>
<span style="font-family:'courier new',monospace"> if test "x$GCC" = "xyes"; then</span><br><span style="font-family:'courier new',monospace"> </span><br><span style="font-family:'courier new',monospace">        # Make symbols link locally</span><br>
<span style="font-family:'courier new',monospace">@@ -95,7 +95,7 @@ if test "x$GCC" = "xyes"; then</span><br><span style="font-family:'courier new',monospace"> </span><br><span style="font-family:'courier new',monospace">        case "$host" in</span><br>
<span style="font-family:'courier new',monospace">                arm-*-*)</span><br><span style="font-family:'courier new',monospace">-                       if test "x$ac_cv_alignof_struct_char_" != x1; then</span><br>
<span style="font-family:'courier new',monospace">+                       if test "x$ac_cv_alignof_struct_char__</span><span style="font-family:'courier new',monospace">" != x1; then</span><br><span style="font-family:'courier new',monospace">                                # Request byte alignment</span><br>
<span style="font-family:'courier new',monospace">                                CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8"</span><br><span style="font-family:'courier new',monospace">                        fi</span><br>
<br>With that change I get:<br><span style="font-family:'courier new',monospace">checking alignment of struct{char;}... 1</span><br>and the compilation works fine.<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="">
<br>> - use of UCDN is disabled when building HarfBuzz with glib support, but why is it not when building HarfBuzz with ICU support?<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

</blockquote>Because ICU is built into harfbuzz-icu.so, which is not accessible from<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>harfbuzz.so.  Note that because of how ICU is discovered (fallback to<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>icu-config), you might be getting the system (not iPhone SDK's) ICU detected.<br>
 Try --without-icu if that's the case.<br></div></div></div></div></blockquote><br>Yes <i>configure</i> tends to want to use the system's pkg-config and similar tools, not what you generally want when cross-compiling. I set for instance the PKG_CONFIG environment variable to an empty value, but that doesn't always work very well.<br>
<br>HarfBuzz is pretty small and simple so in fact I ended up building it without using <i>configure</i> :P.<br><br>Thanks,<br><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div>Vincent</div>







</div></div></div>
</div><br></div></div>