cygport install infinite loop in src_postinstall under __prep_libtool_modules

Brian Inglis
Sun Jul 5 19:29:11 GMT 2020

On 2020-07-04 14:06, Marco Atzeri via Cygwin-apps wrote:
> On 04.07.2020 21:35, Brian Inglis wrote:
>> See attached cygport --debug ...cygport install log.
>> Running cygport ... install, src_postinstall under __prep_libtool_modules after
>> "Fixing libtool modules:" does not find dll in:
>> $ find wget2-1.99.2-1.x86_64/ -name 'cygwget*'
>> wget2-1.99.2-1.x86_64/build/libwget/.libs/cygwget-0.dll
>> wget2-1.99.2-1.x86_64/inst/usr/bin/cygwget-0.dll
>> so it loops on /usr/share/cygport/lib/src_postinst.cygpart:1297ff:
>> while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) != ${D}$(__host_prefix) ]
>> do
>>     dlname=../${dlname}
>> done
>> until readlink returns root and just keeps on going, possibly because my Cygwin
>> home is a symlink to my Windows home, but this approach would have problems with
>> any symlinks along the path to the cygport dir, as $D is not similarly resolved.
>> I can wrap the other path in the condition in $(readlink -f ...) and it works
>> normally but this may not be the best approach here.
>> Alternatives, suggestions?
>> In this pre-package there is a check/test program and a DLL - is there another
>> package I could use as a template for how to split this into two packages?
> I assume you are building under some link structure.
> I was hit by long time by it as I was using
> /pub -> /cygdrive/d/cyg_pub
> and building in it.
> Two options:
> 1) patch cygport
> I proposed something for that case
> 2) mount the directory instead of using links.
> I put this in my fstab and removed the link
> d:\cyg_pub /pub  NTFS binary,posix=1,nouser 0 0

Thanks for the feedback and suggestions.
You can't mount everywhere you might want to use a symlink.
I have a number of topic and src directories cross-linked for convenience.
I should be able to cd src and run cygport without issues.
[Cygwin directory symlinks have a quirk I don't remember working on any Unix I
tried: after cd src, I can operate on ../tgt where tgt may be a physical sibling
entry in the same directory as src, so is not limited to be an entry in the
logical directory ../ containing the symlink to src.]

My working kludge was:



while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) !=
					$(readlink -f ${D}$(__host_prefix)) ]

but it would have lower overhead as:
# do full symlink resolution on both paths compared to avoid issues
local dest_prefix=$(readlink -f ${D}$(__host_prefix))

while [ $(readlink -f ${ltlibdir}/${dlname%/bin/*}) != $dest_prefix ]

I now think curl would be the best template for this package, as it includes
exe, lib, devel, and doc subpackages.

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]

More information about the Cygwin-apps mailing list