delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/21/14:58:57

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sat, 21 Aug 2010 20:58:42 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: kernel32.dll breakage (was Re: [ANNOUNCEMENT] Updated: cygwin-1.7.6-1)
Message-ID: <20100821185842.GV11340@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4C6FF91A DOT 1000402 AT alice DOT it>
MIME-Version: 1.0
In-Reply-To: <4C6FF91A.1000402@alice.it>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Aug 21 18:04, Angelo Graziosi wrote:
> wget http://cygwin.com/snapshots/cygwin1-20100820.dll.bz2
> bunzip2 cygwin1-20100820.dll.bz2
> chmod +x cygwin1-20100820.dll
> [...]
> With 20100820 snapshot Cygwin.bat does not start and Windows says
> (literally):
> [...]
> "Can not find entry point CreateProcessAsUserW procedure in the
> dynamic link library KERNEL32.dll"
> 
> As you can see a mystery...

Not anymore.  I could reproduce the problem on XP, but not on W7.  This
reminded me of a checkin to w32api from yesterday.  The kernel32.def
file, which is used to create the kernel32.a inport library for
linking against kernel32.dll has been regenerated on a Windows 7 system.

The problem is that CreateProcessAsUserW was never available in
kernel32.dll, but in advapi32.dll(*).  However, with the new kernel32.def,
CreateProcessAsUserW is now exported by kernel32.a as well.

Apparently kernel32.dll *does* export CreateProcessAsUserW now under
Windows 7.  However, *officially*, the CreateProcessAsUserW symbol is
still provided by advapi32.dll.

Chris [Sutcliffe], can we please revert this change for now?  It breaks
building Win32 apps, if the link order prefers kernel32.a over advapi32.a.

In theory, shouldn't the gendef script drop symbols from kernel32.def
which are defined in advapi32.dll?  That would fix the problem, afaics.

As for Cygwin, apparently we can workaround this issue by simply changing
the link order in our Makefile.  I checked in a matching patch, which
fixes this issue for me on "old" systems like Windows XP.

Please test the next developers snapshot.


Corinna

(*) Yes, I talked nonsense in my previous reply.  advapi32, not kernel32.
    I should have seen the discrepancy immediately.  Sorry about that!

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019