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: cygport install infinite loop in src_postinstall under __prep_libtool_modules
Date: Sat, 4 Jul 2020 13:35:54 -0600	[thread overview]
Message-ID: <359290a2-b299-ad90-5083-30789099a3eb@SystematicSw.ab.ca> (raw)

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

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?

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

[-- Attachment #2: cygport-install-src_postinstall-prep_libtool_modules-loop.log --]
[-- Type: text/plain, Size: 9528 bytes --]

...
...
...
+ __prep_libtool_modules
+ local ltlibs ltlibdir ltlibname ltversion
+ local dlname origdlname library_names old_library inherited_linker_flags dependency_libs weak_library_names current age revision installed shouldnotlink dlopen dlpreopen libdir rep_requires
+ local keep=none
+ pushd /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst
+ builtin pushd /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst
++ find usr -name '*.la'
+ ltlibs=usr/lib/libwget.la
+ defined ltlibs
+ ((  1 != 1  ))
+ '[' -n usr/lib/libwget.la ']'
+ return 0
+ echo 'Fixing libtool modules:'
Fixing libtool modules:
++ grep '^# libtool (GNU' /usr/bin/libtool
++ cut -d ' ' -f 2-
+ ltversion='libtool (GNU libtool) 2.4.6'
+ for lib_la in ${ltlibs}
+ grep -q 'libtool library file' usr/lib/libwget.la
+ source usr/lib/libwget.la
++ dlname=../bin/cygwget-0.dll
++ library_names=libwget.dll.a
++ old_library=
++ inherited_linker_flags=
++ dependency_libs=' -liconv -lintl -lpthread -lpcre2-8 -lidn2 -lzstd -lbrotlidec -llzma -lz -lgpgme -lbz2 -lnghttp2 -lpsl -lnettle'
++ weak_library_names=
++ current=0
++ age=0
++ revision=0
++ installed=yes
++ shouldnotlink=no
++ dlopen=
++ dlpreopen=
++ libdir=/usr/lib
+ ltlibdir=usr/lib
+ for l in dlname library_names old_library
+ defined dlname
+ ((  1 != 1  ))
+ '[' -n ../bin/cygwget-0.dll ']'
+ return 0
+ for il in ${!l}
+ '[' '!' -f usr/lib/../bin/cygwget-0.dll ']'
+ for l in dlname library_names old_library
+ defined library_names
+ ((  1 != 1  ))
+ '[' -n libwget.dll.a ']'
+ return 0
+ for il in ${!l}
+ '[' '!' -f usr/lib/libwget.dll.a ']'
+ for l in dlname library_names old_library
+ defined old_library
+ ((  1 != 1  ))
+ '[' -n '' ']'
+ return 1
+ '[' xno '!=' xyes ']'
+ '[' x../bin/cygwget-0.dll = x ']'
+ case ${CTARGET} in
+ '[' -f usr/lib/libwget.dll.a ']'
+ chmod 0644 usr/lib/libwget.dll.a
+ test x86_64-pc-cygwin '!=' x86_64-pc-cygwin
+ origdlname=../bin/cygwget-0.dll
++ readlink -f usr/lib/..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive/c/Users/$user/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../bin/cygwget-0.dll
++ readlink -f usr/lib/../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive/c/Users/$user/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive/c/Users/$user/src/cygwin/wget2/wget2-1.99.2-1.x86_64 '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive/c/Users/$user/src/cygwin/wget2 '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive/c/Users/$user/src/cygwin '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive/c/Users/$user/src '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive/c/Users/$user '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive/c/Users '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive/c '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../../../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc/cygdrive '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../../../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../../../../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' /proc '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../../../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../../../../../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' / '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../../../../../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../../../../../../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
++ prefix=/usr
++ echo -n /usr
+ '[' / '!=' /home/$USER/src/cygwin/wget2/wget2-1.99.2-1.x86_64/inst/usr ']'
+ dlname=../../../../../../../../../../../../../../bin/cygwget-0.dll
++ readlink -f usr/lib/../../../../../../../../../../../../../..
++ __host_prefix
++ local prefix
++ __host_is_embedded
++ local ret=1
++ case ${CHOST} in
++ return 1
++ [[ x86_64-pc-cygwin =~ -mingw32 ]]
++ inherited cross
++ local class
++ local classname
++ for class in "$@"
++ classname=cross
++ defined _cross_CYGCLASS_
++ ((  1 != 1  ))
++ '[' -n '' ']'
++ return 1
++ return 1
...
...
...

             reply	other threads:[~2020-07-04 19:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-04 19:35 Brian Inglis [this message]
2020-07-04 20:06 ` Marco Atzeri
2020-07-05 19:29   ` Brian Inglis
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=359290a2-b299-ad90-5083-30789099a3eb@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).