printing/ uses cups calls that are deprecated with an OS X 10.8 deployment target |
|||||
Issue description
printing/printing/cups_helper.cc and printing/printing/print_backend_cups.cc use CUPS functions that are deprecated starting in OS X 10.8.
I'm not sure what the plan is here, I think in the past we said "we support CUPS 1.4, and we'll fix those once we drop support for that"?
../../printing/backend/cups_helper.cc:118:7: error: 'cupsMarkOptions' is deprecated: Use cupsCopyDestInfo and friends instead. [-Werror,-Wdeprecated-declarations]
cupsMarkOptions(*ppd, num_options, options);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/cups/ppd.h:365:13: note: 'cupsMarkOptions' has been explicitly marked deprecated here
extern int cupsMarkOptions(ppd_file_t *ppd, int num_options,
^
../../printing/backend/cups_helper.cc:128:31: error: 'ppdFindOption' is deprecated: Use cupsCopyDestInfo and friends instead. [-Werror,-Wdeprecated-declarations]
ppd_option_t* color_model = ppdFindOption(ppd, kColorModel);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/cups/ppd.h:383:22: note: 'ppdFindOption' has been explicitly marked deprecated here
extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword)
^
../../printing/backend/cups_helper.cc:132:7: error: 'ppdFindChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Werror,-Wdeprecated-declarations]
if (ppdFindChoice(color_model, kBlack))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/cups/ppd.h:378:22: note: 'ppdFindChoice' has been explicitly marked deprecated here
extern ppd_choice_t *ppdFindChoice(ppd_option_t *o, const char *option)
^
../../printing/backend/cups_helper.cc:156:33: error: 'ppdFindMarkedChoice' is deprecated: Use cupsCopyDestInfo and friends instead. [-Werror,-Wdeprecated-declarations]
ppd_choice_t* marked_choice = ppdFindMarkedChoice(ppd, kColorModel);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/cups/ppd.h:380:22: note: 'ppdFindMarkedChoice' has been explicitly marked deprecated here
extern ppd_choice_t *ppdFindMarkedChoice(ppd_file_t *ppd,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
../../printing/backend/print_backend_cups.cc:276:21: error: 'cupsGetPPD' is deprecated: Use cupsCopyDestInfo and friends instead. [-Werror,-Wdeprecated-declarations]
ppd_file_path = cupsGetPPD(name);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/cups/cups.h:367:20: note: 'cupsGetPPD' has been explicitly marked deprecated here
extern const char *cupsGetPPD(const char *name) _PPD_DEPRECATED;
^
../../printing/backend/print_backend_cups.cc:289:21: error: 'cupsGetPPD2' is deprecated: Use cupsCopyDestInfo and friends instead. [-Werror,-Wdeprecated-declarations]
ppd_file_path = cupsGetPPD2(http.http(), name);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/cups/cups.h:425:20: note: 'cupsGetPPD2' has been explicitly marked deprecated here
extern const char *cupsGetPPD2(http_t *http, const char *name) _PPD_DEPRECATED;
^
,
Jun 23 2016
https://www.cups.org/documentation.php/doc-2.0/api-cups.html#cupsCopyDestInfo says "CUPS 1.6/OS X 10.8", so 1.5 isn't enough. I'll make sure we disable the warning until we're on 1.6 then I guess.
,
Jun 24 2016
CUPS has been trying to remove client PPD support for a while now. We'll have to disable the warning for the older platforms. I should have support for the newer versions when we can't bump our minimum version.
,
Jul 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6bbe18d826106ca9b6a96a26b6341ad2899f60d3 commit 6bbe18d826106ca9b6a96a26b6341ad2899f60d3 Author: thakis <thakis@chromium.org> Date: Fri Jul 01 21:39:13 2016 printing: Adjust deprecation warning flag. The printing team plans to migrate to newer CUPS APIs once older Linux versions (which have old CUPS versions) are no longer supported. With newer OS X deployment targets, the current CUPS APIs are marked deprecated. There was already a flag to suppress these warnings, but it was added only when using a 10.9 SDK, which we haven't used in quite a while. (In general, deprecation warnings should be fixed, not suppressed. But in this case, printing team has a plan for fixing them, and they want to use one code base for both Linux and macOS.) BUG=622493 Review-Url: https://codereview.chromium.org/2117903002 Cr-Commit-Position: refs/heads/master@{#403539} [modify] https://crrev.com/6bbe18d826106ca9b6a96a26b6341ad2899f60d3/printing/BUILD.gn [modify] https://crrev.com/6bbe18d826106ca9b6a96a26b6341ad2899f60d3/printing/printing.gyp
,
Jul 1 2016
,
Jul 8 2016
,
Aug 10 2016
Cups 2.2 found in macOS 10.12 has moved this functionality from deprecated to removed. Chromium no longer builds in the macOS 10.12 betas.
,
Aug 15 2016
I don't have time allocated to tackle this right now, when do we need 10.12 working?
,
Aug 17 2016
I think I have a CL that makes the compile errors go away on OSX 10.12: https://codereview.chromium.org/2248343002 I just got the public OSX 10.12 beta and tried to build Chromium with it. I only got the following CUPS-related errors. ../../printing/backend/print_backend_cups.cc:243:21: error: use of undeclared identifier 'cupsGetPPD' ppd_file_path = cupsGetPPD(name); ^ ../../printing/backend/print_backend_cups.cc:256:21: error: use of undeclared identifier 'cupsGetPPD2' ppd_file_path = cupsGetPPD2(http.http(), name); My CL makes these errors go away. There are a bunch of other seemingly unrelated errors, so I wasn't able to try out the resulting build quite yet.
,
Aug 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/29c1262dbd4f749dd514d05a571cdd809ba8cfe0 commit 29c1262dbd4f749dd514d05a571cdd809ba8cfe0 Author: pwnall <pwnall@chromium.org> Date: Wed Aug 17 22:33:25 2016 Fix CUPS compilation error in OSX 10.12. BUG=622493 Review-Url: https://codereview.chromium.org/2248343002 Cr-Commit-Position: refs/heads/master@{#412670} [modify] https://crrev.com/29c1262dbd4f749dd514d05a571cdd809ba8cfe0/printing/backend/print_backend_cups.cc
,
Sep 27 2017
Contrary to comment 7, CUPS has not removed its PPD APIs. They are still in the deprecated state. Since the minimal Mac deployment target is 10.9 now, Chromium is no longer stuck waiting for support for older Mac versions to be dropped. The challenge now is to switch all the users that expect PPD content to something else.
,
Sep 28 2017
tl;dr; Switching away from PPD may not be feasible (if we want to handle the quirks that we currently handle) So 2016 me didn't quite understand what I understand now. Different CUPS versions can be very picky about ColorModel values and don't advertise the correct color IPP attributes. We've patched CUPS in CrOS to handle this but results could be variable on other systems.
,
Sep 28 2017
Well, maybe not tomorrow, but I think CUPS wants to get away from PPDs some day. When that happens, some version of the Mac SDK won't have cups/ppd.h anymore and then Chromium can't update its Mac SDK and/or bump up its mac_deployment_target. We don't need to fix this today, but we should start preparing for this. CUPS developers are fairly responsive on their mailing list, so if you have issues with CUPS that they need to fix, it will be good to bring them up. Out of curiousity, what issues did you hit? What version of CUPS is ChromeOS using these days?
,
Jan 18 2018
This seems to have gotten lost in the shuffle. We don't use PPDs from the Chrome side in ChromeOS, so it should be a drop in replacement. We're using 2.1.4 in ChromeOS right now. It's a bit old. I'd like to try to migrate to 2.3 this year. We found that there are a few non-standard names for Grey that we needed to add to the PPD for color detection. So, one concrete bug. But we're also ignoring a lot of the printer properties since they're not configurable right now.
,
Jan 21
(2 days ago)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Yesterday
(33 hours ago)
This is still relevant but should be rolled out behind a finch flag. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by thestig@chromium.org
, Jun 22 2016Components: Internals>Printing