From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Native compilation on Windows, was Re: Bootstrap Compilation Speed Date: Thu, 03 Feb 2022 09:10:34 +0200 Message-ID: <83k0ec5st1.fsf@gnu.org> References: <87sftmn1k9.fsf@russet.org.uk> <83sftmwner.fsf@gnu.org> <87mtjump5q.fsf@russet.org.uk> <86h7a25nz7.fsf@duenenhof-wilhelm.de> <878rve85yy.fsf@russet.org.uk> <86a6fu3xb2.fsf@duenenhof-wilhelm.de> <87tue1j8x0.fsf@russet.org.uk> <86wniw3kdq.fsf@duenenhof-wilhelm.de> <83tue0u8sh.fsf@gnu.org> <86sftk3evj.fsf@duenenhof-wilhelm.de> <83o848tc92.fsf@gnu.org> <86o8473k13.fsf@duenenhof-wilhelm.de> <83ee53ssbx.fsf@gnu.org> <86sft4c3ij.fsf@gnu.org> <87czk59b7p.fsf@russet.org.uk> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16310"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dieter@duenenhof-wilhelm.de, arash@gnu.org, corwin@bru.st, emacs-devel@gnu.org To: Phillip Lord Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 03 08:20:13 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFWPb-00040t-1r for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Feb 2022 08:20:11 +0100 Original-Received: from localhost ([::1]:56532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFWPX-0005JW-3S for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Feb 2022 02:20:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFWGH-0002Mv-TO for emacs-devel@gnu.org; Thu, 03 Feb 2022 02:10:33 -0500 Original-Received: from [2001:470:142:3::e] (port=56624 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFWGG-0006wf-KN; Thu, 03 Feb 2022 02:10:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ppeY5+O/q38Bicjg4D8XgI4puZNoDX40itwab/fzZak=; b=cPMkZWfo93o6 y/BJTW89cF9fwTysKiLWqhajrEktrOtqyLG70z9Zdn3RHJvmCAHL0l0nO31+2axEAvpyMqyJxVgab 9A6zU5cBoPiAMBFo9KrRXuZXn8F7uAaWJ3G/IMYHkoGI1AlS+4nmncf8yqYdeMc9w3qaoqtlrC8n5 xvCp5AQhphiDK0QNkvAsqY9K1lQkjuL3KX2ADeNMXwnlEvUOn181dBfWWB9jDtNR5tNC8XwuUTFQj hKhs+89vs+7PudbEq3l3AE55hx3X7X4wh6Oki3tJcGxZn4uZis2jaA5vQkWh853KSn8xqpmTTGdvq v3o46i2ukiUxW83gagmwAA==; Original-Received: from [87.69.77.57] (port=4480 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFWGF-0008DS-Qc; Thu, 03 Feb 2022 02:10:32 -0500 In-Reply-To: <87czk59b7p.fsf@russet.org.uk> (message from Phillip Lord on Wed, 02 Feb 2022 22:04:42 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:285828 Archived-At: > From: Phillip Lord > Cc: Arash Esbati , "H. Dieter Wilhelm" > , Eli Zaretskii , Emacs > developers > Date: Wed, 02 Feb 2022 22:04:42 +0000 > > If I remember correctly, this is because the msys dependency tree is > not totally reliable. > > At the time, I was trying hard to decrease the binary > size. Unfortuately, the msys tree is an "at most" dependency rather than > an "at least"; so, it's very easy to find that, again, you've pulled in > half of msys2 which is not the intention. > > Hence this skipping. I can suggest a way to find all the actual dependencies of a set of *.exe programs and DLLs by using only the standard tools, and is thus very reliable. The command to use is this: objdump -p *.exe *.dll | fgrep "DLL Name:" | gawk " {print $3, $4, $5}" | sort -u Run this in the 'bin/' directory where you have executable programs and DLLs, and it will show a sorted list of all the DLLs needed by those programs and DLLs. You will need to recognize and ignore any system DLLs, such as msvcrt.dll, KERNEL32.dll, USER32.dll, WS2_32.dll etc. in the list; for the rest, make sure every one of them is in the same 'bin/' directory. Each time you add some DLL to the 'bin/' directory, re-run the above command again, because adding DLLs can potentially add dependencies. Repeat this process until all the DLLs shown by the command are in the same directory: then you are done.