Bug 165916 - OpenEXR fails to build with gcc 4.0.1, works with 4.0.0
OpenEXR fails to build with gcc 4.0.1, works with 4.0.0
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks: 165729
  Show dependency treegraph
 
Reported: 2005-08-14 07:12 EDT by Ignacio Vazquez-Abrams
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-14 15:36:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ignacio Vazquez-Abrams 2005-08-14 07:12:46 EDT
OpenEXR in Fedora Extras builds fine with gcc-c++-4.0.0-8, but fails to build
with 4.0.1-4 as follows:

if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"OpenEXR\"
-DVERSION=\"1.2.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRERROR=1
-DHAVE_IOS_BASE=1 -DHAVE_COMPLETE_IOMANIP=1 -DHAVE_STL_LIMITS=1  -I. -I. -I..
-I../Iex -I../Half -I../Imath -I../IlmImf   -pipe  -O2 -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4
-fasynchronous-unwind-tables -MT Image.o -MD -MP -MF ".deps/Image.Tpo" \
  -c -o Image.o `test -f 'Image.cpp' || echo './'`Image.cpp; \
then mv -f ".deps/Image.Tpo" ".deps/Image.Po"; \
else rm -f ".deps/Image.Tpo"; exit 1; \
fi
./Image.h:59: error: expected `)' before '&' token
./Image.h:64: error: ISO C++ forbids declaration of 'Image' with no type
./Image.h:64: error: expected ';' before '&' token
./Image.h:65: error: expected `;' before 'const'
./Image.h:65: error: ISO C++ forbids declaration of 'Image' with no type
./Image.h:65: error: expected ';' before '&' token
./Image.h:67: error: expected `;' before 'private'
./Image.h:71: error: ISO C++ forbids declaration of 'Image' with no type
./Image.h:71: error: expected ';' before '&' token
./Image.h:80: error: expected `)' before '&' token
./Image.h:143: error: no 'TypedImageChannel<T>::TypedImageChannel(Image&, int,
int)' member function declared in class 'TypedImageChannel<T>'
./Image.h:143: error: template definition of non-template
'TypedImageChannel<T>::TypedImageChannel(Image&, int, int)'
./Image.h: In member function 'virtual Imf::Slice TypedImageChannel<T>::slice()
const':
./Image.h:186: error: there are no arguments to 'image' that depend on a
template parameter, so a declaration of 'image' must be available
./Image.h:186: error: (if you use '-fpermissive', G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
Image.cpp: At global scope:
Image.cpp:49: error: prototype for 'ImageChannel::ImageChannel(Image&)' does not
match any in class 'ImageChannel'
./Image.h:54: error: candidates are: ImageChannel::ImageChannel(const ImageChannel&)
./Image.h:54: error:                 ImageChannel::ImageChannel()
Image.cpp: In constructor 'ImageChannel::ImageChannel(Image&)':
Image.cpp:49: error: class 'ImageChannel' does not have any field named
'_image'Image.cpp: In member function 'void Image::addChannel(const
std::string&, Imf::PixelType)':
Image.cpp:96: error: no matching function for call to
'TypedImageChannel<half>::TypedImageChannel(Image&, int, int)'
./Image.h:77: note: candidates are:
TypedImageChannel<half>::TypedImageChannel()./Image.h:77: note:                
TypedImageChannel<half>::TypedImageChannel(const TypedImageChannel<half>&)
Image.cpp:100: error: no matching function for call to
'TypedImageChannel<float>::TypedImageChannel(Image&, int, int)'
./Image.h:77: note: candidates are: TypedImageChannel<float>::TypedImageChannel()
./Image.h:77: note:                
TypedImageChannel<float>::TypedImageChannel(const TypedImageChannel<float>&)
Image.cpp:104: error: no matching function for call to
'TypedImageChannel<unsigned int>::TypedImageChannel(Image&, int, int)'
./Image.h:77: note: candidates are: TypedImageChannel<unsigned
int>::TypedImageChannel()
./Image.h:77: note:                 TypedImageChannel<unsigned
int>::TypedImageChannel(const TypedImageChannel<unsigned int>&)
make[2]: *** [Image.o] Error 1
make[2]: Leaving directory
`/home/ignacio/work/fedora/extras/out/OpenEXR-1.2.2/exrmaketiled'
Comment 1 Jakub Jelinek 2005-08-14 11:49:06 EDT
You haven't provided preprocessed source, so I can only guess.
But the most likely explanation would be http://gcc.gnu.org/PR1016
If so, it would be OpenEXR bug, not GCC.
Look if the class name around Image.h:59 appears first as
friend class Something;
without also a forward class declaration (like:
class Something;
).
If you provide preprocessed source and attach here (use -save-temps g++ option),
then I can check this out as well.
Comment 2 Ignacio Vazquez-Abrams 2005-08-14 15:05:49 EDT
It doesn't look like a namespace issue in the source, and unfortunately
-save-temps seems to only generate a .s file, not a .i file.
Comment 3 Jakub Jelinek 2005-08-14 15:25:30 EDT
-save-temps should generate an .ii file in this case.
Note code (correctly) rejected after PR1016 doesn't necessarily involve extra
namespaces.
Say:
class foo
{
  friend class bar;
public:
  foo (bar *);
};
class bar
{
public:
  bar ();
};
used to be (incorrectly) accepted by earlier GCC versions, now you must add
class bar;
Comment 4 Ignacio Vazquez-Abrams 2005-08-14 15:36:54 EDT
Aha, that allowed it to be built. I will submit a patch upstream then. But no
.ii files were generated at any time.

Note You need to log in before you can comment on or make changes to this bug.