[tlbuild] build failure: usage of __attribute__ ((format(printf, 1, 0))) in texk/web2c/luatexdir/luafontloader/src/ffdummies.c

taco taco at elvenkind.com
Thu May 27 21:00:17 CEST 2010


Vladimir Volovich wrote:
> Hi!
> 
> i've got a build failure on Solaris (using the Sun Studio compiler):
> 
> source='luatexdir/luafontloader/src/ffdummies.c' object='libff_a-ffdummies.o' libtool=no \
>         DEPDIR=.deps depmode=none /opt/csw/bin/bash ../../../texk/web2c/../../build-aux/depcomp \
>         cc -DHAVE_CONFIG_H -I. -I../../../texk/web2c -I/opt/home/vvv/src/texlive/source/Work/texk -I/opt/home/vvv/src/texlive/source/texk -DFONTFORGE_CONFIG_NO_WINDOWING_UI=1 -DLUA_FF_LIB=1 -D_NO_PYTHON=1 -DX_DISPLAY_MISSING=1 -DNODYNAMIC=1 -D_NO_FREETYPE=1 -D_NO_LIBUNINAMESLIST=1 -UHAVE_LIBINTL_H -I../../../texk/web2c/luatexdir/lua51 -I../../../texk/web2c/luatexdir/luafontloader/fontforge/inc -I../../../texk/web2c/luatexdir/luafontloader/fontforge/fontforge   -xarch=v8 -O -c -o libff_a-ffdummies.o `test -f 'luatexdir/luafontloader/src/ffdummies.c' || echo '../../../texk/web2c/'`luatexdir/luafontloader/src/ffdummies.c
> "../../../texk/web2c/luatexdir/luafontloader/src/ffdummies.c", line 51: syntax error before or at: (
> "../../../texk/web2c/luatexdir/luafontloader/src/ffdummies.c", line 51: warning: old-style declaration or incorrect type for: __attribute__
> "../../../texk/web2c/luatexdir/luafontloader/src/ffdummies.c", line 71: cannot recover from previous errors
> cc: acomp failed for ../../../texk/web2c/luatexdir/luafontloader/src/ffdummies.c
> gmake[4]: *** [libff_a-ffdummies.o] Error 2
> 
> after i've commented out the lines with __attribute__, i was
> able to compile the file.
> 
> it seems that last year's version of this file did not use
> __attribute__, and worked fine. maybe it could be surrounded with
> #ifdef GNUC ?

Adding

   #ifndef __attribute__
   #define __attribute__(A)
   #endif

at the top of that file should work.

Normally in luatex a cpp definition like this is provided by the
obsdcompat library, but in this case I think a local #definition is 
simpler than including the whole obsdcompat header in the build process.

I can do this tomorrow morning.

Best wishes,
Taco



More information about the tlbuild mailing list