Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361993 - media-gfx/xloadimage-4.1-r10 - jpeg.c:326: error: expected '}' before 'else'
Summary: media-gfx/xloadimage-4.1-r10 - jpeg.c:326: error: expected '}' before 'else'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 23:10 UTC by Laszlo Valko
Modified: 2011-08-25 20:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge output (emerge.log,7.11 KB, text/plain)
2011-04-04 23:12 UTC, Laszlo Valko
Details
emerge --info (emerge.info,4.76 KB, text/plain)
2011-04-04 23:13 UTC, Laszlo Valko
Details
possible fix (xloadimage.patch,453 bytes, patch)
2011-04-04 23:21 UTC, Laszlo Valko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo Valko 2011-04-04 23:10:24 UTC
xloadimage fails to build if libjpeg-turbo is used, because C_ARITH_CODING_SUPPORTED is defined in /usr/include/jconfig.h, and xloadimage contains a syntax error.

[ebuild   R   ] media-libs/libjpeg-turbo-1.1.0  USE="-static-libs" 0 kB
[ebuild  N    ] media-gfx/xloadimage-4.1-r10  USE="jpeg png tiff" 0 kB

moon ~ # equery belongs /usr/include/jconfig.h 
[ Searching for file(s) /usr/include/jconfig.h in *... ]
media-libs/libjpeg-turbo-1.1.0 (/usr/include/jconfig.h)

moon ~ # grep C_ARIT /usr/include/jconfig.h  
#define C_ARITH_CODING_SUPPORTED 1

snippet from /var/tmp/portage/media-gfx/xloadimage-4.1-r10/work/xloadimage.4.1/jpeg.c, after the failed build:

static void parseOptions(j_compress_ptr cinfo, char *options, int verbose)
{
  char *name, *value;

  while (getNextTypeOption(&options, &name, &value) > 0) {
    if (!strncmp("arithmetic", name, strlen(name))) {
      /* Use arithmetic coding. */
#ifdef C_ARITH_CODING_SUPPORTED
      if (verbose)
        printf("  Using arithmetic coding.\n");
      cinfo->arith_code = TRUE;
#else
      fprintf(stderr, "jpegDump: sorry, arithmetic coding not supported\n");
    }
#endif
    else if (!strncmp("grayscale", name, strlen(name)) ||
             !strncmp("greyscale", name, strlen(name)) ||
             !strncmp("monochrome", name, strlen(name))) {
      /* Force a monochrome JPEG file to be generated. */
      if (verbose)


Reproducible: Always

Steps to Reproduce:
1. emerge xloadimage
2.
3.
Actual Results:  
build fails

Expected Results:  
build should succeed
Comment 1 Laszlo Valko 2011-04-04 23:12:02 UTC
Created attachment 268529 [details]
emerge output
Comment 2 Laszlo Valko 2011-04-04 23:13:51 UTC
Created attachment 268531 [details]
emerge --info
Comment 3 Laszlo Valko 2011-04-04 23:21:34 UTC
Created attachment 268533 [details, diff]
possible fix
Comment 4 Ted Marston 2011-06-15 21:03:55 UTC
That fix works for me.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2011-08-25 20:51:36 UTC
Fixed.