Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2019/03/06)20190307 
consolers with ghostscript-gpl-9.26 on gentoo ps2pdf just fails with an error code of 102:57.51 
  I guess I'm missing some files?03:00.00 
  my non-gentoo version 9.22 works fine of course03:04.50 
  stracing both side by side shows no suspects. gs is just arbitrarily barfing03:05.58 
  I'm calling gs -dNOPAUSE -dBATCH -P- -dSAFER -sDEVICE=pdfwrite -sOutputFile=f.pdf -c .setpdfwrite -f file.ps on both03:08.28 
  last thing the fail-scenario finds is "/usr/share/ghostscript/9.26/Resource/Decoding/Unicode" - and then it just exists03:10.24 
  it doesnt even seem to touch the input file03:12.11 
  i guess the whole install is broken03:18.12 
kens consolers (for the logs) Without seeing the input file you are using its impossible to tell what might be the problem. However it does sound like the installation is simply broken. We don't supply *any* Linux packages, you should probably start by contacting the packager for your OS08:04.04 
consolers ghostscript-gpl-9.26 gs is failing pretty hard on my gentoo build, and I don't know how to track down what is going wrong. ps2pdf just exits with -1 but any gs invocation on a valid ps file also pops up the X window and then the process exits with -108:49.03 
kens consolers assuming you are using a package supplied by Gentoo, then you need to contact the package maintainer. Alternatively you can pull the soruce from our Git repository and build it, we can help you with that code, but not the packaged code.08:49.57 
  Also, providing the file would help so we can see if it works for us08:50.09 
consolers it all works fine with my earlier ghostscript-9.22 - but i'm stumped at trying to debug it08:50.59 
kens Unless you haev a debug build,m you can't08:51.13 
  If you have a debug build, then you must have built from source ?08:51.30 
consolers the gentoo package it is built from source, but i didnt turn debug on i'll do that next08:52.01 
kens Again, if you are using a package supplied by Gentoo, instead of *our* source, tehn we can't help you, you need to contact the package maintainer08:52.29 
consolers i've tried stracing it and comparing where it fails, it reads "/usr/share/ghostscript/9.26/Resource/Decoding/Unicode" and then does an mmap and the bam exit08:52.33 
  kens the "gentoo package" is not a package in your sense it is just a shell-script driver that downloads and compiles the source08:53.02 
  sort of...08:53.20 
kens Well I'm sitting here in front of a Ubuntu system whch builds and installs Ghostscript just fine08:53.29 
consolers what is known as "portage"08:53.34 
kens I have no clue what that is08:53.41 
  If I were doing it I would use Git to clone our repository, then autogen.sh to generate hte makefile, and tehn make08:54.06 
consolers well i've compiled and installed ghostscript just fine too better than your ubuntu system, except it doesnt run, or when it runs it doesnt do anything after startup - just exits with error code 108:54.50 
kens So it doesn't run, but its 'better' ? O.O08:55.13 
consolers surely someone with knowledge of the internal working of ghostscript can suggest where to start looking?08:55.19 
kens I thought I already had. Start by using our source and build system08:55.37 
chrisl consolers: Run gs in a debugger, and see where there error comes from08:55.52 
consolers it just exits08:56.03 
  [Inferior 1 (process 8049) exited with code 01]08:56.34 
chrisl It doesn't even run the "main" function?08:56.38 
consolers i'll recompile with ggdb and try that in 20 minutes08:56.52 
  i was just indicating it isnt "crashing" - which would drop you into the debugger08:57.17 
kens We never suggested it was....08:57.29 
chrisl Are you calling gs directly, or still trying ps2pdf?08:57.53 
consolers just gs directly08:58.05 
  give me 20 min to do this08:58.20 
  but breakpoint on main wont help, i need a better clue where the action starts08:59.08 
chrisl Well, since I don't even know exactly what executable you are calling, that's pretty much impossible to tell09:00.46 
consolers the only notable thing i see in the old config.log is it was built --without-libidn. I'll recompile with the sameuseflags09:13.29 
  any non-institutional users ever compile with --with-luratech ?09:15.36 
chrisl No. You'd need the Luratech source09:16.15 
  IIRC, libidn is only for Unicode PDF passwords, or something09:17.15 
consolers this also builds with dilfridge's patches09:19.20 
chrisl That could be the problem - no idea what those patches do09:26.38 
consolers i'm sure theyre well tested! 09:32.42 
  dilfridge one of those patches pushes back a copyright notice from 2018 to 2012 though!09:33.02 
  anyway - here goes. gdb --args gs09:33.34 
  and it exits.09:33.54 
  i've put a break point at main. psi/dxmainc.c:84 but if i `c' it'll just exit again09:34.34 
  so i'll put abreakpoint on exit09:35.16 
chrisl Wouldn't it be better to put a breakpoint at the start of main, and see which gapsi_ call is actually returning an error??09:36.00 
sebras chrisl: if he09:36.33 
consolers Breakpoint 1, main (argc=1, argv=0x7fffffffdf48) at psi/dxmainc.c:84. if ((code = gsapi_new_instance(&instance, NULL)) == 0) {...09:36.44 
  but if i continue, it just exits. and the only thing on the stack is libc calls09:37.01 
sebras he's built for the wrong architecture it may exit before main. this has happened to me before. setting LD_DEBUG=all was helpful to me (it might be to you or consolers too)09:37.39 
consolers it breaks at main. i'll try that09:38.00 
  it doesnt show anything suspicious. it pushed off a lot of lines beyond my screen scrollback, but finally it is resolving symbols for /usr/lib64/liblcms2.so.2 , then the last symbol it resolves is free: "symbol=free lookup in file=/usr/bin/gs" binding file /usr/lib64/liblcms2.so.2 [0] to /lib64/libc.so.6 [0]: normal symbol `free' [GLIBC_2.2.5]09:42.00 
  and then i hit the exit breakpoint09:42.06 
chrisl Well, we do ship a forked lcms2 with a different API/ABI, but AFAIK, vanilla lcms2 still works, if the build is right09:44.30 
consolers the build does unconditionally use the system lcms which happens to be lcms-2.909:46.14 
  i'm sure thats where the problem is, i can of course compile without lcms can't i?09:47.35 
chrisl No09:47.44 
consolers ah09:47.48 
  i'll try changing the so called "ebuild" to not use the system lcms then09:48.39 
chrisl That may not work, because I'd guess the maintainer strips out our forked lcms209:49.17 
consolers what the maintainer strips out i can put back in!09:51.50 
  but it may take a few minutes to figure out.09:52.10 
chrisl Well, as far as I'm aware, most (all?) other distros are using vanilla lcms2 without a problem, so.....09:53.07 
consolers hmm09:53.13 
  my 9.22 ghostscript doesnt link to any external lcms library09:54.26 
chrisl Does the source include an lcms2 (or lcms2mt) directory?09:54.58 
consolers i'll have to check where i put the downloaded tar09:55.25 
  this 9.22 reference isnt a gentoo ebuild09:56.16 
chrisl So, not comparing like for like, then.....09:57.10 
consolers lets see if it the build prefers to pick up lcms2 locally...09:59.15 
  the only problem is its a slow 1000mhz box09:59.31 
  isn't gs crucial in the cups/hplip printing pipeline?10:00.31 
chrisl I believe so, yes10:00.50 
consolers i was trying to debug cups with a printer, which kept saying: printed ok! except nothing was ever printed - which would happen if gs failed -- but i finally got it to produce a test page10:02.10 
  anyway external lcms2 is ruled out. same crash pattern without linking to the external library10:04.48 
chrisl Well, you're going to have to step through gsapi_new_instance() and see what's failing in there. Or grab the release from us, and try that.10:06.05 
consolers I posted what I got from strace ^^^ 10:06.32 
  i;m really looking for a better place to put a breakpoint10:06.48 
  after the gui window comes up, it sticks for a second or two before it exits10:07.58 
  not gui window - x window10:08.19 
  which is gsapi_init_with_args10:10.58 
  aha! a light!10:11.15 
  because that function returns -10010:11.41 
  had i put a breakpoint on gsapi_exit this would have saved me an hour10:12.15 
chrisl Yeh, that's not really much light.... your strace suggests it's erroring out running Postscript. That's not something I can talk you through on IRC10:17.19 
kens2 You could, as I suggested before, post the offending file so we could try it10:17.50 
consolers i've got as far as gs_run_init_file10:20.22 
  the postscript is already compiled in. i'll compile a vanilla ghostscript to compare. if no one else has complained the problem is only on my system10:22.44 
  i'm almost out of time for now though10:22.53 
chrisl The Postscript isn't compiled in according to your strace earlier10:23.23 
consolers ah it does read a bunch of files from Resource/Init/10:26.36 
  earlier on..10:26.53 
  a file there was the culprit.10:30.10 
  0 points to me for debugging!10:31.43 
chrisl So, what was the issue?10:32.04 
consolers i'm not 100% sure yet, some gs_init files are wrong and don't match the distribution - but it isn't a gentoo problem.10:34.58 
  remember when I was here complaining about NOBIND10:36.19 
chrisl Um, no, but I believe you10:36.48 
  NOBIND being a heinous insult to anyone who knows/cares about Postscript :-(10:37.48 
kens Presumably coloners was last here as enometh, which won't help recollection10:41.18 
  Ah he wa the one complaining that 'Ghostscript used to be a stable project'10:41.44 
  Ah, and I kicked him from #ghostscript for being abusive...10:43.36 
  So back under a different nick10:43.44 
consolers oh please.10:45.40 
  chrisl long story short, I had NOBIND defined and the "/NOBIND false def" was making it exit11:35.00 
  i think11:35.02 
chrisl Hmm, strange... We have NOBIND defined. Although, it's completely ignored11:38.01 
consolers I dont claim to understand it11:38.24 
chrisl Well, if it works now, that's the main thing11:39.01 
consolers the problem was of course of my own making11:39.16 
kens We added back NOBIND specifically to make pstotext work11:39.33 
  It has no other purpose or function11:39.46 
consolers yeah i'm a pstotext consumer11:39.48 
  i still have some old postscript files i have to read11:40.04 
chrisl Well, that's what the txtwrite device is for....11:40.41 
kens Lets not go there again11:40.50 
consolers yeah lets not11:40.54 
chrisl Well, it's just that, at some point, the stuff pstotext relies upon is likely to go away.11:41.23 
consolers part #ghostscript /l812:18.31 
 Forward 1 day (to 2019/03/08)>>> 
ghostscript.com #mupdf
Search: