YuGiOhJCJ Mailing-List
2016-03-15 08:29:50 UTC
Hello,
I try to build openexr-2.2.0:
$ make
[...]
make[1]: Entering directory `/tmp/build/openexr-2.2.0/IlmImfUtil'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I.. -I../IlmImf -I../config -pipe -g -O2 -MT ImfImageChannel.lo -MD -MP -MF .deps/ImfImageChannel.Tpo -c -o ImfImageChannel.lo ImfImageChannel.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I.. -I../IlmImf -I../config -pipe -g -O2 -MT ImfImageChannel.lo -MD -MP -MF .deps/ImfImageChannel.Tpo -c ImfImageChannel.cpp -fPIC -DPIC -o .libs/ImfImageChannel.o
In file included from ImfImageChannel.cpp:41:0:
ImfImageChannel.h:54:1: error: ‘OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER’ does not name a type
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
^
ImfImageChannel.h:76:13: error: ‘PixelType’ does not name a type
virtual PixelType pixelType () const = 0;
^
ImfImageChannel.h:82:5: error: ‘Channel’ does not name a type
Channel channel () const;
^
ImfImageChannel.h:133:1: error: ‘OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT’ does not name a type
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
^
In file included from ../IlmImf/ImfNamespace.h:78:0,
from ./ImfImageChannelRenaming.h:45,
from ImfImageLevel.h:48,
from ImfImageChannel.cpp:42:
../config/OpenEXRConfig.h:49:40: error: ‘Imf_2_2’ is not a namespace-name
#define OPENEXR_IMF_INTERNAL_NAMESPACE Imf_2_2
^
../IlmImf/ImfNamespace.h:99:22: note: in expansion of macro ‘OPENEXR_IMF_INTERNAL_NAMESPACE’
using namespace OPENEXR_IMF_INTERNAL_NAMESPACE;
^
In file included from ./ImfImageChannelRenaming.h:45:0,
from ImfImageLevel.h:48,
from ImfImageChannel.cpp:42:
../IlmImf/ImfNamespace.h:99:52: error: expected namespace-name before ‘;’ token
using namespace OPENEXR_IMF_INTERNAL_NAMESPACE;
^
In file included from ImfImageChannel.cpp:42:0:
ImfImageLevel.h:95:36: error: ‘PixelType’ has not been declared
PixelType type,
^
ImfImageChannel.cpp:56:18: error: definition of ‘ImageChannel::ImageChannel(ImageLevel&, int, int, bool)’ is not in namespace enclosing ‘ImageChannel’ [-fpermissive]
bool pLinear)
^
ImfImageChannel.cpp:70:30: error: definition of ‘ImageChannel::~ImageChannel()’ is not in namespace enclosing ‘ImageChannel’ [-fpermissive]
ImageChannel::~ImageChannel ()
^
ImfImageChannel.cpp:76:1: error: ‘Channel’ does not name a type
Channel
^
ImfImageChannel.cpp:84:23: error: definition of ‘void ImageChannel::resize()’ is not in namespace enclosing ‘ImageChannel’ [-fpermissive]
ImageChannel::resize ()
^
ImfImageChannel.cpp: In member function ‘virtual void ImageChannel::resize()’:
ImfImageChannel.cpp:86:38: error: invalid use of incomplete type ‘class ImageLevel’
const Box2i& dataWindow = level().dataWindow();
^
In file included from ImfImageChannel.cpp:41:0:
ImfImageChannel.h:66:7: note: forward declaration of ‘class ImageLevel’
class ImageLevel;
^
ImfImageChannel.cpp: At global scope:
ImfImageChannel.cpp:112:42: error: definition of ‘void ImageChannel::boundsCheck(int, int) const’ is not in namespace enclosing ‘ImageChannel’ [-fpermissive]
ImageChannel::boundsCheck (int x, int y) const
^
ImfImageChannel.cpp: In member function ‘void ImageChannel::boundsCheck(int, int) const’:
ImfImageChannel.cpp:114:38: error: invalid use of incomplete type ‘const class ImageLevel’
const Box2i &dataWindow = level().dataWindow();
^
In file included from ImfImageChannel.cpp:41:0:
ImfImageChannel.h:66:7: note: forward declaration of ‘class ImageLevel’
class ImageLevel;
^
make[1]: *** [ImfImageChannel.lo] Error 1
make[1]: Leaving directory `/tmp/build/openexr-2.2.0/IlmImfUtil'
make: *** [all-recursive] Error 1
As I have an error, I patch the code:
diff -ruN openexr-2.2.0.ori/IlmImfUtil/ImfImageChannel.h openexr-2.2.0/IlmImfUtil/ImfImageChannel.h
--- openexr-2.2.0.ori/IlmImfUtil/ImfImageChannel.h 2016-03-15 09:09:20.900265632 +0100
+++ openexr-2.2.0/IlmImfUtil/ImfImageChannel.h 2016-03-15 09:10:25.077263507 +0100
@@ -50,6 +50,8 @@
#include <ImathBox.h>
#include <half.h>
#include "ImfExport.h"
+#include "ImfNamespace.h" // for OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
+#include "ImfPixelType.h" // for PixelType
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Then I recompile:
$ make
[...]
make[1]: Entering directory `/tmp/build/openexr-2.2.0/IlmImfUtil'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I.. -I../IlmImf -I../config -pipe -g -O2 -MT ImfImageChannel.lo -MD -MP -MF .deps/ImfImageChannel.Tpo -c -o ImfImageChannel.lo ImfImageChannel.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I.. -I../IlmImf -I../config -pipe -g -O2 -MT ImfImageChannel.lo -MD -MP -MF .deps/ImfImageChannel.Tpo -c ImfImageChannel.cpp -fPIC -DPIC -o .libs/ImfImageChannel.o
In file included from ImfImageChannel.cpp:41:0:
ImfImageChannel.h:78:13: error: ‘PixelType’ does not name a type
virtual PixelType pixelType () const = 0;
^
ImfImageChannel.h:84:5: error: ‘Channel’ does not name a type
Channel channel () const;
^
In file included from ImfImageChannel.cpp:42:0:
ImfImageLevel.h:95:36: error: ‘PixelType’ has not been declared
PixelType type,
^
ImfImageChannel.cpp:76:1: error: ‘Channel’ does not name a type
Channel
^
make[1]: *** [ImfImageChannel.lo] Error 1
make[1]: Leaving directory `/tmp/build/openexr-2.2.0/IlmImfUtil'
make: *** [all-recursive] Error 1
So, unfortunately this patch does not correct all the errors.
Do you know why PixelType does not name a type whereas I have included the ImfPixelType.h header?
Thank you.
Best regards.
I try to build openexr-2.2.0:
$ make
[...]
make[1]: Entering directory `/tmp/build/openexr-2.2.0/IlmImfUtil'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I.. -I../IlmImf -I../config -pipe -g -O2 -MT ImfImageChannel.lo -MD -MP -MF .deps/ImfImageChannel.Tpo -c -o ImfImageChannel.lo ImfImageChannel.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I.. -I../IlmImf -I../config -pipe -g -O2 -MT ImfImageChannel.lo -MD -MP -MF .deps/ImfImageChannel.Tpo -c ImfImageChannel.cpp -fPIC -DPIC -o .libs/ImfImageChannel.o
In file included from ImfImageChannel.cpp:41:0:
ImfImageChannel.h:54:1: error: ‘OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER’ does not name a type
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
^
ImfImageChannel.h:76:13: error: ‘PixelType’ does not name a type
virtual PixelType pixelType () const = 0;
^
ImfImageChannel.h:82:5: error: ‘Channel’ does not name a type
Channel channel () const;
^
ImfImageChannel.h:133:1: error: ‘OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT’ does not name a type
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
^
In file included from ../IlmImf/ImfNamespace.h:78:0,
from ./ImfImageChannelRenaming.h:45,
from ImfImageLevel.h:48,
from ImfImageChannel.cpp:42:
../config/OpenEXRConfig.h:49:40: error: ‘Imf_2_2’ is not a namespace-name
#define OPENEXR_IMF_INTERNAL_NAMESPACE Imf_2_2
^
../IlmImf/ImfNamespace.h:99:22: note: in expansion of macro ‘OPENEXR_IMF_INTERNAL_NAMESPACE’
using namespace OPENEXR_IMF_INTERNAL_NAMESPACE;
^
In file included from ./ImfImageChannelRenaming.h:45:0,
from ImfImageLevel.h:48,
from ImfImageChannel.cpp:42:
../IlmImf/ImfNamespace.h:99:52: error: expected namespace-name before ‘;’ token
using namespace OPENEXR_IMF_INTERNAL_NAMESPACE;
^
In file included from ImfImageChannel.cpp:42:0:
ImfImageLevel.h:95:36: error: ‘PixelType’ has not been declared
PixelType type,
^
ImfImageChannel.cpp:56:18: error: definition of ‘ImageChannel::ImageChannel(ImageLevel&, int, int, bool)’ is not in namespace enclosing ‘ImageChannel’ [-fpermissive]
bool pLinear)
^
ImfImageChannel.cpp:70:30: error: definition of ‘ImageChannel::~ImageChannel()’ is not in namespace enclosing ‘ImageChannel’ [-fpermissive]
ImageChannel::~ImageChannel ()
^
ImfImageChannel.cpp:76:1: error: ‘Channel’ does not name a type
Channel
^
ImfImageChannel.cpp:84:23: error: definition of ‘void ImageChannel::resize()’ is not in namespace enclosing ‘ImageChannel’ [-fpermissive]
ImageChannel::resize ()
^
ImfImageChannel.cpp: In member function ‘virtual void ImageChannel::resize()’:
ImfImageChannel.cpp:86:38: error: invalid use of incomplete type ‘class ImageLevel’
const Box2i& dataWindow = level().dataWindow();
^
In file included from ImfImageChannel.cpp:41:0:
ImfImageChannel.h:66:7: note: forward declaration of ‘class ImageLevel’
class ImageLevel;
^
ImfImageChannel.cpp: At global scope:
ImfImageChannel.cpp:112:42: error: definition of ‘void ImageChannel::boundsCheck(int, int) const’ is not in namespace enclosing ‘ImageChannel’ [-fpermissive]
ImageChannel::boundsCheck (int x, int y) const
^
ImfImageChannel.cpp: In member function ‘void ImageChannel::boundsCheck(int, int) const’:
ImfImageChannel.cpp:114:38: error: invalid use of incomplete type ‘const class ImageLevel’
const Box2i &dataWindow = level().dataWindow();
^
In file included from ImfImageChannel.cpp:41:0:
ImfImageChannel.h:66:7: note: forward declaration of ‘class ImageLevel’
class ImageLevel;
^
make[1]: *** [ImfImageChannel.lo] Error 1
make[1]: Leaving directory `/tmp/build/openexr-2.2.0/IlmImfUtil'
make: *** [all-recursive] Error 1
As I have an error, I patch the code:
diff -ruN openexr-2.2.0.ori/IlmImfUtil/ImfImageChannel.h openexr-2.2.0/IlmImfUtil/ImfImageChannel.h
--- openexr-2.2.0.ori/IlmImfUtil/ImfImageChannel.h 2016-03-15 09:09:20.900265632 +0100
+++ openexr-2.2.0/IlmImfUtil/ImfImageChannel.h 2016-03-15 09:10:25.077263507 +0100
@@ -50,6 +50,8 @@
#include <ImathBox.h>
#include <half.h>
#include "ImfExport.h"
+#include "ImfNamespace.h" // for OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
+#include "ImfPixelType.h" // for PixelType
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Then I recompile:
$ make
[...]
make[1]: Entering directory `/tmp/build/openexr-2.2.0/IlmImfUtil'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I.. -I../IlmImf -I../config -pipe -g -O2 -MT ImfImageChannel.lo -MD -MP -MF .deps/ImfImageChannel.Tpo -c -o ImfImageChannel.lo ImfImageChannel.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I.. -I../IlmImf -I../config -pipe -g -O2 -MT ImfImageChannel.lo -MD -MP -MF .deps/ImfImageChannel.Tpo -c ImfImageChannel.cpp -fPIC -DPIC -o .libs/ImfImageChannel.o
In file included from ImfImageChannel.cpp:41:0:
ImfImageChannel.h:78:13: error: ‘PixelType’ does not name a type
virtual PixelType pixelType () const = 0;
^
ImfImageChannel.h:84:5: error: ‘Channel’ does not name a type
Channel channel () const;
^
In file included from ImfImageChannel.cpp:42:0:
ImfImageLevel.h:95:36: error: ‘PixelType’ has not been declared
PixelType type,
^
ImfImageChannel.cpp:76:1: error: ‘Channel’ does not name a type
Channel
^
make[1]: *** [ImfImageChannel.lo] Error 1
make[1]: Leaving directory `/tmp/build/openexr-2.2.0/IlmImfUtil'
make: *** [all-recursive] Error 1
So, unfortunately this patch does not correct all the errors.
Do you know why PixelType does not name a type whereas I have included the ImfPixelType.h header?
Thank you.
Best regards.