| <<<Back 1 day (to 2019/03/06) | 20190307 |
consolers | with ghostscript-gpl-9.26 on gentoo ps2pdf just fails with an error code of 1 | 02:57.51 |
| I guess I'm missing some files? | 03:00.00 |
| my non-gentoo version 9.22 works fine of course | 03:04.50 |
| stracing both side by side shows no suspects. gs is just arbitrarily barfing | 03:05.58 |
| I'm calling gs -dNOPAUSE -dBATCH -P- -dSAFER -sDEVICE=pdfwrite -sOutputFile=f.pdf -c .setpdfwrite -f file.ps on both | 03:08.28 |
| last thing the fail-scenario finds is "/usr/share/ghostscript/9.26/Resource/Decoding/Unicode" - and then it just exists | 03:10.24 |
| it doesnt even seem to touch the input file | 03:12.11 |
| i guess the whole install is broken | 03: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 OS | 08: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 -1 | 08: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 us | 08:50.09 |
consolers | it all works fine with my earlier ghostscript-9.22 - but i'm stumped at trying to debug it | 08:50.59 |
kens | Unless you haev a debug build,m you can't | 08: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 next | 08: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 maintainer | 08: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 exit | 08: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 source | 08: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 fine | 08:53.29 |
consolers | what is known as "portage" | 08:53.34 |
kens | I have no clue what that is | 08:53.41 |
| If I were doing it I would use Git to clone our repository, then autogen.sh to generate hte makefile, and tehn make | 08: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 1 | 08:54.50 |
kens | So it doesn't run, but its 'better' ? O.O | 08: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 system | 08:55.37 |
chrisl | consolers: Run gs in a debugger, and see where there error comes from | 08:55.52 |
consolers | it just exits | 08: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 minutes | 08:56.52 |
| i was just indicating it isnt "crashing" - which would drop you into the debugger | 08: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 directly | 08:58.05 |
| give me 20 min to do this | 08:58.20 |
| but breakpoint on main wont help, i need a better clue where the action starts | 08:59.08 |
chrisl | Well, since I don't even know exactly what executable you are calling, that's pretty much impossible to tell | 09: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 sameuseflags | 09:13.29 |
| any non-institutional users ever compile with --with-luratech ? | 09:15.36 |
chrisl | No. You'd need the Luratech source | 09:16.15 |
| IIRC, libidn is only for Unicode PDF passwords, or something | 09:17.15 |
consolers | this also builds with dilfridge's patches | 09:19.20 |
chrisl | That could be the problem - no idea what those patches do | 09: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 gs | 09: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 again | 09:34.34 |
| so i'll put abreakpoint on exit | 09: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 he | 09: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 calls | 09: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 that | 09: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 breakpoint | 09: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 right | 09:44.30 |
consolers | the build does unconditionally use the system lcms which happens to be lcms-2.9 | 09:46.14 |
| i'm sure thats where the problem is, i can of course compile without lcms can't i? | 09:47.35 |
chrisl | No | 09:47.44 |
consolers | ah | 09:47.48 |
| i'll try changing the so called "ebuild" to not use the system lcms then | 09:48.39 |
chrisl | That may not work, because I'd guess the maintainer strips out our forked lcms2 | 09: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 | hmm | 09:53.13 |
| my 9.22 ghostscript doesnt link to any external lcms library | 09: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 tar | 09:55.25 |
| this 9.22 reference isnt a gentoo ebuild | 09: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 box | 09:59.31 |
| isn't gs crucial in the cups/hplip printing pipeline? | 10:00.31 |
chrisl | I believe so, yes | 10: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 page | 10:02.10 |
| anyway external lcms2 is ruled out. same crash pattern without linking to the external library | 10: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 breakpoint | 10:06.48 |
| after the gui window comes up, it sticks for a second or two before it exits | 10:07.58 |
| not gui window - x window | 10:08.19 |
| which is gsapi_init_with_args | 10:10.58 |
| aha! a light! | 10:11.15 |
| because that function returns -100 | 10:11.41 |
| had i put a breakpoint on gsapi_exit this would have saved me an hour | 10: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 IRC | 10:17.19 |
kens2 | You could, as I suggested before, post the offending file so we could try it | 10:17.50 |
consolers | i've got as far as gs_run_init_file | 10: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 system | 10:22.44 |
| i'm almost out of time for now though | 10:22.53 |
chrisl | The Postscript isn't compiled in according to your strace earlier | 10: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 NOBIND | 10:36.19 |
chrisl | Um, no, but I believe you | 10: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 recollection | 10: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 nick | 10:43.44 |
consolers | oh please. | 10:45.40 |
| chrisl long story short, I had NOBIND defined and the "/NOBIND false def" was making it exit | 11:35.00 |
| i think | 11:35.02 |
chrisl | Hmm, strange... We have NOBIND defined. Although, it's completely ignored | 11:38.01 |
consolers | I dont claim to understand it | 11:38.24 |
chrisl | Well, if it works now, that's the main thing | 11:39.01 |
consolers | the problem was of course of my own making | 11:39.16 |
kens | We added back NOBIND specifically to make pstotext work | 11:39.33 |
| It has no other purpose or function | 11:39.46 |
consolers | yeah i'm a pstotext consumer | 11:39.48 |
| i still have some old postscript files i have to read | 11:40.04 |
chrisl | Well, that's what the txtwrite device is for.... | 11:40.41 |
kens | Lets not go there again | 11:40.50 |
consolers | yeah lets not | 11: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 /l8 | 12:18.31 |
| Forward 1 day (to 2019/03/08)>>> | |