command line batch export is wrong for some locales
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pcb |
Fix Released
|
Low
|
Unassigned |
Bug Description
If I build pcb from the fresh cloned git sources and my locale
is not C I have the following errors:
Making all in doc
...
/usr/bin/ps2pdf `gawk 'BEGIN{s=8}; /BoundingBox/ {printf("-r%d -g%dx%d", s*72, s*$4, s*$5);}' pad.eps` pad.eps pad.pdf
Error: /typecheck in --lt--
Operand stack:
--nostringval-- (%%BoundingBox: 0 0 219,446699 127,142563) --dict:1/2(ro)(G)-- --nostringval-- --nostringval-- (%%BoundingBox: 0 0 219,446699 127,142563) 1 0 0 219,446699 0.0 0.0 219.0 127.0 127,142563
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop --nostringval-- 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- %ztokenexec_
Dictionary stack:
--dict:
Current allocation mode is local
Current file position is 65
GPL Ghostscript 9.04: Unrecoverable error, exit code 1
make[2]: *** [pad.pdf] Error 1
rm pad.eps
make[2]: Leaving directory `/home/
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/
make: *** [all] Error 2
I've bisected and found that the problem is in
commit fa0768e9a8a1367
To find it I did:
git init
git clone git://git.
cd pcb
git bisect start
git bisect bad
git bisect good 262ec1ab712879a
git bisect run sh -c "rm * -r .cvsignore .gitignore && git reset --hard && ./autogen.sh && ./configure && make"
My locale's output:
$ locale | grep LANG
LANG=ru_RU.UTF-8
If I build using previous commit
git-checkout -f fa0768e9a8a1367
./autogen.sh && ./configure && make
(which will make all necessary *.eps-files), then checkout master HEAD
and build again:
git-checkout -f master
make
all works well.
Further investigation has shown that even if I afterwards build needed
eps-files using for example
LANG=C make pad.eps puller.eps gcode.eps thermal.eps
then make the program and install it, the problem still exists.
If I export abovementioned formats from gui all is OK. When I use for
example
pcb -x eps mypcb.pcb
from command line, they're outputted with comma as separator in numbers.
The issue is probably the same as in the bug #883768.
How to solve this issue (possible workarounds):
1) revert the abovementioned commit
git revert fa0768e9a8a1367
2) use the same approach for any exporter as used in commit
4101b611a84fbcd
that case: why export from GUI works well and does not depend on
locale settings?
3) use an attached patch as a workaround.
Changed in pcb: | |
status: | Confirmed → Fix Committed |
Changed in pcb: | |
status: | Fix Committed → Fix Released |
Changed in pcb: | |
milestone: | none → pcb-20140316 |
Forgot to mention formats which output is wrong: eps, ps, gcode, nelma.