From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "H. Dieter Wilhelm" Newsgroups: gmane.emacs.devel Subject: Re: Acquiring dependencies for Windows builds, was: Native compilation on Windows Date: Sun, 27 Feb 2022 11:49:29 +0100 Message-ID: References: <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> <83k0ec5st1.fsf@gnu.org> <83v8x7tw4a.fsf@gnu.org> <834k4pu57x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25871"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (windows-nt) Cc: arash@gnu.org, corwin@bru.st, emacs-devel@gnu.org, phillip.lord@russet.org.uk To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 27 11:54:12 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 1nOHBs-0006aQ-7j for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Feb 2022 11:54:12 +0100 Original-Received: from localhost ([::1]:37502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOHBr-0002zE-2m for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Feb 2022 05:54:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOH7T-00072O-5G for emacs-devel@gnu.org; Sun, 27 Feb 2022 05:49:39 -0500 Original-Received: from mout.kundenserver.de ([212.227.17.13]:35729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOH7R-0000uf-Ap; Sun, 27 Feb 2022 05:49:38 -0500 Original-Received: from VSL7V7PW ([92.116.181.180]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MFbiK-1nR2n63gi6-00H6d3; Sun, 27 Feb 2022 11:49:30 +0100 In-Reply-To: <834k4pu57x.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 23 Feb 2022 14:39:46 +0200") X-Provags-ID: V03:K1:/yRyN5GtujOaHH5nxvp8IR0pDwgl+sgehHgxXumCVtllnVmOttH FcaaQwrQX2C/+6CkZFJZZWU178DPBFmB1fdQCpnowfUpLs3kLVWWPM0HWQUaFgVJRug4Yvh enYm9bEF/MU0+0G6xggYlZqk7WV98hRp6d8VSQcZ5AJMmSDFwy5ZCo1TE7FLCpjML8QPDw8 kL5L7TcPZSjlPIqHatVXw== X-UI-Out-Filterresults: notjunk:1;V03:K0:9y0EnxD5c1U=:A6CYZjRSi6ZXgQGfECS0l2 OC4y67lFxGethhMu6xeYpzA48NaL+JFOMXL3OGAVrKWp1YnsZeCbZs5/XcavEfTKExgLZIozM yUxi9RVDMxut7cXUiDOoF/tqjl0TQnX6b3UrBcPDVaP9CDjv14O7wsQUmKAvkhrfZ/mFj0Xbb tp74XRUCXuwe0uYKvyXyato1wIZ3LH76L8QvXKyKtK2dp+xh+F4P3SErEh0QMoNvJQbkLZW+H jIRlVXof+h8bhTNLmvkMUh+47gcIbjSnCMFyYMlvlnFlePsMZdsYnR40zqy71xDaEj4CvOCPW Z7Hs9727LctAicM/r46RuvomUQLiZE1zMJqZCurtJ3J+9nOX1p4+ruRvb9vSMvG3IxkM8rYfx UYNyBPBOOcXhwKQdssTTKJLCPBfUB1CnpYnQsGQRyDNvEoelSsWYzzEpx2uBaJNZ9oHUuYebR nRZBESUflpbCy+o0mi5zegVZVybAhELgl1id+V4eKYoUNjA6trOiIycGlwYbyzewWlH2ugqKq aDsJ8VYzsUKkL25ES1+K4eqff7UIklkOrG0G/vxE7umumcpmUW4AXXfSmkbFtnbDl7jt4iL95 dK0DhIoyika4yqR0tXQQrm1GMmfxc596WAciBjDVXRtZxD/IwmJ3l1nocw569hwTx4WvSJc8y 1TevFBzQVIG9RkWWeL2qgSN0Rj1urosUjTVAp5IbQAJgadGmccP9j0mksve8jKeh/3odz1JVm n7T7MRTqFB++zOC4 Received-SPF: none client-ip=212.227.17.13; envelope-from=dieter@duenenhof-wilhelm.de; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:286716 Archived-At: Eli Zaretskii writes: >> From: "H. Dieter Wilhelm" >> Cc: arash@gnu.org, corwin@bru.st, emacs-devel@gnu.org, >> phillip.lord@russet.org.uk >> Date: Wed, 23 Feb 2022 07:44:50 +0100 >> >> > The dependency on the optional DLLs is implicit, because Emacs loads >> > them dynamically at run time. You need to place the DLLs mentioned in >> > dynamic-library-alist defined in w32-win.el in the bin/ directory, and >> > _then_ repeat the process. That's because we are talking about the >> > dependencies of those dynamically-loaded DLLs. >> >> I see, thank you for this concrete recipe. >> >> I'm a bit baffled, why is in dynamic-library-alist no harfbuzz > > Sorry, forgot about harfbuzz. We load that one by name. (I can > explain why, but I don't think it's relevant to this discussion.) The > name is fixed: libharfbuzz-0.dll. Don't worry, I only hoped that dynamic-library-alist might be the only "source of truth". OK, so we also need take care of libharfbuzz-0.dll. Furthermore, it seems that your recipe and can save about 10 DLLs in comparison to the build-dep-zips.py approach (So far I tested this only with etc/w32-feature.el). It's drawback is that such an iterative approach is painful to do by hand. I'd like to do this in a script and call below MinGW64 command from within Emacs objdump.exe -p *.exe *.dll| fgrep DLL My idea is to do something like the following: (let ((Objdump-buffer (get-buffer-create "*objdump*")) (Bin-folder "~/emacs-build/build/emacs-28.0.91/bin/") (Objdump "d:/appl/MSYS2/mingw64/bin/objdump.exe")) (setq default-directory Bin-folder) (with-current-buffer Objdump-buffer ;;(goto-char (point-min)) (erase-buffer) (shell-command (concat Objdump " -p *.exe *.dll") Objdump-buffer) (keep-lines " DLL Name:") ;; And then filtering steps ;; Iteratively copying files into the Bin-folder.. Which brings output into the Objdump-buffer but I'm not sure if above approach might miss the - possibly - necessary MinGW64 environment information, don't know if it makes a difference when objdump.exe is called from the MinGW64 shell or with shell-command . How would you bring the output of objdump into Emacs? >> but gccjit, gdiplus and shlwapi are there > > Ignore gdiplus and shlwapi, they are system libraries that you don't > need (and cannot, for obvious legal reasons) provide in the binary > package. The reasons they are there are historical, and again > irrelevant. It seems to me that all MSYS DLLs on which Emacs depends have a name component "lib", whereas the Windows libraries have no such substring. (So I can easily filter them out.) Thank you very much Dieter