* on how to install gnutls dlls on windows
@ 2021-04-18 16:12 Wayne Harris via Users list for the GNU Emacs text editor
2021-04-18 16:22 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-04-18 16:12 UTC (permalink / raw)
To: help-gnu-emacs
I don't know how to install this library. My GNU Emacs 27.1 is a 64-bit
application. I have MSYS2 installed and I used PACMAN to install the
packages
gnutls-3.7.0-1-x86_64.pkg.tar.zst
libgnutls-3.7.0-1-x86_64.pkg.tar.zst
As a consequence, I have the following files, among others:
--8<---------------cut here---------------start------------->8---
./usr/bin/gnutls-cli-debug.exe
./usr/bin/gnutls-cli.exe
./usr/bin/gnutls-serv.exe
./usr/bin/msys-gnutls-30.dll
./usr/bin/msys-gnutlsxx-28.dll
./var/cache/pacman/pkg/gnutls-3.7.0-1-x86_64.pkg.tar.zst
./var/cache/pacman/pkg/libgnutls-3.7.0-1-x86_64.pkg.tar.zst
./bin/gnutls-cli-debug.exe
./bin/gnutls-cli.exe
./bin/gnutls-serv.exe
./bin/msys-gnutls-30.dll
./bin/msys-gnutlsxx-28.dll
--8<---------------cut here---------------end--------------->8---
Executables such as gnutls-cli.exe work just fine. But I've no idea
what the procedure
gnutls-available-p
expects. It always returns nil to me in GNU Emacs 27.1. The procedure
is defined in C source code. The page
http://xn--9dbdkw.se/diary/how_to_enable_GnuTLS_for_Emacs_24_on_Windows/index.en.html
talks about it from the standpoint of GNU Emacs 24. I have actually
successfully installed GnuTLS in Emacs 24.3, but the same approach
doesn't seem to work on GNU Emacs 27.1.
Thanks for pointing me in any interesting directions here!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-18 16:12 on how to install gnutls dlls on windows Wayne Harris via Users list for the GNU Emacs text editor
@ 2021-04-18 16:22 ` Eli Zaretskii
2021-04-18 16:44 ` Wayne Harris via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2021-04-18 16:22 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 18 Apr 2021 13:12:53 -0300
> From: Wayne Harris via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> I don't know how to install this library. My GNU Emacs 27.1 is a 64-bit
> application. I have MSYS2 installed and I used PACMAN to install the
> packages
>
> gnutls-3.7.0-1-x86_64.pkg.tar.zst
> libgnutls-3.7.0-1-x86_64.pkg.tar.zst
>
> As a consequence, I have the following files, among others:
>
> --8<---------------cut here---------------start------------->8---
> ./usr/bin/gnutls-cli-debug.exe
> ./usr/bin/gnutls-cli.exe
> ./usr/bin/gnutls-serv.exe
> ./usr/bin/msys-gnutls-30.dll
> ./usr/bin/msys-gnutlsxx-28.dll
> ./var/cache/pacman/pkg/gnutls-3.7.0-1-x86_64.pkg.tar.zst
> ./var/cache/pacman/pkg/libgnutls-3.7.0-1-x86_64.pkg.tar.zst
> ./bin/gnutls-cli-debug.exe
> ./bin/gnutls-cli.exe
> ./bin/gnutls-serv.exe
> ./bin/msys-gnutls-30.dll
> ./bin/msys-gnutlsxx-28.dll
> --8<---------------cut here---------------end--------------->8---
You've installed the wrong package: the above is the MSYS GnuTLS,
whereas you need MinGW port of GnuTLS. Look for a package with
"mingw" in its name.
To install, put the DLLs in the package either in the same directory
where you have the emacs.exe executable, or somewhere on your Path.
> gnutls-available-p
>
> expects. It always returns nil to me in GNU Emacs 27.1. The procedure
> is defined in C source code.
Yes, because the native Windows build of Emacs cannot use MSYS DLLs,
it must have MinGW DLLs.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-18 16:22 ` Eli Zaretskii
@ 2021-04-18 16:44 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-18 17:13 ` Óscar Fuentes
2021-04-18 17:18 ` Eli Zaretskii
0 siblings, 2 replies; 13+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-04-18 16:44 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sun, 18 Apr 2021 13:12:53 -0300
>> From: Wayne Harris via Users list for the GNU Emacs text editor
>> <help-gnu-emacs@gnu.org>
>>
>> I don't know how to install this library. My GNU Emacs 27.1 is a 64-bit
>> application. I have MSYS2 installed and I used PACMAN to install the
>> packages
>>
>> gnutls-3.7.0-1-x86_64.pkg.tar.zst
>> libgnutls-3.7.0-1-x86_64.pkg.tar.zst
>>
>> As a consequence, I have the following files, among others:
>>
>> --8<---------------cut here---------------start------------->8---
>> ./usr/bin/gnutls-cli-debug.exe
>> ./usr/bin/gnutls-cli.exe
>> ./usr/bin/gnutls-serv.exe
>> ./usr/bin/msys-gnutls-30.dll
>> ./usr/bin/msys-gnutlsxx-28.dll
>> ./var/cache/pacman/pkg/gnutls-3.7.0-1-x86_64.pkg.tar.zst
>> ./var/cache/pacman/pkg/libgnutls-3.7.0-1-x86_64.pkg.tar.zst
>> ./bin/gnutls-cli-debug.exe
>> ./bin/gnutls-cli.exe
>> ./bin/gnutls-serv.exe
>> ./bin/msys-gnutls-30.dll
>> ./bin/msys-gnutlsxx-28.dll
>> --8<---------------cut here---------------end--------------->8---
>
> You've installed the wrong package: the above is the MSYS GnuTLS,
> whereas you need MinGW port of GnuTLS. Look for a package with
> "mingw" in its name.
>
> To install, put the DLLs in the package either in the same directory
> where you have the emacs.exe executable, or somewhere on your Path.
Thanks! But I'm not quite there yet. I found
mingw-w64-x86_64-gnutls
and installed it:
--8<---------------cut here---------------start------------->8---
%pacman -S mingw-w64-x86_64-gnutls
resolving dependencies...
looking for conflicting packages...
Packages (4) mingw-w64-x86_64-libidn2-2.3.0-1
mingw-w64-x86_64-libunistring-0.9.10-2
mingw-w64-x86_64-nettle-3.7-1 mingw-w64-x86_64-gnutls-3.7.0-1
Total Download Size: 3.49 MiB
Total Installed Size: 21.18 MiB
:: Proceed with installation? [Y/n] Y
Y
:: Retrieving packages...
downloading mingw-w64-x86_64-libunistring-0.9.10-2-any.pkg.tar.zst...
downloading mingw-w64-x86_64-libidn2-2.3.0-1-any.pkg.tar.xz...
downloading mingw-w64-x86_64-nettle-3.7-1-any.pkg.tar.zst...
downloading mingw-w64-x86_64-gnutls-3.7.0-1-any.pkg.tar.zst...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing mingw-w64-x86_64-libunistring...
installing mingw-w64-x86_64-libidn2...
installing mingw-w64-x86_64-nettle...
installing mingw-w64-x86_64-gnutls...
--8<---------------cut here---------------end--------------->8---
Then I looked at all DLLs that all packages bring:
--8<---------------cut here---------------start------------->8---
%pacman -Ql mingw-w64-x86_64-gnutls mingw-w64-x86_64-nettle mingw-w64-x86_64-libidn2 mingw-w64-x86_64-libunistring | grep dll
mingw-w64-x86_64-gnutls /mingw64/bin/libgnutls-30.dll
mingw-w64-x86_64-gnutls /mingw64/bin/libgnutlsxx-28.dll
mingw-w64-x86_64-gnutls /mingw64/lib/libgnutls.dll.a
mingw-w64-x86_64-gnutls /mingw64/lib/libgnutlsxx.dll.a
mingw-w64-x86_64-nettle /mingw64/bin/libhogweed-6.dll
mingw-w64-x86_64-nettle /mingw64/bin/libnettle-8.dll
mingw-w64-x86_64-nettle /mingw64/lib/libhogweed.dll.a
mingw-w64-x86_64-nettle /mingw64/lib/libnettle.dll.a
mingw-w64-x86_64-libidn2 /mingw64/bin/libidn2-0.dll
mingw-w64-x86_64-libidn2 /mingw64/lib/libidn2.dll.a
mingw-w64-x86_64-libunistring /mingw64/bin/libunistring-2.dll
mingw-w64-x86_64-libunistring /mingw64/include/unistring/woe32dll.h
mingw-w64-x86_64-libunistring /mingw64/lib/libunistring.dll.a
--8<---------------cut here---------------end--------------->8---
I copied them all to c:/sys/emacs/bin, where my emacs.exe lives:
--8<---------------cut here---------------start------------->8---
%pwd
c:/sys/emacs/bin
%ls -l emacs.exe
-rwxr-xr-x 1 x 6459904 Aug 21 2020 emacs.exe
%file emacs.exe
emacs.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
%(setenv "p" "c:/sys/emacs/usr/mingw/mingw64/bin/")
c:/sys/emacs/usr/mingw/mingw64/bin/
%echo $p
c:/sys/emacs/usr/mingw/mingw64/bin/
%cp $p/libgnutls-30.dll $p/libgnutlsxx-28.dll $p/libhogweed-6.dll \
$p/libnettle-8.dll $p/libidn2-0.dll $p/libunistring-2.dll .
%ls lib*
libgnutls-30.dll
libgnutlsxx-28.dll
libhogweed-6.dll
libidn2-0.dll
libnettle-8.dll
libpng-config
libpng16-config
libunistring-2.dll
%
--8<---------------cut here---------------end--------------->8---
I ran another emacs instance (through runemacs.exe), but
gnutls-available-p
still produces nil.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-18 16:44 ` Wayne Harris via Users list for the GNU Emacs text editor
@ 2021-04-18 17:13 ` Óscar Fuentes
2021-04-18 21:43 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-18 17:18 ` Eli Zaretskii
1 sibling, 1 reply; 13+ messages in thread
From: Óscar Fuentes @ 2021-04-18 17:13 UTC (permalink / raw)
To: help-gnu-emacs
Wayne Harris via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> Date: Sun, 18 Apr 2021 13:12:53 -0300
>>> From: Wayne Harris via Users list for the GNU Emacs text editor
>>> <help-gnu-emacs@gnu.org>
>>>
>>> I don't know how to install this library. My GNU Emacs 27.1 is a 64-bit
>>> application. I have MSYS2 installed and I used PACMAN to install the
>>> packages
>>>
>>> gnutls-3.7.0-1-x86_64.pkg.tar.zst
>>> libgnutls-3.7.0-1-x86_64.pkg.tar.zst
>>>
>>> As a consequence, I have the following files, among others:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> ./usr/bin/gnutls-cli-debug.exe
>>> ./usr/bin/gnutls-cli.exe
>>> ./usr/bin/gnutls-serv.exe
>>> ./usr/bin/msys-gnutls-30.dll
>>> ./usr/bin/msys-gnutlsxx-28.dll
>>> ./var/cache/pacman/pkg/gnutls-3.7.0-1-x86_64.pkg.tar.zst
>>> ./var/cache/pacman/pkg/libgnutls-3.7.0-1-x86_64.pkg.tar.zst
>>> ./bin/gnutls-cli-debug.exe
>>> ./bin/gnutls-cli.exe
>>> ./bin/gnutls-serv.exe
>>> ./bin/msys-gnutls-30.dll
>>> ./bin/msys-gnutlsxx-28.dll
>>> --8<---------------cut here---------------end--------------->8---
>>
>> You've installed the wrong package: the above is the MSYS GnuTLS,
>> whereas you need MinGW port of GnuTLS. Look for a package with
>> "mingw" in its name.
>>
>> To install, put the DLLs in the package either in the same directory
>> where you have the emacs.exe executable, or somewhere on your Path.
>
> Thanks! But I'm not quite there yet. I found
>
> mingw-w64-x86_64-gnutls
>
> and installed it:
>
> %pacman -S mingw-w64-x86_64-gnutls
> resolving dependencies...
> looking for conflicting packages...
>
> Packages (4) mingw-w64-x86_64-libidn2-2.3.0-1
> mingw-w64-x86_64-libunistring-0.9.10-2
> mingw-w64-x86_64-nettle-3.7-1 mingw-w64-x86_64-gnutls-3.7.0-1
>
> Total Download Size: 3.49 MiB
> Total Installed Size: 21.18 MiB
>
> :: Proceed with installation? [Y/n] Y
> Y
> :: Retrieving packages...
> downloading mingw-w64-x86_64-libunistring-0.9.10-2-any.pkg.tar.zst...
> downloading mingw-w64-x86_64-libidn2-2.3.0-1-any.pkg.tar.xz...
> downloading mingw-w64-x86_64-nettle-3.7-1-any.pkg.tar.zst...
> downloading mingw-w64-x86_64-gnutls-3.7.0-1-any.pkg.tar.zst...
> checking keyring...
> checking package integrity...
> loading package files...
> checking for file conflicts...
> checking available disk space...
> :: Processing package changes...
> installing mingw-w64-x86_64-libunistring...
> installing mingw-w64-x86_64-libidn2...
> installing mingw-w64-x86_64-nettle...
> installing mingw-w64-x86_64-gnutls...
>
>
> Then I looked at all DLLs that all packages bring:
>
> %pacman -Ql mingw-w64-x86_64-gnutls mingw-w64-x86_64-nettle mingw-w64-x86_64-libidn2 mingw-w64-x86_64-libunistring | grep dll
> mingw-w64-x86_64-gnutls /mingw64/bin/libgnutls-30.dll
> mingw-w64-x86_64-gnutls /mingw64/bin/libgnutlsxx-28.dll
> mingw-w64-x86_64-gnutls /mingw64/lib/libgnutls.dll.a
> mingw-w64-x86_64-gnutls /mingw64/lib/libgnutlsxx.dll.a
> mingw-w64-x86_64-nettle /mingw64/bin/libhogweed-6.dll
> mingw-w64-x86_64-nettle /mingw64/bin/libnettle-8.dll
> mingw-w64-x86_64-nettle /mingw64/lib/libhogweed.dll.a
> mingw-w64-x86_64-nettle /mingw64/lib/libnettle.dll.a
> mingw-w64-x86_64-libidn2 /mingw64/bin/libidn2-0.dll
> mingw-w64-x86_64-libidn2 /mingw64/lib/libidn2.dll.a
> mingw-w64-x86_64-libunistring /mingw64/bin/libunistring-2.dll
> mingw-w64-x86_64-libunistring /mingw64/include/unistring/woe32dll.h
> mingw-w64-x86_64-libunistring /mingw64/lib/libunistring.dll.a
>
>
> I copied them all to c:/sys/emacs/bin, where my emacs.exe lives:
>
> %pwd
> c:/sys/emacs/bin
>
> %ls -l emacs.exe
> -rwxr-xr-x 1 x 6459904 Aug 21 2020 emacs.exe
>
> %file emacs.exe
> emacs.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
>
> %(setenv "p" "c:/sys/emacs/usr/mingw/mingw64/bin/")
> c:/sys/emacs/usr/mingw/mingw64/bin/
>
> %echo $p
> c:/sys/emacs/usr/mingw/mingw64/bin/
>
> %cp $p/libgnutls-30.dll $p/libgnutlsxx-28.dll $p/libhogweed-6.dll \
> $p/libnettle-8.dll $p/libidn2-0.dll $p/libunistring-2.dll .
>
> %ls lib*
> libgnutls-30.dll
> libgnutlsxx-28.dll
> libhogweed-6.dll
> libidn2-0.dll
> libnettle-8.dll
> libpng-config
> libpng16-config
> libunistring-2.dll
> %
>
> I ran another emacs instance (through runemacs.exe), but
>
> gnutls-available-p
>
> still produces nil.
Possibly it is a problem with transitive dependencies.
Is there a reason for using a separate Emacs when it is available from
MSYS2/Mingw-W64?
pacman -S mingw-w64-x86_64-emacs
should do the right thing. Then use /mingw64/bin/runemacs.exe.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-18 17:13 ` Óscar Fuentes
@ 2021-04-18 21:43 ` Wayne Harris via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 13+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-04-18 21:43 UTC (permalink / raw)
To: help-gnu-emacs
Óscar Fuentes <ofv@wanadoo.es> writes:
[...]
> Is there a reason for using a separate Emacs when it is available from
> MSYS2/Mingw-W64?
>
> pacman -S mingw-w64-x86_64-emacs
>
> should do the right thing. Then use /mingw64/bin/runemacs.exe.
I didn't know it was available from there. Thank you for the info. I
actually discovered the MSYS2 project quite recently --- I was searching
for a 64-bit readline DLL and I found only find in ``MSYS2'', but its
version was 8 when 5 was I needed. (I ended up recompiling as a 32-bit
application the program I wanted to run to use the readline-5 32-bit
that I had around. Such is life.)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-18 16:44 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-18 17:13 ` Óscar Fuentes
@ 2021-04-18 17:18 ` Eli Zaretskii
2021-04-18 21:40 ` Wayne Harris via Users list for the GNU Emacs text editor
1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2021-04-18 17:18 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 18 Apr 2021 13:44:36 -0300
> From: Wayne Harris via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> %ls lib*
> libgnutls-30.dll
> libgnutlsxx-28.dll
> libhogweed-6.dll
> libidn2-0.dll
> libnettle-8.dll
> libpng-config
> libpng16-config
> libunistring-2.dll
> %
> --8<---------------cut here---------------end--------------->8---
>
> I ran another emacs instance (through runemacs.exe), but
>
> gnutls-available-p
First, make sure you have _all_ the dependencies of libgnutls-30.dll
available. E.g., run the Dependency Walker on libgnutls-30.dll and
see that it finds all the dependency DLLs. If needed, add more
dependency DDLs to that directory.
If that doesn't help, maybe your Emacs was built without GnuTLS
support? Where did you get the Emacs binary? And what does the
following produce inside Emacs:
M-: system-configuration-features RET
Btw, how do you invoke gnutls-available-p, exactly?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-18 17:18 ` Eli Zaretskii
@ 2021-04-18 21:40 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-19 13:20 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-04-18 21:40 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sun, 18 Apr 2021 13:44:36 -0300
>> From: Wayne Harris via Users list for the GNU Emacs text editor
>> <help-gnu-emacs@gnu.org>
>>
>> %ls lib*
>> libgnutls-30.dll
>> libgnutlsxx-28.dll
>> libhogweed-6.dll
>> libidn2-0.dll
>> libnettle-8.dll
>> libpng-config
>> libpng16-config
>> libunistring-2.dll
>> %
>> --8<---------------cut here---------------end--------------->8---
>>
>> I ran another emacs instance (through runemacs.exe), but
>>
>> gnutls-available-p
>
> First, make sure you have _all_ the dependencies of libgnutls-30.dll
> available. E.g., run the Dependency Walker on libgnutls-30.dll and
> see that it finds all the dependency DLLs. If needed, add more
> dependency DDLs to that directory.
I didn't go this route yet --- see below why.
> If that doesn't help, maybe your Emacs was built without GnuTLS
> support? Where did you get the Emacs binary? And what does the
following produce inside Emacs:
>
> M-: system-configuration-features RET
It produces this:
"XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2
GMP"
> Btw, how do you invoke gnutls-available-p, exactly?
I invoke it by saying
(gnutls-available-p) C-x C-e
(*) Here's what I discovered
I didn't expect the PATH to be involved here, but here's how to get it
to work invoking it through cmd.exe:
C:\Users\x>cd \sys\emacs\bin
C:\sys\emacs\bin>set PATH=c:/sys/emacs/usr/mingw/mingw64/bin/
C:\sys\emacs\bin>echo %PATH%
c:/sys/emacs/usr/mingw/mingw64/bin/
C:\sys\emacs\bin>emacs -Q
*scratch* buffer: (gnutls-available-p) C-x C-e
Minibuffer says: (ClientHello\ Padding Key\ ...)
C-x C-c
C:\sys\emacs\bin>
So it seems that I can fix the problem by adding that directory to my
PATH. Indeed, doing that makes it all work. I don't get it, though. I
didn't know PATH was used to search for DLLs.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-18 21:40 ` Wayne Harris via Users list for the GNU Emacs text editor
@ 2021-04-19 13:20 ` Eli Zaretskii
2021-04-19 19:35 ` Wayne Harris via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2021-04-19 13:20 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 18 Apr 2021 18:40:05 -0300
> From: Wayne Harris via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> I didn't expect the PATH to be involved here, but here's how to get it
> to work invoking it through cmd.exe:
>
> C:\Users\x>cd \sys\emacs\bin
>
> C:\sys\emacs\bin>set PATH=c:/sys/emacs/usr/mingw/mingw64/bin/
>
> C:\sys\emacs\bin>echo %PATH%
> c:/sys/emacs/usr/mingw/mingw64/bin/
>
> C:\sys\emacs\bin>emacs -Q
>
> *scratch* buffer: (gnutls-available-p) C-x C-e
> Minibuffer says: (ClientHello\ Padding Key\ ...)
> C-x C-c
This probably means some of the dependencies of the GnuTLS DLL were
not copied, and are found via PATH.
> I didn't know PATH was used to search for DLLs.
Yes, it is. You can find the description of the full DLL search
method on the MS docs site.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-19 13:20 ` Eli Zaretskii
@ 2021-04-19 19:35 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-19 21:36 ` Óscar Fuentes
0 siblings, 1 reply; 13+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-04-19 19:35 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sun, 18 Apr 2021 18:40:05 -0300
>> From: Wayne Harris via Users list for the GNU Emacs text editor
>> <help-gnu-emacs@gnu.org>
>>
>> I didn't expect the PATH to be involved here, but here's how to get it
>> to work invoking it through cmd.exe:
>>
>> C:\Users\x>cd \sys\emacs\bin
>>
>> C:\sys\emacs\bin>set PATH=c:/sys/emacs/usr/mingw/mingw64/bin/
>>
>> C:\sys\emacs\bin>echo %PATH%
>> c:/sys/emacs/usr/mingw/mingw64/bin/
>>
>> C:\sys\emacs\bin>emacs -Q
>>
>> *scratch* buffer: (gnutls-available-p) C-x C-e
>> Minibuffer says: (ClientHello\ Padding Key\ ...)
>> C-x C-c
>
> This probably means some of the dependencies of the GnuTLS DLL were
> not copied, and are found via PATH.
You're quite right, sir. Now I finally understood how to check such
dependencies --- for instance, the check is recursive. I had tried
using the dependency walker before, but could never quite understand its
output. Now I did. I was missing
LIBWINPTHREAD-1.DLL
LIBGCC_S_SEH-1.DLL
LIBGMP-10.DLL
LIBINTL-8.DLL
LIBP11-KIT-0.DLL
LIBTASN1-6.DLL
LIBIDN2-0.DLL
LIBICONV-2.DLL
LIBINTL-8.DLL
LIBP11-KIT-0.DLL
LIBFFI-7.DLL
LIBTASN1-6.DLL
LIBUNISTRING-2.DLL
and that was it.
If I may, I still have one question. When I look at the dependencies of
emacs.exe, I don't see, for instance, LIBGNUTLS-30.DLL. In fact, I only
see core Windows libraries.
--8<---------------cut here---------------start------------->8---
c:\windows\system32\ADVAPI32.DLL
c:\windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1_none_b555e41d4684ddec\COMCTL32.DLL
c:\windows\system32\COMDLG32.DLL
c:\windows\system32\GDI32.DLL
c:\windows\system32\KERNEL32.DLL
c:\windows\system32\MPR.DLL
c:\windows\system32\MSVCRT.DLL
c:\windows\system32\OLE32.DLL
c:\windows\system32\SHELL32.DLL
c:\windows\system32\USER32.DLL
c:\windows\system32\USP10.DLL
c:\windows\system32\WINMM.DLL
c:\windows\system32\WINSPOOL.DRV
--8<---------------cut here---------------end--------------->8---
Doesn't emacs.exe depend on LIBGNUTLS-30.DLL?
>> I didn't know PATH was used to search for DLLs.
>
> Yes, it is. You can find the description of the full DLL search
> method on the MS docs site.
I did find it.
https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
That was very educational. Thank you.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-19 19:35 ` Wayne Harris via Users list for the GNU Emacs text editor
@ 2021-04-19 21:36 ` Óscar Fuentes
2021-04-20 12:33 ` Wayne Harris via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 13+ messages in thread
From: Óscar Fuentes @ 2021-04-19 21:36 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: Wayne Harris
Wayne Harris via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> If I may, I still have one question. When I look at the dependencies of
> emacs.exe, I don't see, for instance, LIBGNUTLS-30.DLL. In fact, I only
> see core Windows libraries.
>
> Doesn't emacs.exe depend on LIBGNUTLS-30.DLL?
Emacs loads certain dlls at runtime, only when you use a feature that
requires them.
Dependency Walker, by default, only shows dlls that were required at
link-time (when the Emacs executable was created) although it also has a
method for running an application and watching the dlls that it opens at
runtime.
Please note that Dependency Walker might be problematic on 64 bit
applications.
Process Explorer displays all running processes and the dlls that they
are using (among other information).
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-19 21:36 ` Óscar Fuentes
@ 2021-04-20 12:33 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-20 15:51 ` Óscar Fuentes
0 siblings, 1 reply; 13+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-04-20 12:33 UTC (permalink / raw)
To: help-gnu-emacs
Óscar Fuentes <ofv@wanadoo.es> writes:
> Wayne Harris via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
>
>> If I may, I still have one question. When I look at the dependencies of
>> emacs.exe, I don't see, for instance, LIBGNUTLS-30.DLL. In fact, I only
>> see core Windows libraries.
>>
>> Doesn't emacs.exe depend on LIBGNUTLS-30.DLL?
>
> Emacs loads certain dlls at runtime, only when you use a feature that
> requires them.
Hm, I thought all DLLs were equivalent to UNIX shared objects. But I
guess DLL means both shared object and those archives whose names always
end in ``.a'' as in ``mylib.a'' to be linked against at link-time.
> Dependency Walker, by default, only shows dlls that were required at
> link-time (when the Emacs executable was created) although it also has a
> method for running an application and watching the dlls that it opens at
> runtime.
>
> Please note that Dependency Walker might be problematic on 64 bit
> applications.
What sort of problems does it have, if I may ask? I'd hate to spend
hours trying to do something it doesn't do.
> Process Explorer displays all running processes and the dlls that they
> are using (among other information).
Indeed. I discovered that yesterday. I've been studying such tools.
Thank you!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-20 12:33 ` Wayne Harris via Users list for the GNU Emacs text editor
@ 2021-04-20 15:51 ` Óscar Fuentes
2021-04-20 18:08 ` Wayne Harris via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 13+ messages in thread
From: Óscar Fuentes @ 2021-04-20 15:51 UTC (permalink / raw)
To: help-gnu-emacs
Wayne Harris via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
>>> Doesn't emacs.exe depend on LIBGNUTLS-30.DLL?
>>
>> Emacs loads certain dlls at runtime, only when you use a feature that
>> requires them.
>
> Hm, I thought all DLLs were equivalent to UNIX shared objects. But I
> guess DLL means both shared object and those archives whose names always
> end in ``.a'' as in ``mylib.a'' to be linked against at link-time.
foo.dll.a is an import library, a helper file that is used by the linker to
know that such and such symbol is defined in foo.dll.
Usually, DLLs are loaded automatically when the executable starts. The
executable lists the dlls required to run. But, once running, the
application can use an API to request from the OS "I want to open
foo.dll and then I want the addresses of such and such functions defined
on that dll". That's runtime dynamic linking.
BTW, UNIX shared objects also provide those possibilities.
>> Dependency Walker, by default, only shows dlls that were required at
>> link-time (when the Emacs executable was created) although it also has a
>> method for running an application and watching the dlls that it opens at
>> runtime.
>>
>> Please note that Dependency Walker might be problematic on 64 bit
>> applications.
>
> What sort of problems does it have, if I may ask? I'd hate to spend
> hours trying to do something it doesn't do.
AFAIK Dependency Walker was never fully transitioned to 64 bit. Some
features can fail.
>> Process Explorer displays all running processes and the dlls that they
>> are using (among other information).
>
> Indeed. I discovered that yesterday. I've been studying such tools.
>
> Thank you!
You're welcome.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: on how to install gnutls dlls on windows
2021-04-20 15:51 ` Óscar Fuentes
@ 2021-04-20 18:08 ` Wayne Harris via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 13+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-04-20 18:08 UTC (permalink / raw)
To: help-gnu-emacs
Óscar Fuentes <ofv@wanadoo.es> writes:
> Wayne Harris via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
>
>>>> Doesn't emacs.exe depend on LIBGNUTLS-30.DLL?
>>>
>>> Emacs loads certain dlls at runtime, only when you use a feature that
>>> requires them.
>>
>> Hm, I thought all DLLs were equivalent to UNIX shared objects. But I
>> guess DLL means both shared object and those archives whose names always
>> end in ``.a'' as in ``mylib.a'' to be linked against at link-time.
>
> foo.dll.a is an import library, a helper file that is used by the linker to
> know that such and such symbol is defined in foo.dll.
Instead of asking a hundred further questions, let me do this right and
educate myself properly. I have a UNIX background, not a Windows one.
What (book [hopefully]) should I read to understand the Windows side of
things that usually goes on in this context we are --- Emacs for
Windows, msys2 and such? (If it's written by someone who a UNIX
background, that'll be even better. I'm definitely going to reduce all
Windows matters to UNIX primitives, as I was trying to do above.)
Thank you!
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-04-20 18:08 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-18 16:12 on how to install gnutls dlls on windows Wayne Harris via Users list for the GNU Emacs text editor
2021-04-18 16:22 ` Eli Zaretskii
2021-04-18 16:44 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-18 17:13 ` Óscar Fuentes
2021-04-18 21:43 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-18 17:18 ` Eli Zaretskii
2021-04-18 21:40 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-19 13:20 ` Eli Zaretskii
2021-04-19 19:35 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-19 21:36 ` Óscar Fuentes
2021-04-20 12:33 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-20 15:51 ` Óscar Fuentes
2021-04-20 18:08 ` Wayne Harris via Users list for the GNU Emacs text editor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).