-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
dlib Python module references save_jpeg() even if built with DLIB_JPEG_SUPPORT=0 #1252
Comments
(Perhaps the whole |
Why would you compile the python bindings without jpeg support in the first
place?
|
In my particular case? Since I only use dlib for its global opt module, nothing to do with image-related stuff - and because of this build issue all Python environments that use dlib have to carry a ljbjpeg around. |
Are there any problems this causes? What bad things happen because of this?
I'm not excited about adding more switches because users find them
confusing. I don't want to get questions from people like, "I compiled
with DLIB_JPEG_SUPPORT=0 and then got an error that I couldn't load a jpeg
file. I am confused." I get lots of such questions already. :(
|
My point of view, as a user, may be different from yours, of course :) Ditto re: not being excited about adding more switches, but here goes:
|
- I would be very surprised if someone purposefully disabled jpeg
support and then opened a ticket to complain about, as you've noted above.
Yes, it's very surprising. But I nevertheless get a huge number of
questions along these lines.
- There's parts of dlib (e.g. global optimization) that don't deal
with any image related stuff; making libjpeg.so a hard dependency of the
Python package is pretty brutal, since now you either have to ensure the
boxes you deploy your Python package to have libjpeg installed, or haul it
around in every conda environment your package gets installed to, depending
on how you're structuring/packaging your Python code. If it wasn't for
libjpeg, the only dependency is numpy - which makes total sense.
- When building Python package, you could probably wrap module
bindings that depend on libjpeg in an ifdef and possibly output a big red
cmake warning when building pybind11 bindings (e.g. "face_detection module
is disabled due to jpeg_support=0").
OK, I'm convinced. Can you submit a PR with the necessary #ifdefs or whatever
in the code so the build doesn't fail?
|
Thanks! I'll try and do so in the next few days. |
Warning: this issue has been inactive for 146 days and will be automatically closed on 2018-09-07 if there is no further activity. If you are waiting for a response but haven't received one it's likely your question is somehow inappropriate. E.g. you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's documentation, or a Google search. |
Notice: this issue has been closed because it has been inactive for 149 days. You may reopen this issue if it has been closed in error. |
When building dlib with
-DDLIB_JPEG_SUPPORT=0
, Python bindings shouldn't unconditionally refer tosave_jpeg()
(in face_recognition module), otherwise dlib becomes unimportable like so:The text was updated successfully, but these errors were encountered: