Compiling python 3.12 with bzip2

Xisco Fauli xiscofauli at libreoffice.org
Tue Dec 31 13:55:35 UTC 2024


Hi Caolán,

It seems it works. Thanks a lot for your support!

On 30/12/24 21:16, Caolán McNamara wrote:
> On Mon, 2024-12-30 at 16:45 +0100, Xisco Fauli wrote:
>> Hello,
>>
>> In https://gerrit.libreoffice.org/c/core/+/178681 I'm trying to
>> upgrade internal python to 3.11. Unfortunately it fails to link _bz2
>> extension
> ...
>> Any idea how to fix it ?
> I think, from:
>
> make verbose=true python3.build > /tmp/thelog
>
> that the link line used is something like:
>
> $ clang ... Modules/_bz2module.c -o ... Modules/_bz2module.o
>
> where I see -I and -L entries for internal bzip2 but no actual -lbz2 to
> link against the libbz2.a I see in workdir/UnpackedTarball/bzip2
>
> Checking the python config.log in workdir/UnpackedTarball/python3
> then around line 14248 there is:
>
> configure:16228: checking for ZLIB
> configure:16545: result: yes
> configure:16576: checking for BZIP2
> configure:16799: result: yes
>
> which is a little "bare", but at line 27480 there is:
>
> ac_cv_env_ZLIB_LIBS_set=set
> ac_cv_env_ZLIB_LIBS_value='   -lz'
>
> vs
>
> ac_cv_env_BZIP2_LIBS_set=set
> ac_cv_env_BZIP2_LIBS_value='   '
>
> so I suspect an injection of "BZIP2_LIBS" in the environment that
> python's configure is run inside is overriding python's configure from
> determining it on its own and it just takes what it sees from an env
> variable.
>
> git grep on BZIP2_LIBS gives some hits, and I think the relevant ones
> are in the toplevel configure.ac where we have:
>
> AC_SUBST(BZIP2_LIBS)
>
> which for the default non-system bzip2 is empty and I think that's the
> issue seeing as for the similar ZLIB_LIBS case we explicitly set
> something in there for the non-system zlib case.
>
> I've hazarded something that I pushed to your
> https://gerrit.libreoffice.org/c/core/+/178681
> and maybe it will help

-- 
Xisco Faulí
LibreOffice QA Team
IRC: x1sc0



More information about the LibreOffice mailing list