xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 4 years ago

Closed 4 years ago

Last modified 17 months ago

#2078 closed defect (fixed)

jpeg codecs for centos7

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 2.5
Component: encodings Version: 2.4.x
Keywords: Cc:

Description (last modified by Antoine Martin)

The xpra specfile requires turbojpeg-devel, setup.py checks for version 1.2 or later but we actually require a newer version than that..

On centos7, the build fails with:

xpra/codecs/jpeg/encoder.c: In function '__pyx_pf_4xpra_6codecs_4jpeg_7encoder_6encode':
xpra/codecs/jpeg/encoder.c:2467:11: error: passing argument 2 of 'tjCompress2' discards 'const' qualifier from pointer target type [-Werror]
           __pyx_v_r = tjCompress2(__pyx_v_compressor, __pyx_v_buf, __pyx_v_width, __pyx_v_stride, __pyx_v_height, __pyx_v_tjpf, (&__pyx_v_out), (&__pyx_v_out_size), __pyx_v_subsamp, __pyx_v_quality, __pyx_v_flags);
In file included from xpra/codecs/jpeg/encoder.c:595:0:
/usr/include/turbojpeg.h:555:23: note: expected 'unsigned char *' but argument is of type 'const unsigned char *'
 DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, unsigned char *srcBuf,
xpra/codecs/jpeg/encoder.c: In function 'initencoder':
xpra/codecs/jpeg/encoder.c:4594:36: error: 'TJPF_CMYK' undeclared (first use in this function)
   __pyx_t_1 = __Pyx_PyInt_From_int(TJPF_CMYK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
xpra/codecs/jpeg/encoder.c:4594:36: note: each undeclared identifier is reported only once for each function it appears in
xpra/codecs/jpeg/encoder.c:4670:36: error: 'TJSAMP_411' undeclared (first use in this function)
   __pyx_t_1 = __Pyx_PyInt_From_int(TJSAMP_411); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)                                 

This could be silenced - either globally or with a version check, but the build still fails later on because some constants aren't defined (TJPF_CMYK, TJSAMP_411).
Commenting those out helps, but the build still fails because tjDecompressHeader3 is also missing:

xpra/codecs/jpeg/decoder.c: In function '__pyx_pf_4xpra_6codecs_4jpeg_7decoder_6decompress_to_yuv':
xpra/codecs/jpeg/decoder.c:2597:3: error: implicit declaration of function 'tjDecompressHeader3' [-Werror=implicit-function-declaration]
   __pyx_v_r = tjDecompressHeader3(__pyx_cur_scope->__pyx_v_decompressor, ((unsigned char const *)__pyx_v_buf), __pyx_v_buf_len, (&__pyx_v_w), (&__pyx_v_h), (&__pyx_v_subsamp), (&__pyx_v_cs));

Maybe split encoder and decoder so we can build the encode with centos7? (with a patch for the missing definition)

Change History (2)

comment:1 Changed 4 years ago by Antoine Martin

Description: modified (diff)
Resolution: fixed
Status: newclosed
  • r21218 requires libturbojpeg 1.4 (backport in r21219), so we can build on centos7 again
  • r21220 + r21222 builds the encoder on centos7 via a patch and skipping compilation warnings (backport in r21221 + r21223)
Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 17 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2078

Note: See TracTickets for help on using tickets.