From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:102]) by sourceware.org (Postfix) with ESMTPS id 51F35385DC11 for ; Fri, 16 Jul 2021 04:05:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 51F35385DC11 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru Received: from myt6-de4b83149afa.qloud-c.yandex.net (myt6-de4b83149afa.qloud-c.yandex.net [IPv6:2a02:6b8:c12:401e:0:640:de4b:8314]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 1ABC354C1C57; Fri, 16 Jul 2021 07:05:03 +0300 (MSK) Received: from myt3-07a4bd8655f2.qloud-c.yandex.net (myt3-07a4bd8655f2.qloud-c.yandex.net [2a02:6b8:c12:693:0:640:7a4:bd86]) by myt6-de4b83149afa.qloud-c.yandex.net (mxback/Yandex) with ESMTP id Il4P0cXUP9-52IeFEwS; Fri, 16 Jul 2021 07:05:03 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1626408303; bh=0E0O+bcbEAjkm4pcp2KuASop1Ejiw0IXd48Krb7qucE=; h=In-Reply-To:Subject:To:From:Message-ID:References:Date:Reply-To; b=w8kNxefcnDq2rCZ3YKrp2sw9cu8fAAOVekFb8KFY67dfVyhjK/s9scrjBW6PocTul GzOoYn2eE4+InLYxwNyg9lxYbZ62WTAUvTni7oSkdqx+X8O1Trua0N3fmxfxgrI4P4 RGIbPb4qFXHI2nTeAwXWfSmCAzrOdAguBD7bQZ2U= Authentication-Results: myt6-de4b83149afa.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by myt3-07a4bd8655f2.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id Ai2rhkUGh9-522O8Bfo; Fri, 16 Jul 2021 07:05:02 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Fri, 16 Jul 2021 03:59:46 -0000 Date: Fri, 16 Jul 2021 06:59:46 +0300 From: Andrey Repin X-Mailer: The Bat! (v6.8.8) Home Reply-To: cygwin@cygwin.com X-Priority: 3 (Normal) Message-ID: <806627264.20210716065946@yandex.ru> To: Doug Henderson , cygwin@cygwin.com Subject: Re: Setup shows errors from gnuplot-base.dash and python38-devel.sh In-Reply-To: References: <87sg0g67o7.fsf@Rainer.invalid> <56b09345-e2a9-ed55-1627-421261ecd756@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2021 04:05:08 -0000 Greetings, Doug Henderson! >> >>> When I do that in an elevated shell: >> >>> >> >>> $ cd /etc/postinstall/ >> >>> >> >>> $ cat gnuplot-base.dash >> >>> /usr/sbin/alternatives --install /usr/bin/gnuplot gnuplot >> >>> /usr/bin/gnuplot-base.exe 10 >> >>> >> >>> $ . gnuplot-base.dash >> >>> failed to read link /usr/bin/gnuplot: No such file or directory >> >>> failed to link /usr/bin/gnuplot -> /etc/alternatives/gnuplot: No such >> >>> file or directory >> >> >> >> Something seems to be confusing 'alternatives'. Can you show a listing of >> >> /etc/alternatives? >> > >> > $ cd /etc/alternatives/ >> > >> > $ ls -l >> > total 2.0K >> > lrwxrwxrwx 1 Admin None 35 Oct 3 2017 automake-doc -> >> > /usr/share/info/automake1.9.info.gz >> > lrwxrwxrwx 1 Admin None 19 Jun 16 17:48 lua -> /usr/bin/lua5.3.exe* >> > lrwxrwxrwx 1 Admin None 31 Jun 16 17:48 lua.1.gz -> >> > /usr/share/man/man1/lua5.3.1.gz >> > lrwxrwxrwx 1 Admin None 20 Jun 16 17:48 luac -> /usr/bin/luac5.3.exe* >> > lrwxrwxrwx 1 Admin None 32 Jun 16 17:48 luac.1.gz -> >> > /usr/share/man/man1/luac5.3.1.gz >> > lrwxrwxrwx 1 Admin None 15 Jun 5 08:46 pip3 -> /usr/bin/pip3.8* >> > lrwxrwxrwx 1 Admin None 22 Jun 16 07:34 python -> /usr/bin/python3.8.exe* >> > -rw-r--r-- 1 Admin None 163 Apr 4 2013 README >> >> This shows that alternatives worked in June. Have you changed anything since >> then that might be related to symlinks (e.g., the CYGWIN environment variable)? >> >> Here are a few other things you could try: >> >> 1. Attach cygcheck output as requested in https://cygwin.com/problems.html >> >> 2. Add --verbose to the alternatives call. >> >> 3. Run the alternatives call under strace and look for errors involving >> symlinks. Or post the output somewhere so that we can look at it. > Now using setup-x86_64.exe version 2.909 (64 bit) > Postinstall script errors: > Package: _/Unknown package > gnuplot-base.dash exit code 2 > python38-devel.sh exit code 2 > Here's what I did in an elevated shell. > $ cd /etc/alternatives > $ cat /etc/postinstall/gnuplot-base.dash > /usr/sbin/alternatives --install /usr/bin/gnuplot gnuplot > /usr/bin/gnuplot-base.exe 10 > $ /usr/sbin/alternatives --verbose --install /usr/bin/gnuplot gnuplot > /usr/bin/gnuplot-base.exe 10 > reading /var/lib/alternatives/gnuplot > failed to read link /usr/bin/gnuplot: No such file or directory > failed to link /usr/bin/gnuplot -> /etc/alternatives/gnuplot: No such > file or directory > $ echo $CYGWIN > winsymlinks:nativestrict > *** changed system environment > $ echo $CYGWIN > winsymlinks:native > $ /usr/sbin/alternatives --verbose --install /usr/bin/gnuplot gnuplot > /usr/bin/gnuplot-base.exe 10 > reading /var/lib/alternatives/gnuplot > *** Success > Alternatives does not work correctly when CYGWIN=nativestrict. Perhaps > it is trying to create a link before the link target exists. Unlike > Linux, Windows does not allow creating symbolic links to non-existent > targets. > The /etc/postinstall/python38-devel.sh also works now. > Also after changing env back to CYGWIN=winsymlinks:nativestrict the > erroring postinstall scripts continue to work. This supports my > suspicion that /usr/sbin/alternatives is trying to create a symbolic > link to a target before it creates the target when it is performing > the first install for an alternative. On subsequent runs, the target > already exists. > I have unattached the output from cygcheck, as I do not believe it > will help now. > Am I the only person that uses "CYGWIN=winsymlinks:nativestrict" ??? $ echo "$CYGWIN" wincmdln winsymlinks:nativestrict glob:ignorecase > Sorry for all the bother. My aging brain forgot how I made > alternatives work for Lua last month. I've stumbled upon the same problem earlier. alternatives tries to create a link pointing to a nonexistent file. Which is valid in Linux, but impossible in Windows. IMO, this is a logical fallacy and should not be attempted, making it an upstream bug. -- With best regards, Andrey Repin Friday, July 16, 2021 6:56:55 Sorry for my terrible english...