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

Can't compile PPD per instructions in README #36

Open
elasticdotventures opened this issue May 14, 2021 · 4 comments
Open

Can't compile PPD per instructions in README #36

elasticdotventures opened this issue May 14, 2021 · 4 comments

Comments

@elasticdotventures
Copy link

$  cmake --build .
Scanning dependencies of target ppds
[ 33%] Building PPDs
[ 33%] Built target ppds
Scanning dependencies of target rastertozj
[ 66%] Building C object CMakeFiles/rastertozj.dir/rastertozj.c.o
/c0de/d0ngxi/src/zj-58/rastertozj.c: In function ‘initializeSettings’:
/c0de/d0ngxi/src/zj-58/rastertozj.c:37:3: warning: ‘ppdOpenFile’ is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
   37 |   ppd_file_t *pPpd = ppdOpenFile(getenv("PPD"));
      |   ^~~~~~~~~~
In file included from /c0de/d0ngxi/src/zj-58/rastertozj.c:4:
/usr/include/cups/ppd.h:389:20: note: declared here
  389 | extern ppd_file_t *ppdOpenFile(const char *filename) _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo and friends instead.");
      |                    ^~~~~~~~~~~
/c0de/d0ngxi/src/zj-58/rastertozj.c:41:3: warning: ‘ppdClose’ is deprecated: Use cupsCopyDestInfo and friends instead. [-Wdeprecated-declarations]
   41 |   ppdClose(pPpd);
      |   ^~~~~~~~
In file included from /c0de/d0ngxi/src/zj-58/rastertozj.c:4:
/usr/include/cups/ppd.h:364:14: note: declared here
  364 | extern void  ppdClose(ppd_file_t *ppd) _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo and friends instead.");
      |              ^~~~~~~~
[100%] Linking C executable rastertozj
[100%] Built target rastertozj
@klirichek
Copy link
Owner

What do you mean by 'can't compile'?
Yes, there are couple of warnings. They are intended, as ppd is actually deprecated years ago, but it is still use wide-spread on tons of systems. It will be warnings so.

@elasticdotventures
Copy link
Author

Our build policy is (by default) very strict, no warnings or it's not successful compile. 😉
https://github.com/apple/cups/blob/master/cups/ppd.h

have you investigated what type of effort would be required to remove the warning and perform as it suggests. Should I investigate further - what are your thoughts on the future of this library once the required library is removed? Thanks!

(is there are fork/dev branch, plan?)

@klirichek
Copy link
Owner

I can't do anything with deprecated warning here, since it is intended. Apple deprecated CUPS interface, and that is nothing to do with it, everybody should struggle anytime we try to use that interface now.

You may try, looking to reported -Wdeprecated-declarations - append compiler flag -Wno-deprecated-declarations, and it could work.

@felsgaertner
Copy link

@elasticdotventures , perhaps you could fix it and submit a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants