Missing .la files

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Mon Feb 17 20:26:00 GMT 2014


On 2014-02-17 13:28, Ken Brown wrote:
> I know there has been a change in cygport so that by default, .la files
> are no longer shipped.  But the .la files for fontconfig, expat, and
> freetype are needed for the Cygwin build of xetex.exe for the native TeX
> Live distribution.  This is a static build.  (Native TeX Live uses
> static builds to reduce library dependencies.)

AFAICS the static linkage is the issue here, not the .la files:

> The .la files are present in the x86 distro but not the x86_64 distro.
> Without the .la files, libtool produces a link command line
>
>    g++ ... -o xetex.exe ... -lfontconfig -lexpat -lfreetype ...,

g++ -static?

> resulting in error messages like
>
> /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/bin/ld:
> cannot find -lfontconfig

g++/ld do NOT need .la files in order to link libraries properly.  But 
when linking with -static, .dll.a files will be ignored and only 
libNAME.a files will be found.  (That's why Cygwin's own implibs are .a 
and not .dll.a.)  Since building packages with --disable-static is now 
the default, attempting to link with most libraries will result in such 
an error.

> With the .la files present, the command line becomes
>
>    g++ ... -o xetex.exe ...  /usr/lib/libfontconfig.dll.a
> /usr/lib/libexpat.dll.a /usr/lib/libfreetype.dll.a ...

Which may actually be a bug in libtool by ignoring (or at least changing 
the meaning of) -static.

> A workaround is to copy the .la files from my x86 installation to my
> x86_64 distro.

Please don't do that.

>   If not, can the .la files for those three libraries be added to the
> x86_64 distro?

That's clearly not necessary.  The real question is if we should be 
providing static libraries.  Fedora has moved away from them for the 
most part (and they also remove .la files), and we have been doing the 
same for a while.  Keeping in mind that there is no completely static 
linkage on Cygwin, and we already have a dynamically linked texlive in 
the distro, I'm not convinced that there is a real need to provide 
static libraries for all of its many dependencies.

But as I wrote that, it occurred to me that IIRC texlive can be built 
with either system or bundled dependencies.  Wouldn't their distribution 
be built with --without-system-*?


Yaakov



More information about the Cygwin-apps mailing list