[tlbuild] Static linking of C++ library no longer working in cygwin build

Peter Breitenlohner peb at mppmu.mpg.de
Mon Aug 10 14:28:34 CEST 2009

On Mon, 10 Aug 2009, Ken Brown wrote:

> Hi Peter,
> I've just discovered that static linking of the C++ runtime library stopped 
> working in my cygwin build.  I found the following in 
> Work/libs/teckit/config.log:
> configure:5017: checking for statically linking C++ runtime library
> configure:5059: g++-4 -o conftest.exe -Wno-write-strings -Wno-attributes 
> -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc conftest.cpp 
> -nodefaultlibs -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm -lgcc_eh -lgcc -lc 
> -lgcc_eh -lgcc >&5
> [...]
> configure:5102: result: not supported
> So the special cygwin test that you put into kpse-cxx-hack.m4 isn't being 
> used.  Could the problem be that $host is not defined during the teckit 
> configuration?
> I've been building with the -C option, so the "not supported" result is 
> cached and the test is never done again.

Hi Ken,

Ouch, my mistake. kpse-cxx-hack, as originally designed for texk/*/ requires
AC_CANONOCAL_HOST but doesn't say so since that is automatically provided by
kpse-common.m4 used in texk/*/configure.ac.  Later kpse-cxx-hack was also
used for teckit_compile from libs/teckit/.

Could you please run a quick test (assuming the you have used the ./Build
 	cd ./Work
 	rm config.cache
 	rm -rf texk/lcdf-typetools
This should configure and build lcdf-typetools, this time linking the C++
runtime library statically.  Please tell if this works result.

In the meantime I'll fix kpse-cxx-hack.m4.


More information about the tlbuild mailing list