[New-bugs-announce] [issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

Russell Keith-Magee report at bugs.python.org
Fri Jun 18 23:24:49 EDT 2021


New submission from Russell Keith-Magee <russell at keith-magee.com>:

BPO-41486 added _BlocksOutputBuffer for the bz2, lzma and zlib module.

Part of this patch included a new header file, pycore_blocks_output_buffer.h, which defines a BUFFER_BLOCK_SIZE constant.

If two or more of the bz2, lzma or zlib modules are compiled as statically linked modules (i.e., added to Lib/Setup.local), this results in a duplicate symbol error when the Python executable is linked:

```
duplicate symbol '_BUFFER_BLOCK_SIZE' in:
    libpython3.10.a(_bz2module.o)
    libpython3.10.a(_lzmamodule.o)
duplicate symbol '_BUFFER_BLOCK_SIZE' in:
    libpython3.10.a(_bz2module.o)
    libpython3.10.a(zlibmodule.o)
```

----------
components: Extension Modules
messages: 396114
nosy: freakboy3742
priority: normal
severity: normal
status: open
title: Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules
type: compile error
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44458>
_______________________________________


More information about the New-bugs-announce mailing list