[tlbuild] Static linking of C++ runtime library causing problems on x86_64-cygwin
Ken Brown
kbrow1i at gmail.com
Tue Feb 18 16:50:38 CET 2014
Hi Peter,
Several years ago you came up with a way of statically linking the C++
runtime library on Cygwin, which you incorporated into kpse-cxx-hack.m4.
It turns out that this is causing problems for the build of TeX Live
on x86_64-cygwin. [The same problem should actually occur on
x86-cygwin, but it currently doesn't because of a minor packaging
difference between the x86 and x86_64 distributions. This will change
in the future.]
Specifically, the link command line for xetex looks like this:
g++...-o xetex.exe...-lfontconfig -lexpat -lfreetype...-static...
and the -static flag causes the linker to try to statically link
fontconfig, expat, and freetype. This fails because Cygwin doesn't have
static libraries for fontconfig and freetype. (It does have one for
expat, but this may change in the future.)
A fix would be to change the library flags to
-Wl,-Bdynamic -lfontconfig -lexpat -lfreetype -Wl,-Bstatic
Is this easy to accomplish? If not, maybe we should just give up
statically linking the C++ library on Cygwin, unless you think that's
important.
Thanks.
Ken
More information about the tlbuild
mailing list