Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2022/02/28)Fwd 1 day (to 2022/03/02) >>>20220301 
artifexirc-bot <Till Kamppeter> @chrisl, HI08:22.11 
  <chrisl> Hello Till08:23.42 
  <Till Kamppeter> @chrisl I had added the appleraster/urf device. It uses a new CUPS API part which was not there when the included CUPS library was added to Ghostscript.08:29.40 
  <chrisl> But you "protected" it with pre-processors conditionals, so it should be fine08:30.18 
  <Till Kamppeter> When I tried to build Ghostscript I did not succeeed to get it including the new output devices.08:30.28 
  <Till Kamppeter> Until I discovered that the build command line for the gedvcups.c file had a hardcoded -I to the included raster.h, so it also used the included oe and never the system's raster.h.08:31.42 
  <chrisl> Right08:32.28 
  <Till Kamppeter> The included raster.h does not have the definitions needed for switching to Apple Raster output instead of PWG Raster08:32.52 
  <Till Kamppeter> So I have removed the -I and got what I wanted.08:33.09 
  <chrisl> Which broke building with the "local" sources08:33.29 
  <Till Kamppeter> I also tested forcing the use of the included libcups and this also worked (but without appleraster/urf).08:33.42 
  <Till Kamppeter> So all looked OK for me.08:33.51 
  <chrisl> Buliding with the included sources didn;t work on Windows. And the entire reason they are there is for debugging on Windows.....08:34.21 
  <Till Kamppeter> What I need is that if one build Ghostscript on a system with sufficiently new CUPS, the system's libcups gets automatically used and I get appleraster/urf devices.08:34.49 
  <Till Kamppeter> This should go automatically without any ./configure options.08:35.21 
  <chrisl> On Unix-like systems, we default to the installed cups08:35.23 
  <Till Kamppeter> Problem is the raster.h, the build process does not use the system's raster.h.08:35.54 
  <chrisl> Yes it does08:36.00 
  <chrisl> It didn't, but it does now08:36.13 
  <Till Kamppeter> Did you try and did you have appleraster and urf in `gs -h` ?08:36.29 
  <chrisl> Yes08:36.35 
  <chrisl> I'm looking at the output from the 9.56.0 release branch now08:37.04 
  <chrisl> You are correct that the makefile before hard coded the include path and was incorrect. That path is now set by configure, and if we're using the system library, it is set to a non-existent directory (in the same way we do when building with the system freetype).08:38.17 
  <Till Kamppeter> I cannot compile currently, as current GIT state has a build system bug:08:38.20 
  <Till Kamppeter> ```08:38.20 
  <Till Kamppeter> $ make08:38.22 
  <Till Kamppeter> Makefile:760: @PDF_MAK@: No such file or directory08:38.23 
  <Till Kamppeter> make: *** No rule to make target '@PDF_MAK@'. Stop.08:38.24 
  <Till Kamppeter> ```08:38.25 
  <Till Kamppeter> Or a newly introduced dependency and I do not know which one.08:39.01 
  <chrisl> I'd guess you deleted the pdf directory - don't do that08:39.13 
  <chrisl> Actually, no, I don't know what you've done. It's working just fine for me08:40.46 
  <Till Kamppeter> I am on GIT, so I have the complete, original source.08:44.29 
  <Till Kamppeter> And after cloning the GIT I only did `./configure` and `make` .08:44.56 
  <chrisl> Well, no you didn't, because our git doesn't have a configure script committed to it. You need to run autogen.sh which will create and run the configure script08:45.40 
  <Till Kamppeter> So I proably also ran autogen.sh.08:46.08 
  <Till Kamppeter> I will run it again.08:46.13 
  <Till Kamppeter> Now it works, my ./configure was outdated.08:46.57 
  <Till Kamppeter> I probably cloned months ago, pulled built, pulled, built, ...08:47.26 
  <Till Kamppeter> The pdf/ directory is the new PDF interpreter?08:47.58 
  <chrisl> Yes08:48.06 
  <Till Kamppeter> Now it built, but without appleraster and urf devices.08:51.53 
  <chrisl> Well, I have them08:52.23 
  <chrisl> Can you pastebin the compiler command line for gdevcups,c ?08:53.38 
  <chrisl> FWIW, I have cups 2.3.1 installed08:54.14 
  <Till Kamppeter> This is the compilation command line of `gdevcups.c` :08:54.45 
  <Till Kamppeter> ```08:54.46 
  <Till Kamppeter> gcc -o ./obj/gdevcups.o -c -O2 -DNDEBUG -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -fno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIBDL=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -D__USE_08:54.47 
  <Till Kamppeter> -I./base/ \08:54.48 
  <Till Kamppeter> -I./devices/ -Isrc/libs \08:54.50 
  <Till Kamppeter> -I./obj/ \08:54.51 
  <Till Kamppeter> ./cups/gdevcups.c08:54.52 
  <Till Kamppeter> ``` 08:54.53 
  <Till Kamppeter> You see the `-Isrc/libs` near the bottom, it makes the process using the included `raster.h` and not the system's one.08:54.55 
  <chrisl> But src/libs doesn't exist08:55.26 
  <Till Kamppeter> If I modify `devs.mak` removing the `-Isrc/libs` it works.08:56.11 
  <chrisl> And breaks using the included sources on Windows08:56.38 
  <Till Kamppeter> That is strange, it must have been `cups/libs` . Where does this `src` come from.08:57.22 
  <chrisl> It comes from configure. As I said, using the system lib, it sets the include path to a non-existent directory. The same way we do for Freetype08:58.19 
  <Till Kamppeter> Then it is even more strange what is happening here. There is nowhere a `src` directory in Ghostscript.08:58.32 
  <chrisl> No, and this is how freetype has worked for probably more than 6-7 years08:59.11 
  <chrisl> And src/libs doesn't even match any inside the cups source tree....08:59.40 
  <chrisl> What about if you change it to be "-I./src/libs" ?09:00.34 
  <Till Kamppeter> This is the template for the compile command line in `devs.mak`:09:08.55 
  <Till Kamppeter> ``` 09:08.56 
  <Till Kamppeter> $(DEVOBJ)gdevcups.$(OBJ) : $(LCUPSSRCDIR)$(D)gdevcups.c $(std_h) $(gxdevsop_h) $(DEVS_MAK) $(MAKEDIRS)09:08.57 
  <Till Kamppeter> $(CUPS_CC) $(DEVO_)gdevcups.$(OBJ) $(C_) $(CFLAGS) $(CUPSCFLAGS) \09:08.58 
  <Till Kamppeter> $(I_)$(GLSRC)$(_I) \09:09.00 
  <Till Kamppeter> $(I_)$(DEVSRC)$(_I) $(I_)$(LIBCUPSSRCDIR)$(D)libs$(_I) \09:09.01 
  <Till Kamppeter> $(I_)$(DEVOBJ)$(_I) \09:09.02 
  <Till Kamppeter> $(LCUPSSRCDIR)$(D)gdevcups.c09:09.04 
  <Till Kamppeter> ``` 09:09.05 
  <Till Kamppeter> So it inserts `src` for `LCUPSSRCDIR` strange.09:09.06 
  <Till Kamppeter> This is the template for the compile command line in `devs.mak`:09:09.21 
  <Till Kamppeter> ``` 09:09.22 
  <Till Kamppeter> $(DEVOBJ)gdevcups.$(OBJ) : $(LCUPSSRCDIR)$(D)gdevcups.c $(std_h) $(gxdevsop_h) $(DEVS_MAK) $(MAKEDIRS)09:09.23 
  <Till Kamppeter> $(CUPS_CC) $(DEVO_)gdevcups.$(OBJ) $(C_) $(CFLAGS) $(CUPSCFLAGS) \09:09.24 
  <Till Kamppeter> $(I_)$(GLSRC)$(_I) \09:09.26 
  <Till Kamppeter> $(I_)$(DEVSRC)$(_I) $(I_)$(LIBCUPSSRCDIR)$(D)libs$(_I) \09:09.27 
  <Till Kamppeter> $(I_)$(DEVOBJ)$(_I) \09:09.28 
  <Till Kamppeter> $(LCUPSSRCDIR)$(D)gdevcups.c09:09.30 
  <Till Kamppeter> ``` 09:09.31 
  <Till Kamppeter> So it inserts `src` for `LIBCUPSSRCDIR` strange.09:09.32 
  <chrisl> It's not strange, it's the same as we do for freetyoe09:09.46 
  <chrisl> It's not strange, it's the same as we do for freetype09:09.48 
  <Till Kamppeter> Note that there exists `LCUPSSRCDIR` and `LIBCUPSSRCDIR` .09:10.05 
  <chrisl> I know, I added LIBCUPSSRCDIR for this specific case09:10.37 
  <Till Kamppeter> The `raster.h` it should use is `/usr/include/cups/raster.h` .09:11.28 
  <chrisl> And, for me, it does09:11.48 
  <Till Kamppeter> Now, how to debug this?09:12.51 
  <chrisl> I wonder if this would work better: https://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=e9aa32773f32903222315d17f1fba3f92543353609:13.47 
  <Till Kamppeter> No, did not work.09:27.46 
  <Till Kamppeter> One must somehow tell gcc that the raster.h must be the one of the system and not the one which comes with gs.09:28.17 
  <chrisl> That just makes no sense at all. You shouldn't have to tell gcc *not* to search somewhere custom09:29.20 
  <Till Kamppeter> What system are you on? I am using Ubuntu 22.04 (Jammy).09:34.28 
  <chrisl> Ubuntu 20.04.4 LTS09:36.23 
  <Till Kamppeter> Yes, we are in a bad time, because out there one stays with the last LTS and we are shortly before the next one.09:37.24 
  <chrisl> I had problems with 21.04/21.10 that meant I couldn't use them, so I had to go back. It's a bit of a pain, really09:38.12 
  <Till Kamppeter> We need to get it working in the newer ones, as each one will have to ship with a current Ghostscript.09:39.52 
  <Till Kamppeter> So I would be grateful if you could quickly set up a 22.04 (in a VM perhaps) and try there.09:40.25 
  <Till Kamppeter> For what did you introduce `LIB_CUPS_DIR="src"` in the first place when there is nowhere a directory named `src` ?09:59.15 
  <chrisl> Because using LCUPSSRCDIR for the -I meant we'd pick up the wrong raster.h10:00.14 
  <Till Kamppeter> We must simply assure that first the default `/usr/include/` (and any other standard ones) is searched and only after that our included ones, like `./cups/libs` .10:02.45 
  <chrisl> But we're not telling it to search ./cups/libs10:03.10 
  <Till Kamppeter> Yes, this is really strange for me.10:04.12 
  <chrisl> The 22.04 installer seems to be busy removing a bunch of packages that it just installed......10:05.26 
  <Till Kamppeter> I did `chmod -r cups/libs/cups/raster.h` now, `make distclean` , and then built again, and again no `urf` somewhere there must be a `raster.h` which should not be there.10:15.47 
  <chrisl> @Till Kamppeter But that doesn't explain how pointing the compiler at ./obj/libs would be a problem. I can't even see how something in the environment would cause it top behave like you're seeing10:23.28 
  <Till Kamppeter> Now I am thinking about that somewhere on my system could be lurking around a wrong raster.h. Is there a way that if one compiles a C program, to see which *.h files are actually taken?10:31.32 
  <chrisl> Add "-M" to your CFLAGS, IIRC10:32.58 
  <Till Kamppeter> Tried this, but then ./configure does not run. So I have called the command ine which I posted here at the beginning. Added -M, also -E and got a report of which .h files are used. Only the correct /usr/include/cups/raster.h gets used.11:04.34 
  <Till Kamppeter> Now I want to see the pre-processed source and I am not finding a way to do so.11:05.02 
  <chrisl> "-save-temps" should give you the pre-processed source11:07.36 
  <Till Kamppeter> Yes, I have found it, too, and it seems that the right code pieces are used.11:14.22 
  <Till Kamppeter> But this seems not to be the reason why devices do not appear.11:14.51 
  <Till Kamppeter> The `Makefile` contains `DEVICE_DEVS3=$(DD)appleraster.dev $(DD)cups.dev $(DD)pwgraster.dev $(DD)urf.dev` . So `./configure` has identified a suitable CUPS version on the system.11:16.11 
  <Till Kamppeter> But now why are nor appleraster and urf in the resulting gs?11:16.35 
  <Till Kamppeter> The rules for appleraster.dev and urf.dev are in `devices/devs.mak` .11:17.47 
  <Till Kamppeter> They are identical to the ones for pwgraster and cups and pwgraster and cups appear in `gs -h` .11:19.44 
  <chrisl> I'm kind of surprised that doesn't result in a linker error11:22.27 
  <chrisl> @Till Kamppeter The best I can suggest right now is to try that commit I posted above, but start from an otherwise clean tree - I wouldn't be surprised if the dependencies are a bit flaky, and the .dev files aren't being properly recreated.11:50.13 
  <chrisl> @Till Kamppeter Building with fresh 22.04 installation (with the appropriate packages installed), I get the urf and appleraster devices in the resulting binary12:20.24 
  <chrisl> That's using the current git master/HEAD for ghostpdl12:20.51 
  <Till Kamppeter> This is really strange, I have tried your suggested commit, I have refreshed everything and run a simple `./autogen.sh; make` and all the time I did not get the two devices.13:33.52 
  <KenSharp> @Till Kamppeter Chris will be AFK for a couple of hours, and shortly after that we have a regular engineering meeting. I doubt he'll be able to look again today. Also, neither of us can see a problem, and between us we've tried 20-10, 21-10 and 20-04. All of them build correctly and include the appleraster and urf devices after the build.13:35.45 
  <KenSharp> @Till Kamppeter Chris will be AFK for a couple of hours, and shortly after that we have a regular engineering meeting. I doubt he'll be able to look again today. Also, neither of us can see a problem, and between us we've tried 20-10, 21-10 and 22-04. All of them build correctly and include the appleraster and urf devices after the build.13:36.12 
  <Till Kamppeter> @chrisl @kenken64 in the Ubuntu package (backported my original commit plus @chrisl's commit as distro patches into the current Ubuntu package of ghostscript) it works correctly. I get the two extra devices.14:26.10 
  <KenSharp> Outside my expertise I'm afraid14:26.54 
  <KenSharp> The Ghostscript build system is arcana I'm not qualified for.14:27.12 
  <Till Kamppeter> No problem, I only wanted to report (partial) success.15:10.43 
  <chrisl> @Till Kamppeter So with https://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=e9aa32773f32903222315d17f1fba3f925433536 on top of master, it works?15:32.43 
  <HenryStiles> @Till Kamppeter has anything changed with the URF license, a few years back I was told by Apple the URF was part of the AirPrint specification and we could not release an open source encoder. Has anything changed? We do have an encoder that we want to release.15:51.05 
  <HenryStiles> @Till Kamppeter has anything changed with the URF license? A few years back I was told by Apple the URF was part of the AirPrint specification and we could not release an open source encoder. Has anything changed? We do have an encoder that we want to release.15:51.48 
  <Till Kamppeter> @HenryStiles the encoder I have added is actually implemented in libcups and libcups is free software. It has already been in libcups for some years now. You can see in my commit that I have only flicked a little switch to make libcups ourputting Apple Raster/URF instead of PWG Raster.23:24.22 
  <Till Kamppeter> @chrisl, in the Ubuntu package I have only added the commits d56ebbd (my initial change) and 54532a8 (your fix) as distro patches to the Ghostscript 9.55.0 which comes with Ubuntu 22.04 LTS (Jammy). I did not add your extra commit you mentioned. The resulting Ubuntu package works.23:28.52 
  <HenryStiles> thanks Till23:42.40 
 <<<Back 1 day (to 2022/02/28)Forward 1 day (to 2022/03/02)>>> 
ghostscript.com #mupdf
Search: