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

Compilation failure. #3472

Open
hackerfactor opened this issue Apr 10, 2024 · 3 comments
Open

Compilation failure. #3472

hackerfactor opened this issue Apr 10, 2024 · 3 comments
Assignees
Labels
building/portability Platform-specific issues, build issues unrelated to 1.0 Things that need not be done before the 1.0 version milestone

Comments

@hackerfactor
Copy link

Describe the bug

libjxl/lib/extras/dec/jpg.cc:219:5: error: ‘jpeg_mem_src’ was not declared in this scope; did you mean ‘jpeg_stdio_src’?
  219 |     jpeg_mem_src(&cinfo, reinterpret_cast<const unsigned char*>(bytes.data()),
      |     ^~~~~~~~~~~~
      |     jpeg_stdio_src
make[2]: *** [lib/CMakeFiles/jxl_extras_core-obj.dir/build.make:232: lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/jpg.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:953: lib/CMakeFiles/jxl_extras_core-obj.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
@mo271
Copy link
Member

mo271 commented Apr 11, 2024

Thanks for your report.

Are you linking to the correct libjpeg library during compilation? This should be done by cmake:

find_package(JPEG)

A prerequisite is to have libjpeg-dev installed:

sudo apt-get install `libjpeg-dev`

(see https://github.com/libjxl/libjxl/blob/main/doc/developing_in_debian.md)

@mo271 mo271 added building/portability Platform-specific issues, build issues unrelated to 1.0 Things that need not be done before the 1.0 version milestone labels Apr 11, 2024
@hackerfactor
Copy link
Author

$ sudo apt install libjpeg-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libjpeg-dev is already the newest version (8c-2ubuntu8).

@eustas
Copy link
Contributor

eustas commented Apr 24, 2024

Faced the same problem building for windows with libjpeg-turbo installed by chocolatey:
https://github.com/libjxl/libjxl/actions/runs/8819318791/job/24210224919

Investigating.

@eustas eustas self-assigned this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building/portability Platform-specific issues, build issues unrelated to 1.0 Things that need not be done before the 1.0 version milestone
Projects
None yet
Development

No branches or pull requests

3 participants