[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Wi
From: |
Andrea Corallo |
Subject: |
bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10 |
Date: |
Mon, 21 Dec 2020 09:48:01 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Andrea Corallo <akrl@sdf.org>
>> Cc: 45303@debbugs.gnu.org, gongyi.liao@gmail.com,
>> =?UTF-8?Q?Li=C4=81u@debbugs.gnu.org
>> Date: Fri, 18 Dec 2020 16:37:31 +0000
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> >> Date: Fri, 18 Dec 2020 13:28:20 +0000
>> >> Cc: gongyi.liao@gmail.com, =?UTF-8?Q?Li=C4=81u@debbugs.gnu.org
>> >> From: Andrea Corallo via "Bug reports for GNU Emacs,
>> >> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> >>
>> >> >> CCLD temacs.exe
>> >> >> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>> >> >> comp.o: in function `md5_gz_stream':
>> >> >> C:\msys64\home\VWinUser0\Downloads\emacs\native-comp\build\src/../../src/src/comp.c:713:
>> >> >> undefined reference to `inflateInit2_'
>> >> >> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>> >> >> C:\msys64\home\VWinUser0\Downloads\emacs\native-comp\build\src/../../src/src/comp.c:730:
>> >> >> undefined reference to `inflate'
>> >> >
>> >> > That's curious, looks you've not zlib but from the config.log you do...
>> >>
>> >> I really would like to understand what's going on here.
>> >>
>> >> We check in configure for zlib presence, actually this is also require
>> >> by --with-nativecomp but somehow the linker fails to find it.
>> >
>> > Why does the native-comp branch require zlib in comp.c? what does it
>> > do with zlib?
>>
>> We hash the content of the lisp source files to obtain the correspondent
>> eln name in the eln-cache.
>>
>> This machinery has to work since early bootstrap (and has to be fast
>> since is executed at each file load), so is directly done from comp.c.
>>
>> When Emacs is installed the el files are compressed and so before
>> hashing them we have to decompress therefore we use zlib.
>
> Thanks for the explanations.
>
>> > On master, zlib is an optional library, and when some Emacs command is
>> > invoked that needs it, on MS-Windows we load the zlib DLL at run time
>> > when requested. See init_zlib_functions in decompress.c. This is
>> > unlike on Posix systems, where Emacs is linked with zlib at link time.
>> > Does this explain what is going on?
>>
>> I see, we should probably have comp.c use the necessary DEF_DLL_FN bloat
>> or have these functions wrapped in decompress.c.
>
> I think it's better to use functions in decompress.c or add whatever
> you need there, and have the new functions use the same paradigm,
> which on Windows loads the DLL the first time it is needed.
Hi Eli,
so I did, with 5b10a0324d I moved 'md5_gz_stream' to decompress.c,
before running it we load zlib if necessary.
Hopefully this solves this part of the issue.
Thanks
Andrea
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, (continued)
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Andrea Corallo, 2020/12/18
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Eli Zaretskii, 2020/12/18
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Andrea Corallo, 2020/12/18
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Liāu, 2020/12/18
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Eli Zaretskii, 2020/12/18
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Liāu, 2020/12/18
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Liāu, 2020/12/19
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Eli Zaretskii, 2020/12/19
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Liāu, 2020/12/18
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Eli Zaretskii, 2020/12/18
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10,
Andrea Corallo <=
- bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10, Liāu, 2020/12/19
bug#45303: #45303 [feature/native-comp] building error on Windows, Pal Gloss, 2020/12/18
- bug#45303: #45303 [feature/native-comp] building error on Windows, Andrea Corallo, 2020/12/18
- bug#45303: #45303 [feature/native-comp] building error on Windows, Eli Zaretskii, 2020/12/18
- bug#45303: #45303 [feature/native-comp] building error on Windows, Pal Gloss, 2020/12/18
- bug#45303: #45303 [feature/native-comp] building error on Windows, Andrea Corallo, 2020/12/19
- bug#45303: #45303 [feature/native-comp] building error on Windows, Andy Moreton, 2020/12/19
- bug#45303: #45303 [feature/native-comp] building error on Windows, Eli Zaretskii, 2020/12/19
- bug#45303: #45303 [feature/native-comp] building error on Windows, Andy Moreton, 2020/12/19
- bug#45303: #45303 [feature/native-comp] building error on Windows, Eli Zaretskii, 2020/12/19