[tlbuild] xetex and xdvipdfmx: explicit dependency on external libfreetype and libz
Vladimir Volovich
vvv at vsu.ru
Fri May 15 11:16:02 CEST 2009
Hi Jonathan and Peter,
in TL2009, xetex and xdvipdfmx appear to have explicit dependencies on
external libfreetype.so.6 and libz.so.
i noticed that this is caused by putting "-L/opt/csw/lib" (which comes
from "--with-fontconfig=/opt/csw" during configure) too early in the
call to libtool, i.e. before the other libs such as
"-L/opt/home/vvv/src/texlive/source/Work/libs/freetype2 -lfreetype":
/opt/csw/bin/bash ./libtool --tag=CXX --mode=link CC -xarch=v8 -O -o xetex xetex-xetexini.o xetex-xetex0.o xetex-xetex1.o xetex-xetex2.o xetex-xetex_pool.o xetex-xetexextra.o xetex-synctex-xe.o libxetex.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicuuc.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicule.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicudata.a /opt/home/vvv/src/texlive/source/Work/libs/teckit/libTECkit.a /opt/home/vvv/src/texlive/source/Work/libs/xpdf/libxpdf.a /opt/home/vvv/src/texlive/source/Work/libs/libpng/libpng.a -L/opt/csw/lib -lfontconfig /opt/home/vvv/src/texlive/source/Work/libs/graphite/libgraphite.a -L/opt/home/vvv/src/texlive/source/Work/libs/freetype2 -lfreetype /opt/home/vvv/src/texlive/source/Work/libs/zlib/libz.a lib/lib.a /opt/home/vvv/src/texlive/source/Work/texk/kpathsea/libkpathsea.la -lm
libtool: link: CC -xarch=v8 -O -o xetex xetex-xetexini.o xetex-xetex0.o xetex-xetex1.o xetex-xetex2.o xetex-xetex_pool.o xetex-xetexextra.o xetex-synctex-xe.o libxetex.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicuuc.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicule.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicudata.a /opt/home/vvv/src/texlive/source/Work/libs/teckit/libTECkit.a /opt/home/vvv/src/texlive/source/Work/libs/xpdf/libxpdf.a /opt/home/vvv/src/texlive/source/Work/libs/libpng/libpng.a -L/opt/csw/lib /opt/csw/lib/libfontconfig.so /opt/home/vvv/src/texlive/source/Work/libs/graphite/libgraphite.a -L/opt/home/vvv/src/texlive/source/Work/libs/freetype2 /opt/csw/lib/libfreetype.so -lz /opt/home/vvv/src/texlive/source/Work/libs/zlib/libz.a lib/lib.a /opt/home/vvv/src/texlive/source/Work/texk/kpathsea/.libs/libkpathsea.a -lm -R/opt/csw/lib -R/opt/csw/lib
which results in libtool finding a system libfreetype.so in addition to
TL's static freetype, and also adding -lz as a dependency of freetype.
if i change the command to:
$ /opt/csw/bin/bash ./libtool --tag=CXX --mode=link CC -xarch=v8 -O -o xetex xetex-xetexini.o xetex-xetex0.o xetex-xetex1.o xetex-xetex2.o xetex-xetex_pool.o xetex-xetexextra.o xetex-synctex-xe.o libxetex.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicuuc.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicule.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicudata.a /opt/home/vvv/src/texlive/source/Work/libs/teckit/libTECkit.a /opt/home/vvv/src/texlive/source/Work/libs/xpdf/libxpdf.a /opt/home/vvv/src/texlive/source/Work/libs/libpng/libpng.a /opt/home/vvv/src/texlive/source/Work/libs/graphite/libgraphite.a -L/opt/home/vvv/src/texlive/source/Work/libs/freetype2 -lfreetype /opt/home/vvv/src/texlive/source/Work/libs/zlib/libz.a lib/lib.a /opt/home/vvv/src/texlive/source/Work/texk/kpathsea/libkpathsea.la -L/opt/csw/lib -lfontconfig -lm
libtool: link: CC -xarch=v8 -O -o xetex xetex-xetexini.o xetex-xetex0.o xetex-xetex1.o xetex-xetex2.o xetex-xetex_pool.o xetex-xetexextra.o xetex-synctex-xe.o libxetex.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicuuc.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicule.a /opt/home/vvv/src/texlive/source/Work/libs/icu/icu-build/lib/libsicudata.a /opt/home/vvv/src/texlive/source/Work/libs/teckit/libTECkit.a /opt/home/vvv/src/texlive/source/Work/libs/xpdf/libxpdf.a /opt/home/vvv/src/texlive/source/Work/libs/libpng/libpng.a /opt/home/vvv/src/texlive/source/Work/libs/graphite/libgraphite.a -L/opt/home/vvv/src/texlive/source/Work/libs/freetype2 /opt/home/vvv/src/texlive/source/Work/libs/freetype2/libfreetype.a /opt/home/vvv/src/texlive/source/Work/libs/zlib/libz.a lib/lib.a /opt/home/vvv/src/texlive/source/Work/texk/kpathsea/.libs/libkpathsea.a -L/opt/csw/lib /opt/csw/lib/libfontconfig.so -lm -R/opt/csw/lib -R/opt/csw/lib
i.e. put "-L/opt/csw/lib -lfontconfig" near the end, it works much
better, making xetex depend directly only on libfontconfig (and only
indirectly on external libfreetype, which is visible by "ldd -v xetex"
output).
same for xdvipdfmx - by default, link command is:
/opt/csw/bin/bash ../libtool --tag=CC --mode=link cc -xarch=v8 -O -L/opt/csw/lib -o xdvipdfmx agl.o agl_standard.o bmpimage.o cff.o cff_dict.o cid.o cidtype0.o cidtype2.o cmap.o cmap_read.o cmap_write.o cs_type2.o dpxconf.o dpxcrypt.o dpxfile.o dpxutil.o dvi.o dvipdfmx.o epdf.o error.o fontmap.o jpegimage.o mem.o mfileio.o mpost.o numbers.o otl_conf.o otl_opt.o pdfcolor.o pdfdev.o pdfdoc.o pdfdraw.o pdfencoding.o pdfencrypt.o pdffont.o pdfnames.o pdfobj.o pdfparse.o pdfresource.o pdfximage.o pkfont.o pngimage.o pst.o pst_obj.o sfnt.o spc_color.o spc_dvips.o spc_html.o spc_misc.o spc_pdfm.o spc_tpic.o spc_util.o spc_xtx.o specials.o subfont.o tfm.o tt_aux.o tt_cmap.o tt_glyf.o tt_gsub.o tt_post.o tt_table.o truetype.o type0.o t1_char.o t1_load.o type1.o type1c.o unicode.o vf.o xbb.o /opt/home/vvv/src/texlive/source/Work/texk/kpathsea/libkpathsea.la -L/opt/home/vvv/src/texlive/source/Work/libs/freetype2 -lfreetype /opt/home/vvv/src/texlive/source/Work/libs/libpng/libpng.a /opt/home/vvv/src/texlive/source/Work/libs/zlib/libz.a -lfontconfig -lm
libtool: link: cc -xarch=v8 -O -o xdvipdfmx agl.o agl_standard.o bmpimage.o cff.o cff_dict.o cid.o cidtype0.o cidtype2.o cmap.o cmap_read.o cmap_write.o cs_type2.o dpxconf.o dpxcrypt.o dpxfile.o dpxutil.o dvi.o dvipdfmx.o epdf.o error.o fontmap.o jpegimage.o mem.o mfileio.o mpost.o numbers.o otl_conf.o otl_opt.o pdfcolor.o pdfdev.o pdfdoc.o pdfdraw.o pdfencoding.o pdfencrypt.o pdffont.o pdfnames.o pdfobj.o pdfparse.o pdfresource.o pdfximage.o pkfont.o pngimage.o pst.o pst_obj.o sfnt.o spc_color.o spc_dvips.o spc_html.o spc_misc.o spc_pdfm.o spc_tpic.o spc_util.o spc_xtx.o specials.o subfont.o tfm.o tt_aux.o tt_cmap.o tt_glyf.o tt_gsub.o tt_post.o tt_table.o truetype.o type0.o t1_char.o t1_load.o type1.o type1c.o unicode.o vf.o xbb.o -L/opt/csw/lib /opt/home/vvv/src/texlive/source/Work/texk/kpathsea/.libs/libkpathsea.a -L/opt/home/vvv/src/texlive/source/Work/libs/freetype2 /opt/csw/lib/libfreetype.so /opt/home/vvv/src/texlive/source/Work/libs/libpng/libpng.a /opt/home/vvv/src/texlive/source/Work/libs/zlib/libz.a /opt/csw/lib/libfontconfig.so -lz -lm -R/opt/csw/lib -R/opt/csw/lib
and here "-L/opt/csw/lib" is also put way too early.
if i change it to:
bash-2.03$ /opt/csw/bin/bash ../libtool --tag=CC --mode=link cc -xarch=v8 -O -o xdvipdfmx agl.o agl_standard.o bmpimage.o cff.o cff_dict.o cid.o cidtype0.o cidtype2.o cmap.o cmap_read.o cmap_write.o cs_type2.o dpxconf.o dpxcrypt.o dpxfile.o dpxutil.o dvi.o dvipdfmx.o epdf.o error.o fontmap.o jpegimage.o mem.o mfileio.o mpost.o numbers.o otl_conf.o otl_opt.o pdfcolor.o pdfdev.o pdfdoc.o pdfdraw.o pdfencoding.o pdfencrypt.o pdffont.o pdfnames.o pdfobj.o pdfparse.o pdfresource.o pdfximage.o pkfont.o pngimage.o pst.o pst_obj.o sfnt.o spc_color.o spc_dvips.o spc_html.o spc_misc.o spc_pdfm.o spc_tpic.o spc_util.o spc_xtx.o specials.o subfont.o tfm.o tt_aux.o tt_cmap.o tt_glyf.o tt_gsub.o tt_post.o tt_table.o truetype.o type0.o t1_char.o t1_load.o type1.o type1c.o unicode.o vf.o xbb.o /opt/home/vvv/src/texlive/source/Work/texk/kpathsea/libkpathsea.la -L/opt/home/vvv/src/texlive/source/Work/libs/freetype2 -lfreetype /opt/home/vvv/src/texlive/source/Work/libs/libpng/libpng.a /opt/home/vvv/src/texlive/source/Work/libs/zlib/libz.a -L/opt/csw/lib -lfontconfig -lm
libtool: link: cc -xarch=v8 -O -o xdvipdfmx agl.o agl_standard.o bmpimage.o cff.o cff_dict.o cid.o cidtype0.o cidtype2.o cmap.o cmap_read.o cmap_write.o cs_type2.o dpxconf.o dpxcrypt.o dpxfile.o dpxutil.o dvi.o dvipdfmx.o epdf.o error.o fontmap.o jpegimage.o mem.o mfileio.o mpost.o numbers.o otl_conf.o otl_opt.o pdfcolor.o pdfdev.o pdfdoc.o pdfdraw.o pdfencoding.o pdfencrypt.o pdffont.o pdfnames.o pdfobj.o pdfparse.o pdfresource.o pdfximage.o pkfont.o pngimage.o pst.o pst_obj.o sfnt.o spc_color.o spc_dvips.o spc_html.o spc_misc.o spc_pdfm.o spc_tpic.o spc_util.o spc_xtx.o specials.o subfont.o tfm.o tt_aux.o tt_cmap.o tt_glyf.o tt_gsub.o tt_post.o tt_table.o truetype.o type0.o t1_char.o t1_load.o type1.o type1c.o unicode.o vf.o xbb.o /opt/home/vvv/src/texlive/source/Work/texk/kpathsea/.libs/libkpathsea.a -L/opt/home/vvv/src/texlive/source/Work/libs/freetype2 /opt/home/vvv/src/texlive/source/Work/libs/freetype2/libfreetype.a /opt/home/vvv/src/texlive/source/Work/libs/libpng/libpng.a /opt/home/vvv/src/texlive/source/Work/libs/zlib/libz.a -L/opt/csw/lib /opt/csw/lib/libfontconfig.so -lm -R/opt/csw/lib -R/opt/csw/lib
it avoids explicit dependencies on external libfreetype and libz.
could you please change it to put fontconfig-related LDFLAGS near the
end of the link commands?
Best,
v.
More information about the tlbuild
mailing list