public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin-apps@cygwin.com
Subject: Re: cygport install infinite loop in src_postinstall under __prep_libtool_modules
Date: Sun, 5 Jul 2020 13:29:11 -0600	[thread overview]
Message-ID: <3051372d-f7a9-d384-61c9-bd9964bd258d@SystematicSw.ab.ca> (raw)
In-Reply-To: <9e5761e2-0488-f83d-a43d-57a6e9a5419f@gmail.com>

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
> https://sourceware.org/pipermail/cygwin-apps/2020-April/039990.html
> 
> 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:

/usr/share/cygport/lib/src_postinst.cygpart:1295ff:

origdlname=${dlname}

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

but it would have lower overhead as:
	
origdlname=${dlname}
# 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 ]
do
	dlname=../${dlname}
done

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.]

  reply	other threads:[~2020-07-05 19:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-04 19:35 Brian Inglis
2020-07-04 20:06 ` Marco Atzeri
2020-07-05 19:29   ` Brian Inglis [this message]
2020-07-05  5:27 ` ASSI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3051372d-f7a9-d384-61c9-bd9964bd258d@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).