Bug 159132 - Build error on zlib
Summary: Build error on zlib
Status: UNCONFIRMED
Alias: None
Product: Document Liberation Project
Classification: Unclassified
Component: libcdr (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Dev-Bugs
  Show dependency treegraph
 
Reported: 2024-01-11 13:41 UTC by rezso
Modified: 2026-06-03 03:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Add zlib dependency to Library_wpftdraw.mk (326 bytes, patch)
2026-06-02 21:29 UTC, rezso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rezso 2024-01-11 13:41:06 UTC
I tried to compile 24.2.0.1 tarball, but always fails with zlib:

/bin/ld: /var/uhubuild/work/compile/workdir/UnpackedTarball/libcdr/src/lib/.libs/libcdr-0.1.a(CDRInternalStream.o): in function `libcdr::CDRInternalStream::CDRInternalStream(librevenge::RVNGInputStream*, unsigned long, bool)':
CDRInternalStream.cpp:(.text+0x36c): undefined reference to `inflateInit_'
/bin/ld: CDRInternalStream.cpp:(.text+0x419): undefined reference to `inflate'
/bin/ld: CDRInternalStream.cpp:(.text+0x52e): undefined reference to `inflateEnd'
/bin/ld: CDRInternalStream.cpp:(.text+0x5af): undefined reference to `inflateEnd'
/bin/ld: /var/uhubuild/work/compile/workdir/UnpackedTarball/libfreehand/src/lib/.libs/libfreehand-0.1.a(FHInternalStream.o): in function `libfreehand::FHInternalStream::FHInternalStream(librevenge::RVNGInputStream*, unsigned long, bool)':
FHInternalStream.cpp:(.text+0x2bc): undefined reference to `inflateInit_'
/bin/ld: FHInternalStream.cpp:(.text+0x369): undefined reference to `inflate'
/bin/ld: FHInternalStream.cpp:(.text+0x47e): undefined reference to `inflateEnd'
/bin/ld: FHInternalStream.cpp:(.text+0x4ff): undefined reference to `inflateEnd'
/bin/ld: /var/uhubuild/work/compile/workdir/UnpackedTarball/libmspub/src/lib/.libs/libmspub-0.1.a(libmspub_utils.o): in function `libmspub::inflateData(librevenge::RVNGBinaryData)':
libmspub_utils.cpp:(.text+0x385): undefined reference to `inflateInit2_'
/bin/ld: libmspub_utils.cpp:(.text+0x413): undefined reference to `inflate'
/bin/ld: libmspub_utils.cpp:(.text+0x455): undefined reference to `inflateEnd'
/bin/ld: libmspub_utils.cpp:(.text+0x474): undefined reference to `inflateEnd'
[build BIN] filter
/bin/ld: /var/uhubuild/work/compile/workdir/UnpackedTarball/libzmf/src/lib/.libs/libzmf-0.0.a(BMIParser.o): in function `libzmf::BMIParser::readData(unsigned int)':
BMIParser.cpp:(.text+0x513): undefined reference to `inflateInit2_'
/bin/ld: BMIParser.cpp:([build MOD] forms
.text+0x5ea): undefined reference to `inflate'
/bin/ld: BMIParser.cpp:(.text+0x609): undefined reference to `inflateEnd'

I tried with --with-system-zlib / --without-system-zlib, --with-system-librevenge / --without-system-librevenge, but the build always fails.
Comment 1 Buovjaga 2024-01-22 15:10:30 UTC
Usually build problems are discussed on the developer mailing list.

Which Linux distribution? Which compiler & version?
Comment 2 rezso 2024-01-22 20:43:28 UTC
This is a small distribution. I use gcc 12.3.0 and binutils 2.41.
Because I can compile the 7.6.4.1 without any errors, I searched the differences between 7.6.4.1 and (now) 24.2.0.2.
I found this commit as relevant:
https://github.com/LibreOffice/core/commit/6f60670877208612b5ea320b3677480ef6508abb
I added again the "zlib" to writerperfect/Library_wpftcalc.mk, writerperfect/Library_wpftdraw.mk and writerperfect/Library_wpftimpress.mk.
With tis modification I compiled LO 24.2.0.2 succesfully.
Comment 3 QA Administrators 2024-01-23 03:12:20 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2024-01-23 05:27:09 UTC
Gábor: can you re-review your 6f60670877208612b5ea320b3677480ef6508abb in light of this?
Comment 5 Bartosz 2024-10-25 21:57:25 UTC
It could be fixed with the commit:
https://git.libreoffice.org/libcdr/+/66791028583cb177627cc46b013f9e89dd13c469

It is also caused issues described at:
https://git.libreoffice.org/core/+/05aedcba6672979d317b540bbfa74f5c9b409402
Comment 6 BogdanB 2026-06-02 05:51:31 UTC
rezso@rezso.net, is this problem still relevant today? or it was solved by the commits mentioned in comment 5?
Comment 7 rezso 2026-06-02 21:29:32 UTC
Created attachment 207314 [details]
Add zlib dependency to Library_wpftdraw.mk
Comment 8 rezso 2026-06-02 21:33:15 UTC
Yes, the problem is still relevant.
The same error occurred today in version 26.2.4.1, without a patch:
[build LNK] Library/libwpftwriterlo.so
/usr/bin/ld: /var/uhubuild/work/compile/workdir/UnpackedTarball/libcdr/src/lib/.libs/libcdr-0.1.a(CDRInternalStream.o): in function `libcdr::CDRInternalStream::CDRInternalStream(librevenge::RVNGInputStream*, unsigned long, bool)':
CDRInternalStream.cpp:(.text+0x35c): undefined reference to `inflateInit_'
/usr/bin/ld: CDRInternalStream.cpp:(.text+0x409): undefined reference to `inflate'
/usr/bin/ld: CDRInternalStream.cpp:(.text+0x506): undefined reference to `inflateEnd'
/usr/bin/ld: CDRInternalStream.cpp:(.text+0x5d7): undefined reference to `inflateEnd'
/usr/bin/ld: /var/uhubuild/work/compile/workdir/UnpackedTarball/libfreehand/src/lib/.libs/libfreehand-0.1.a(FHInternalStream.o): in function `libfreehand::FHInternalStream::FHInternalStream(librevenge::RVNGInputStream*, unsigned long, bool)':
FHInternalStream.cpp:(.text+0x2bc): undefined reference to `inflateInit_'
/usr/bin/ld: FHInternalStream.cpp:(.text+0x369): undefined reference to `inflate'
/usr/bin/ld: FHInternalStream.cpp:(.text+0x486): undefined reference to `inflateEnd'
/usr/bin/ld: FHInternalStream.cpp:(.text+0x537): undefined reference to `inflateEnd'
/usr/bin/ld: /var/uhubuild/work/compile/workdir/UnpackedTarball/libmspub/src/lib/.libs/libmspub-0.1.a(libmspub_utils.o): in function `libmspub::inflateData(librevenge::RVNGBinaryData)':
libmspub_utils.cpp:(.text+0x383): undefined reference to `inflateInit2_'
/usr/bin/ld: libmspub_utils.cpp:(.text+0x413): undefined reference to `inflate'
/usr/bin/ld: libmspub_utils.cpp:(.text+0x457): undefined reference to `inflateEnd'
/usr/bin/ld: libmspub_utils.cpp:(.text+0x474): undefined reference to `inflateEnd'
/usr/bin/ld: /var/uhubuild/work/compile/workdir/UnpackedTarball/libzmf/src/lib/.libs/libzmf-0.0.a(BMIParser.o): in function `libzmf::BMIParser::readData(unsigned int)':
BMIParser.cpp:(.text+0x52a): undefined reference to `inflateInit2_'
/usr/bin/ld: BMIParser.cpp:(.text+0x628): undefined reference to `inflate'
/usr/bin/ld: BMIParser.cpp:(.text+0x645): undefined reference to `inflateEnd'
collect2: error: ld returned 1 exit status
make[1]: *** [/var/uhubuild/work/compile/writerperfect/Library_wpftdraw.mk:20: /var/uhubuild/work/compile/instdir/program/libwpftdrawlo.so] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:301: build] Error 2

Therefore, I need to add a small fix to the source to make the compilation successful.
Comment 9 QA Administrators 2026-06-03 03:15:18 UTC Comment hidden (obsolete)