[NTG-pdftex] [tex-live] TeX Live 2008: nasty pdf(la)tex bug on Solaris SPARC with ZFS

Vladimir Volovich vvv at vsu.ru
Sat Sep 13 17:03:11 CEST 2008


"KB" == Karl Berry writes:

 VV> odd things noticed on AIX: 1) pdftex prints some garbage to
 VV> terminal and to the log instead

 VV> 1) pdftex prints some garbage to terminal and to the log instead
 VV>    of the list of preloaded fonts. here is the diff between terminal output
 VV>    on aix and solaris:

 VV>  (/mnt/Master/texmf-dist/tex/context/base/supp-pdf.tex
 VV>  [Loading MPS to PDF converter (version 2006.09.02).]
 VV>  ) <cgolfer.pdf, id=1, 597.50829pt x 845.0471pt> <use cgolfer.pdf> [1{/mnt/Maste
 VV> -r/texmf/fonts/map/pdftex/updmap/pdftex.map} <./cgolfer.pdf>] (./test.aux) )2004
 VV> -612640pen_name_prefix(ur_file_name?lose_name_suffix2004612640pen_name_prefix?ur
 VV> -_file_name?lose_name_suffix2004612640pen_name_prefixxur_file_name?lose_name_suf
 VV> -fix2004612640pen_name_prefix?ur_file_name?lose_name_suffix
 VV> +r/texmf/fonts/map/pdftex/updmap/pdftex.map} <./cgolfer.pdf>] (./test.aux) )</mn
 VV> +t/Master/texmf-dist/fonts/type1/bluesky/cm/cmr10.pfb></mnt/Master/texmf-dist/fo
 VV> +nts/type1/bluesky/cm/cmr12.pfb></mnt/Master/texmf-dist/fonts/type1/bluesky/cm/c
 VV> +mti12.pfb></mnt/Master/texmf-dist/fonts/type1/bluesky/cm/cmtt12.pfb>
 VV>  Output written on test.pdf (1 page, 40672 bytes).
 VV>  Transcript written on test.log.

 KB> Possibly a compiler bug?  Anyway, if it only happens on AIX, I
 KB> fear you're the only one who can debug it ...

i've debugged it. it appears to be caused by a misfeature (or bug) of
the C pre-processor:

writet1.c contains

#define t1_log(s)        tex_printf("%s",s)

and then constructs such as

    t1_log(open_name_prefix);
    t1_log(cur_file_name);

get pre-processed to

    tex_printf("%open_name_prefix",open_name_prefix);
    tex_printf("%cur_file_name",cur_file_name);

instead of

    tex_printf("%s",open_name_prefix);
    tex_printf("%s",cur_file_name);

i fixed this by changing the define to

#define t1_log(str)      tex_printf("%s",str)

grepping texlive sources shows that this is probably the only place
which could cause such problem.

i'd like to ask pdftex maintainers to apply this patch to their master
sources and to texlive tree:

--- texk/web2c/pdftexdir/writet1.c
+++ texk/web2c/pdftexdir/writet1.c
@@ -26,7 +26,7 @@
 static const char _svn_version[] =
     "$Id$ $URL: http://scm.foundry.supelec.fr/svn/pdftex/branches/stable/source/src/texk/web2c/pdftexdir/writet1.c $";
 
-#define t1_log(s)        tex_printf("%s",s)
+#define t1_log(str)      tex_printf("%s",str)
 #define get_length1()    t1_length1 = t1_offset() - t1_save_offset
 #define get_length2()    t1_length2 = t1_offset() - t1_save_offset
 #define get_length3()    t1_length3 = fixedcontent? t1_offset() - t1_save_offset : 0

i've commited a fixed aix binary which now correctly shows the fonts.

Best,
v.


More information about the ntg-pdftex mailing list