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: Acquiring dependencies for Windows builds, was: Native compilation on Windows Date: Sun, 27 Feb 2022 13:07:32 +0200 Message-ID: <83mtico9e3.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16052"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arash@gnu.org, corwin@bru.st, emacs-devel@gnu.org, phillip.lord@russet.org.uk To: "H. Dieter Wilhelm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 27 12:09:16 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 1nOHQR-00042W-Uy for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Feb 2022 12:09:16 +0100 Original-Received: from localhost ([::1]:44064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOHQQ-0000BY-Tf for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Feb 2022 06:09:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOHP2-0007mw-HZ for emacs-devel@gnu.org; Sun, 27 Feb 2022 06:07:49 -0500 Original-Received: from [2001:470:142:3::e] (port=47758 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 1nOHP0-0000SS-Hl; Sun, 27 Feb 2022 06:07:47 -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=hLhlBLpO4d6su5pMZbbm2VYvi75q3Oj1S80ZrPz+fmg=; b=p98ozJ1x4aLZ XkYhz+EY2FsDgsmlU1xYD3Zz1emuZft9ZsPVWSHUIzfKO0duvJsC4roEbDUVo2H74XBJDTRq9HGpF iglOJkfBFR5Cs0Q89evgq/3f+O9pFb/7Kkb/+YnI9QAWWqh083RKG7uq7hqUHcMGY0F7KVRtiBeSr QIKfxi29h/R9t9s5xA0BQiBn1ZJlJ+4swGunoJWx84pv+iitQiNXHxkfE0rJLfU+gM9eC0pR+mI+2 SVIrrXoG0HZV4NQglvZCqstW+OGmK1xyWEhmc82jZrxnw24vL9aGlG2+iPjeOWs+UvQUDrDdvlkMa mn9MUV8VdeSVQ4wSiA2vIA==; Original-Received: from [87.69.77.57] (port=3193 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 1nOHOz-00084v-GF; Sun, 27 Feb 2022 06:07:45 -0500 In-Reply-To: (dieter@duenenhof-wilhelm.de) 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:286717 Archived-At: > From: "H. Dieter Wilhelm" > Cc: arash@gnu.org, corwin@bru.st, phillip.lord@russet.org.uk, > emacs-devel@gnu.org > Date: Sun, 27 Feb 2022 11:49:29 +0100 > > 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.. First, no need to hard-code the location of objdump.exe: executable-find should be able to find it. Second, you change the default-directory in the wrong buffer, I think. More importantly, I don't see where you have the list of all the DLLs that Emacs loads. You need to start from that list. > 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 . I don't think I follow your fears here. What exactly did you think could go wrong? What do you mean by "necessary MinGW64 environment information"? > How would you bring the output of objdump into Emacs? shell-command accepts an optional argument to that effect. > 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.) There are exceptions: zlib1.dll. For now, it's the only exception AFAIK, but watch out for others.