Subject: pkg/37272: graphics/gimp-ufraw fails to build on Solaris with gcc-4.2.2
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <raymond.meyer@rambler.ru>
List: pkgsrc-bugs
Date: 11/03/2007 19:25:01
>Number:         37272
>Category:       pkg
>Synopsis:       graphics/gimp-ufraw fails to build on Solaris with gcc-4.2.2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 03 19:25:01 +0000 2007
>Originator:     raymond
>Release:        
>Organization:
>Environment:
SunOS ultra10 5.10 Generic_118833-33 sun4u sparc SUNW,Ultra-5_10
>Description:
gmake[2]: Entering directory `/opt/pkg.obj/graphics/gimp-ufraw/work.ultra10/ufraw-0.12.1'
if gcc -DHAVE_CONFIG_H -I. -I. -I.  -ffast-math -fomit-frame-pointer -W -Wall -O3 -I/opt/pkg/include   -DXTHREADS -I/opt/pkg/include/gtk-2.0 -I/opt/pkg/lib/gtk-2.0/include -I/opt/pkg/include/atk-1.0 -I/opt/pkg/include/cairo -I/opt/pkg/include/pango-1.0 -I/opt/pkg/include/glib/glib-2.0 -I/opt/pkg/lib/glib-2.0/include -I/opt/pkg/include/freetype2 -I/opt/pkg/include -I/opt/pkg/include/libpng12 -I/usr/openwin/include   -I/opt/pkg/include/glib/glib-2.0 -I/opt/pkg/lib/glib-2.0/include   -I/opt/pkg/include    -DDCRAW_NOMAIN -DUFRAW_LOCALEDIR=\"/opt/pkg/share/locale\" -DPNG_NO_ASSEMBLER_CODE -I/opt/pkg/include -I/opt/pkg/include/db4 -I/opt/pkg/include/freetype2 -D_REENTRANT -I/usr/include  -O -I/opt/pkg/include -I/opt/pkg/include/db4 -I/opt/pkg/include/freetype2 -D_REENTRANT -I/usr/include -MT ufraw_ufraw.o -MD -MP -MF ".deps/ufraw_ufraw.Tpo" -c -o ufraw_ufraw.o ufraw_ufraw.c; \
        then mv -f ".deps/ufraw_ufraw.Tpo" ".deps/ufraw_ufraw.Po"; else rm -f ".deps/ufraw_ufraw.Tpo"; exit 1; fi
ufraw_ufraw.c: In function 'ufraw_config':
ufraw_ufraw.c:434: error: too few arguments to function 'ctime_r'
gmake[2]: *** [ufraw_ufraw.o] Error 1
gmake[2]: Leaving directory `/opt/pkg.obj/graphics/gimp-ufraw/work.ultra10/ufraw-0.12.1'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/opt/pkg.obj/graphics/gimp-ufraw/work.ultra10/ufraw-0.12.1'
gmake: *** [all] Error 2
*** Error code 2

Stop.
bmake: stopped in /opt/pkgsrc/graphics/gimp-ufraw
*** Error code 1

>How-To-Repeat:

>Fix:
The error is coming from the following lines in ufraw_ufraw.c

    /* Set the EXIF data */
#ifdef __MINGW32__
    /* For MinG32 we don't have the thread safe ctime_r */
    g_strlcpy(uf->conf->timestamp, ctime(&raw->timestamp), max_name);
#elif defined(SOLARIS)
    ctime_r(&raw->timestamp, uf->conf->timestamp, sizeof(uf->conf->timestamp));
#else
    ctime_r(&raw->timestamp, uf->conf->timestamp);
#endif

Macro SOLARIS is not defined, so ctime_r with 2 arguments is used