Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The build system seems to have obsolete zlib support #446

Open
TurtleWilly opened this issue Apr 26, 2024 · 1 comment
Open

The build system seems to have obsolete zlib support #446

TurtleWilly opened this issue Apr 26, 2024 · 1 comment

Comments

@TurtleWilly
Copy link

When running configure --help it lists an option --without-zlib. This makes me accordingly assume the default is lcms2 to actually require zlib for something. On my system I need to tell any build system exactly where the correct zlib is located. Configure doesn't seem to have an option to specify the zlib location, so I have to manually ramp up the configure variables, something like this:

# Note: --with-zlib=<dir> is entirely a wild guess
./configure \
    --prefix=/usr/local/silo/lcms2/2.16                \
    --disable-static                                   \
    --with-jpeg=/usr/local/silo/jpeg/latest            \
    --with-tiff=/usr/local/silo/tiff/latest            \
    --with-zlib=/usr/local/silo/zlib/latest            \
    CFLAGS='-O3 -I/usr/local/silo/zlib/latest/include' \
    LDFLAGS='-L/usr/local/silo/zlib/latest/lib -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-dead_strip' \
    LIBS='-lz'

Which is obviously some extra typing work. 🥲

But ultimately it seems that extra hassle was for nothing. zlib doesn't seem to be used at all by lcms2? I also grepped for 'zlib.h' and got no hit, except inside the configure script.

If zlib is obsolete, then the respective zlib support should be removed from the configure script. E.g. also package systems like MacPorts still list zlib as dependency: https://github.com/macports/macports-ports/blob/master/graphics/lcms2/Portfile

@mm2
Copy link
Owner

mm2 commented May 1, 2024

Little CMS has no real dependencies at all other than libm. For building the utilities which can be regarded as demos, you need libtiff and libjpeg. Nonetheless, if you don't have those you can still build Little CMS at full functionality. In the case you wish to build the demos, which happens by default on "configure" script, you can link them statically or dynamically. By default it is done dynamically. In the case you wish to build the demos statically, then there is a problem with libtiff because it has a lot of dependencies on the configured codecs. One of the minimal configurations is using libz. Hence, libz is stated as a dependency only for those cases you want to build the demos statically. I specifically want to avoid calls to package manager in configure.

Please note in the manual already documents that and libz is not required, see "Requirements" - "Dependencies" at the begin of the document.
https://www.littlecms.com/LittleCMS2.16%20API.pdf

So, you hit an undocumented feature, which is only used for very specialized builds. You can safely ignore this in the command line of configure and follow what is documented in the manual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants