Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201696 - media-libs/jpeg - jconfig.h defines HAVE_STDLIB_H and HAVE_STDDEF_H
Summary: media-libs/jpeg - jconfig.h defines HAVE_STDLIB_H and HAVE_STDDEF_H
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-08 16:33 UTC by Ryan Hill (RETIRED)
Modified: 2011-04-23 11:05 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2007-12-08 16:33:38 UTC
/usr/include/jconfig.h contains two internal macros that aren't part of the ABI/API and shouldn't be exposed in public headers.  HAVE_STDLIB_H and HAVE_STDDEF_H are common autoconf defines used in the configuring of libjpeg.  The result of having them exposed in jconfig.h is that any package including jpeglib.h (which includes jconfig.h) and defining HAVE_STDLIB_H or HAVE_STDDEF_H through autoconf will get a warning like:

In file included from FlateStream.h:11,
                 from Stream.cc:41:
../config.h:66:1: warning: "HAVE_STDLIB_H" redefined
In file included from /usr/include/jpeglib.h:28,
                 from DCTStream.h:39,
                 from Stream.cc:37:
/usr/include/jconfig.h:12:1: warning: this is the location of the previous definition


In GCC 4.3, this becomes an error, preventing several packages from building.

The fix for this is to remove the two defines from jconfig.h.  Debian has been doing this since 2002, and the LSB also published an errata for their specification last year to removes them.

http://packages.debian.org/changelogs/pool/main/libj/libjpeg6b/libjpeg6b_6b-13/changelog#year2002
http://bugs.linuxbase.org/attachment.cgi?id=281
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2008-01-17 18:35:28 UTC
Current GCC svn reverts the change that made redefinitions errors.  See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24924.  Any checkout after -r131530 (14 Jan 2008) will work.

So I guess we could close this, though we might hit it again in the future.  I never did figure out why this case causes problems when others with near-identical circumstances (like mpeg4ip) don't.  Dumb luck i guess.
Comment 2 SpanKY gentoo-dev 2008-01-18 10:56:13 UTC
you're right it's a bug regardless of how gcc treats it ... the header sucks

most likely i'm not going to fix this in Gentoo ... i submitted a project request to freedesktop.org to get a jpeg maintainer project going there, so i'm holding off on doing major build-system fixes until then

at which point i'd release a new tarball rather than a huge fugly patch
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2008-05-07 01:22:28 UTC
This doesn't block gcc-4.3 anymore.  It works fine.
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2011-04-23 11:05:16 UTC
Closing.