Description of problem: The libjpeg header (jpeglib.h) includes jconfig.h which defines HAVE_STDINT_H. This causes redefinition errors in kdelibs3, and potentially other packages too, with GCC 4.3. (In the kdelibs3 case, there is a workaround (an #undef before including jpeglib.h) already in the source code, but the workaround doesn't work with --enable-final (it needs a second #undef _after_ including it), and this issue is best fixed in libjpeg anyway.) Version-Release number of selected component (if applicable): libjpeg-6b-39.fc8 How reproducible: Always Steps to Reproduce: 1. Try building kdelibs3 in Rawhide with GCC 4.3. Actual results: In file included from arena.cpp:45, from libkhtmlmisc_la.all_cpp.cpp:8: ../../config.h:477:1: error: "HAVE_STDLIB_H" redefined In file included from /usr/include/jpeglib.h:28, from loader_jpeg.cpp:44, from libkhtmlmisc_la.all_cpp.cpp:4: /usr/include/jconfig.h:12:1: error: this is the location of the previous definition Expected results: No error
Sorry, it's actually HAVE_STDLIB_H (and HAVE_STDDEF_H, though that doesn't cause an issue with KDE) which is being defined, not HAVE_STDINT_H.
Every autoconf-based package in the world is likely to define that symbol. I think you probably need to have a word with the gcc people about whether this warning is well-advised.
* They aren't supposed to define those symbols in the public headers though. * This is not a warning, this is an error in GCC 4.3, so this issue _must_ be fixed before GCC 4.3 hits Rawhide. (If you refuse to fix it in libjpeg, I'll have to work around it in kdelibs3.) * The error only triggers if they are defined differently, in this case the problem is that libjpeg #defines it to nothing and kdelibs3 to 1. But please don't change libjpeg to #define it to 1, as this may break other packages which currently work.
Well, the alternatives I'm prepared to offer you are to do nothing or to #define it as 1. I'm not going to make large rearrangements in what libjpeg's headers export, because that seems even *more* likely to break random clients, and because it's been generally fine as-is for more than ten years now. However, given that autoconf prefers to #define these symbols as 1 rather than empty, I can see the value of changing things that much. It seems implausible that such a change would break anything --- do you have any specific cases in mind that would be likely to fail?
Any existing programs #defining it to nothing will break, I'm not sure there are any though. I guess you can give it a try and see what breaks.
On looking into it, the main problem is that libjpeg is still using a configure script from autoconf 2.12... Obviously the real solution is to drop in a more modern script, but it might take a few days to shake that out. How soon do you need a fix? I could push in a really grotty patch of a few lines in the existing script, if you need it right away, but that's not where I want to be in the long run.
It's not that urgent, Rawhide is still using GCC 4.1 right now, where this was just a warning, I don't know when exactly the switch to 4.3 will happen.
Done in libjpeg-6b-40, please give it a try.
I have experienced this problem also while testing gcc 4.3.0 and cinelerra With libjpeg-6b-40 the error is gone... Thx for have it fixed (and for the reporter).