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

jpeg codecs for centos7 #2078

Closed
totaam opened this issue Dec 13, 2018 · 4 comments
Closed

jpeg codecs for centos7 #2078

totaam opened this issue Dec 13, 2018 · 4 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Dec 13, 2018

Issue migrated from trac ticket # 2078

component: encodings | priority: major | resolution: fixed

2018-12-13 06:27:32: antoine created the issue


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)

@totaam
Copy link
Collaborator Author

totaam commented Dec 13, 2018

2018-12-13 07:39:43: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Dec 13, 2018

2018-12-13 07:39:43: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Dec 13, 2018

2018-12-13 07:39:43: antoine edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented Dec 13, 2018

2018-12-13 07:39:43: antoine commented


  • r21218 requires libturbojpeg 1.4 (backport in 21219), so we can build on centos7 again
  • r21220 + r21222 builds the encoder on centos7 via a patch and skipping compilation warnings (backport in 21221 + 21223)

@totaam totaam closed this as completed Dec 13, 2018
@totaam totaam added the v2.4.x label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant