<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Here is my cross compilation information:</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Host / Target: mipsel-openwrt-linux</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Build: x86_64-pc-linux</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I use <span style="font-family:Consolas,Courier,monospace">rsync</span> to get the complete source code of TeXLive and then configure with</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<code><span style="font-family: Consolas, Courier, monospace;">./configure --enable-multiplatform --disable-native-texlive-build --prefix=PREFIX --with-fontconfig-includes=INCDIR --with-fontconfig-libdir=LIBDIR --enable-build-in-source-tree --target=mipsel-openwrt-linux
 --host=mipsel-openwrt-linux --build=x86_64-pc-linux</span></code></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
with paths like <code>INCDIR</code> <code>LIBDIR</code> and <code>PREFIX</code> are set correctly then
<code>make && make world</code><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Anyhow, all is fine except that XeTeX isn't built.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
After I viewed the config.log of each package, I found such a part in web2c:</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
<span></span><span style="font-family: Consolas, Courier, monospace;">configure:16676: checking for installed fontconfig headers and library</span><span><br>
</span>
<div><span style="font-family: Consolas, Courier, monospace;">configure:16709: mipsel-openwrt-linux-gcc -o conftest -g -O2 -I/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/include   conftest.c -L/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib
 -lfontconfig  >&5</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/gcc/mipsel-openwrt-linux-musl/7.3.0/../../../../mipsel-openwrt-linux-musl/bin/ld: warning: libexpat.so.1,
 needed by /home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so, not found (try using -rpath or -rpath-link)</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/gcc/mipsel-openwrt-linux-musl/7.3.0/../../../../mipsel-openwrt-linux-musl/bin/ld: warning: libbz2.so.1.0,
 needed by /home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6, not found (try using -rpath or -rpath-link)</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/gcc/mipsel-openwrt-linux-musl/7.3.0/../../../../mipsel-openwrt-linux-musl/bin/ld: warning: libpng16.so.16,
 needed by /home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6, not found (try using -rpath or -rpath-link)</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/gcc/mipsel-openwrt-linux-musl/7.3.0/../../../../mipsel-openwrt-linux-musl/bin/ld: warning: libz.so.1, needed
 by /home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6, not found (try using -rpath or -rpath-link)</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_palette_to_rgb@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_get_error_ptr@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_read_end@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_SetElementHandler'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_interlace_handling@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_get_valid@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `inflate'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_SetDoctypeDeclHandler'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `BZ2_bzDecompressInit'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_ParserFree'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `BZ2_bzDecompress'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_read_image@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `BZ2_bzDecompressEnd'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_create_info_struct@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_SetCharacterDataHandler'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_create_read_struct@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_ErrorString'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_ParseBuffer'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_get_io_ptr@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_packing@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_ParserCreate'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_read_info@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_error@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_strip_16@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `inflateReset'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_get_IHDR@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_filler@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_tRNS_to_alpha@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_read_update_info@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_gray_to_rgb@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_read_user_transform_fn@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_SetUserData'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_expand_gray_1_2_4_to_8@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_GetErrorCode'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_longjmp_fn@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_GetBuffer'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_destroy_read_struct@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `inflateEnd'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib/libfontconfig.so: undefined reference to `XML_GetCurrentLineNumber'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `png_set_read_fn@PNG16_0'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">/home/siger/openwrt/mt7620a_18.06.2/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/mipsel-openwrt-linux-musl/bin/../../../toolchain-mipsel_24kc_gcc-7.3.0_musl/lib/libfreetype.so.6: undefined reference
 to `inflateInit2_'</span><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">collect2: error: ld returned 1 exit status</span><br>
</div>
<span style="font-family: Consolas, Courier, monospace;">configure:16709: $? = 1</span></blockquote>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family: Consolas, Courier, monospace;"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The test failed and some libraries weren't linked automatically, thus XeTeX was disabled. However, pkg-config isn't available in my OpenWRT toolchain and the only thing I could do is to specify the fontconfig library and include path.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
And further, I think the test parameters is different from the build parameters for XeTeX because here</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family: Consolas, Courier, monospace">configure:16709: mipsel-openwrt-linux-gcc -o conftest -g -O2 -I/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/include   conftest.c -L/home/siger/openwrt/mt7620a_18.06.2/staging_dir/target-mipsel_24kc_musl/usr/lib
 -lfontconfig  >&5</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
the library path doesn't contains freetype from the source.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I know that I should add some flags here, but I'd like to ask which flag I should add to, or any other sustainable solutions?<br>
</div>
</body>
</html>