X2Go Bug report logs - #579
nx-libs, Jpeg.cpp compilation error with jpeg-9a, with suggested patch

version graph

Package: nx-libs; Maintainer for nx-libs is X2Go Developers <x2go-dev@lists.x2go.org>;

Reported by: Gabriel Marcano <gabemarcano@yahoo.com>

Date: Wed, 20 Aug 2014 03:30:02 UTC

Severity: normal

Tags: patch

Found in version HEAD

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 20 Aug 2014 03:26:06 +0000
From gabemarcano@yahoo.com  Wed Aug 20 05:26:04 2014
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_DKIM_INVALID autolearn=ham version=3.3.2
Received: from nm13-vm5.bullet.mail.ne1.yahoo.com (nm13-vm5.bullet.mail.ne1.yahoo.com [98.138.91.235])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id B1CEA5DB11
	for <submit@bugs.x2go.org>; Wed, 20 Aug 2014 05:26:03 +0200 (CEST)
Received: from [98.138.100.115] by nm13.bullet.mail.ne1.yahoo.com with NNFMP; 20 Aug 2014 03:26:01 -0000
Received: from [98.138.89.199] by tm106.bullet.mail.ne1.yahoo.com with NNFMP; 20 Aug 2014 03:26:01 -0000
Received: from [127.0.0.1] by omp1057.mail.ne1.yahoo.com with NNFMP; 20 Aug 2014 03:26:01 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 930882.80504.bm@omp1057.mail.ne1.yahoo.com
Received: (qmail 33761 invoked by uid 60001); 20 Aug 2014 03:26:01 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1408505161; bh=YC1mYz0vTc14E3WsSbkdhKiQezRQAif99m+dahgm4ZQ=; h=References:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=ZUUVEOE+v971zBPSZOgCBGJ/vDId4KWnTUuqfW3hWla7g6wqPnzdcPHgaPvQh4St4AeFpZChGy19iDTpXVfFmIiIe7pvYRRDogFuStOgvuw8xCs8bFUoDLJz6jRtjj24dcQRWtxpMEuNIg4ghNHPQfklp3J7Tstitg/F80DIXwo=
X-YMail-OSG: LCKKMfgVM1k6Zy6v70eoGirprsKiUbGXvg0mEXpLhUW3HRg
 PVkBFwBqpi6VYHGYi8BsnFAL3c3yMHwCkvSq0fW_kX0RmvjeZhekK.Kt5NjM
 sxifzo3IMecH724dJs_2UFrrvkBZTmoNEZvZmQSOZYV09zwOsLVLWIji05Zb
 3sw8vja3DbXNt8NgCGl9ie0q1gek0gOhB01XxA5ebabSpIs48yY5Z9RypAC_
 dWqWaBHmotdwaw6KKRbgLffp.tjvOcGcVF04BQZa6SvQHCMQQRwzD0ulm4um
 cyDMf7EfQMrUou40hTuFbV3tbPFy1_GzM6XQnJ1a7WbdfUDzsuyrgURdK1PV
 6Y7Ks1nkredFDO10smbisRcdaZsciut9RiPGZRxtz2FFjyx3Tjdd05nW_tn8
 3lOJjX1zQq512TrzDxbZcNav0t7n3g0B_Drltwf.L8nbkEkEIKeWy66pBqTS
 YpEaRjxQuyA0Ik8lrPzMGNu2wcUzBY2wvyO9oK8AhHr0Jduo7BUmVWgVFo1e
 JD2B5Gu0Ac_kzvaC3wgJ.89tg7iLTEkvEAmB.dHmkeERbPUjFfWtS4IxpuId
 8pT6zexY1tlcZQm9hWX9cZDyd9Spp0G31k3F4eZ08GPDfCLVkTG7waKozdDJ
 ZeU3ZDHojm32YYA5jwRla96eWCEiBtJ61W0ikxFU2ps4n0tb7WMJX_KI-
Received: from [68.187.217.134] by web125206.mail.ne1.yahoo.com via HTTP; Tue, 19 Aug 2014 20:26:01 PDT
X-Rocket-MIMEInfo: 002.001,UGFja2FnZTogbngtbGlicwpWZXJzaW9uOiBIRUFEClRhZ3M6IFBhdGNoCgpGb3VuZCB0aGlzIHByb2JsZW0gd2hpbGUgYnJvd3Npbmc6CgrCoMKgwqAgaHR0cHM6Ly9idWdzLmdlbnRvby5vcmcvc2hvd19idWcuY2dpP2lkPTQ4MTM2MAoKCkNvbXBpbGluZyBueC1saWJzIGFnYWluc3QganBlZy05YSBsZWFkcyB0byBhIGNvbXBpbGF0aW9uIGVycm9yLiBTcGVjaWZpY2FsbHk6CgrCoMKgwqAgZysrIC1jIC1PMyAtZm5vLXJ0dGkgLWZuby1leGNlcHRpb25zIC1JLi4vbngtWDExL2V4cG9ydHMvaW5jbHVkZQrCoAEwAQEBAQ--
X-Mailer: YahooMailWebService/0.8.201.700
References: 
Message-ID: <1408505140.1532.YahooMailNeo@web125206.mail.ne1.yahoo.com>
Date: Tue, 19 Aug 2014 20:25:40 -0700
From: Gabriel Marcano <gabemarcano@yahoo.com>
Reply-To: Gabriel Marcano <gabemarcano@yahoo.com>
Subject: nx-libs, Jpeg.cpp compilation error with jpeg-9a, with suggested patch
To: "submit@bugs.x2go.org" <submit@bugs.x2go.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="-2097669038-308448619-1408505161=:1532"
[Message part 1 (text/plain, inline)]
Package: nx-libs
Version: HEAD
Tags: Patch

Found this problem while browsing:

    https://bugs.gentoo.org/show_bug.cgi?id=481360


Compiling nx-libs against jpeg-9a leads to a compilation error. Specifically:

    g++ -c -O3 -fno-rtti -fno-exceptions -I../nx-X11/exports/include
        -Wmissing-declarations -fPIC -DIN_ADDR_T=in_addr_t -DVERSION=\"3.5.0\"
        -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
        -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -Wall
        -Wpointer-arith   Jpeg.cpp
    Jpeg.cpp: In function ‘int DecompressJpeg16(unsigned char*, int,
        unsigned int, unsigned int, unsigned char*, int)’:
    Jpeg.cpp:443:29: error: invalid conversion from ‘int’ to ‘boolean’
        [-fpermissive]
    jpeg_read_header(&cinfo, 1);
                                ^
    In file included from Jpeg.cpp:29:0:
    /usr/include/jpeglib.h:1039:13: note: initializing argument 2 of ‘int
        jpeg_read_header(j_decompress_ptr, boolean)’
    EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
                ^
    Jpeg.cpp: In function ‘int DecompressJpeg24(unsigned char*, int,
        unsigned int, unsigned int, unsigned char*, int)’:
    Jpeg.cpp:584:29: error: invalid conversion from ‘int’ to ‘boolean’
        [-fpermissive]
    jpeg_read_header(&cinfo, 1);
                                ^
    In file included from Jpeg.cpp:29:0:
    /usr/include/jpeglib.h:1039:13: note: initializing argument 2 of ‘int
        jpeg_read_header(j_decompress_ptr, boolean)’
    EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
                ^
    Jpeg.cpp: In function ‘int DecompressJpeg32(unsigned char*, int, unsigned
        int, unsigned int, unsigned char*, int)’:
    Jpeg.cpp:721:29: error: invalid conversion from ‘int’ to ‘boolean’
        [-fpermissive]
    jpeg_read_header(&cinfo, 1);
                                ^
    In file included from Jpeg.cpp:29:0:
    /usr/include/jpeglib.h:1039:13: note: initializing argument 2 of ‘int
        jpeg_read_header(j_decompress_ptr, boolean)’
    EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
                ^
    Jpeg.cpp: In function ‘boolean JpegFillInputBuffer(j_decompress_ptr)’:
    Jpeg.cpp:836:10: error: invalid conversion from ‘int’ to ‘boolean’
        [-fpermissive]
    return 1;
            ^
    Makefile:82: recipe for target 'Jpeg.o' failed
    make: *** [Jpeg.o] Error 1

I am attaching a patch to address the problem. Specifically, it appears that
jpeg-9a changed the definition for its "boolean" type from an int to some other
 type (bool in C++, it seems). Using TRUE and FALSE, as provided by the jpeg
library, is what was done to address the problem. After applying the patch
to HEAD (commit 0e3b414ea6ecb6cc359d3b95f5cfeb6096066139), Jpeg.cpp compiles
fine.


Configuration:

Compiling against jpeg-9a.

$ gcc -v
    Using built-in specs.
    COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0/gcc
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/lto-wrapper
    Target: x86_64-pc-linux-gnu
    Configured with: /var/tmp/portage/sys-devel/gcc-4.9.0/work/gcc-4.9.0/configure
    --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
    --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.0
    --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/include
    --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.0
    --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.0/man
    --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.0/info
    --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/include/g++-v4
    --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.9.0/python
    --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
    --disable-werror --with-system-zlib --enable-nls --without-included-gettext
    --enable-checking=release --with-bugurl=https://bugs.gentoo.org/
    --with-pkgversion='Gentoo 4.9.0 p1.0, pie-0.6.0' --enable-libstdcxx-time
    --enable-shared --enable-threads=posix --enable-__cxa_atexit
    --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64
    --disable-altivec --disable-fixed-point --enable-targets=all
    --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp
    --enable-lto --without-cloog
    Thread model: posix
    gcc version 4.9.0 (Gentoo 4.9.0 p1.0, pie-0.6.0)

$ autoreconf --version
    autoreconf (GNU Autoconf) 2.69


Steps to reproduce:

1. "git clone git://code.x2go.org/nx-libs.git" repository.
2. Change to the "nxcomp" directory.
3. Run "autoreconf" and then do "make Jpeg.o".

Expected outcome:
Successful compilation.

Actual outcome:
Compilation failure, see earlier in the report for the error messages.
[nxlibs-jpeg9a.patch (text/x-patch, attachment)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Nov 21 14:54:16 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.