Closed kevinsmia1939 closed 3 years ago
----------------------------- Captured stderr call -----------------------------
Blosc has not been compiled with '(null)' compression support.
Looks like c-blosc has been compiled without support for snappy compression.
FAILED tests/test_imagecodecs.py::test_jpegxl_encode_jpeg
It is possible that the result of the Brunsli repacking is platform or version specific.
Hello,
blosc on openSUSE have been compiled with
-DPREFER_EXTERNAL_SNAPPY=ON \
-DPREFER_EXTERNAL_ZLIB=ON \
-DPREFER_EXTERNAL_ZSTD=ON \
-DPREFER_EXTERNAL_LZ4=ON \
-DBUILD_STATIC=OFF
https://build.opensuse.org/package/view_file/openSUSE:Factory/blosc/blosc.spec?expand=1
Which seems to enable snappy, but is using the PREFER_EXTERNAL flag the good way to do it?
I'm not sure what you meant by Brunsli repacking is platform or version specific, can you expand on that?
Also, I forgot to mention that I apply a patch, to fix zopfli not found and enable other stuff if that make a difference.
diff -ruN a/imagecodecs/_zopfli.c b/imagecodecs/_zopfli.c
--- a/imagecodecs/_zopfli.c 2020-05-31 07:35:37.000000000 +0700
+++ b/imagecodecs/_zopfli.c 2020-08-11 03:02:56.704879851 +0700
@@ -600,7 +600,7 @@
#include "numpy/ufuncobject.h"
#include <stdint.h>
#include <stdlib.h>
-#include "zopfli/zopfli.h"
+#include "zopfli.h"
#include "pythread.h"
#include "pystate.h"
#ifdef _OPENMP
diff -ruN a/imagecodecs/zopfli.pxd b/imagecodecs/zopfli.pxd
--- a/imagecodecs/zopfli.pxd 2020-02-19 04:42:45.000000000 +0700
+++ b/imagecodecs/zopfli.pxd 2020-08-09 12:44:01.322834958 +0700
@@ -4,7 +4,7 @@
# Cython declarations for the `Zopfli 1.0.3` library.
# https://github.com/google/zopfli
-cdef extern from 'zopfli/zopfli.h':
+cdef extern from 'zopfli.h':
ctypedef struct ZopfliOptions:
int verbose
diff -ruN a/setup.py b/setup.py
--- a/setup.py 2020-05-31 06:50:56.000000000 +0700
+++ b/setup.py 2020-08-09 12:41:15.565268379 +0700
@@ -148,13 +148,13 @@
import platform
del EXTENSIONS['jpeg12'] # jpeg12 requires custom build
- del EXTENSIONS['jpegls'] # CharLS 2.1 library not commonly available
- del EXTENSIONS['jpegxl'] # Brunsli library not commonly available
+ # del EXTENSIONS['jpegls'] # CharLS 2.1 library not commonly available
+ # del EXTENSIONS['jpegxl'] # Brunsli library not commonly available
del EXTENSIONS['lerc'] # LERC library not commonly available
- del EXTENSIONS['zfp'] # ZFP library not commonly available
+ # del EXTENSIONS['zfp'] # ZFP library not commonly available
- if 'arch' in platform.platform():
- del EXTENSIONS['zopfli'] # zopfli/zopfli.h does not exist
+ # if 'arch' in platform.platform():
+ # del EXTENSIONS['zopfli'] # zopfli/zopfli.h does not exist
if sys.platform == 'win32':
EXTENSIONS['bz2']['libraries'] = ['libbz2']
Try to build c-blosc
with -DDEACTIVATE_SNAPPY=OFF
what you meant by Brunsli repacking is platform or version specific
Brunsli encoding works by taking an existing JPEG stream produced by libjpeg(-turbo) and re-packaging it into a JPEG-XL stream. JPEG does not guarantee bit reproducible results and the Brunsli library is at version 0.1 so I think it is reasonable to expect slight differences in the output, which the imagecodecs tests currently do not account for. Just ignore the failure for now or disable the JPEG-XL codec.
As for your patch, the setup.py file currently supports conda-forge, recent Debian/WSL, the imagecodecs CI build system, and my development setup. On other platforms, either patch setup.py or customize the defaults providing your own imagecodecs_distributor_setup.customize_build
function:
I enable snappy in blosc with -DDEACTIVATE_SNAPPY=OFF and disable jpeg-xl codec, the build is now successful.
Hello,
I am trying to update imagecodecs for openSUSE Tumbleweed https://build.opensuse.org/package/show/home:andythe_great:branches:devel:languages:python/python-imagecodecs
The test regarding blosc failed, I'm not sure what the issue could be.
The installed dependencies are as follows.
Full log here: https://build.opensuse.org/package/live_build_log/home:andythe_great:branches:devel:languages:python/python-imagecodecs/andythe_great_TW/x86_64