Closed
Description
Hi everyone,
I was trying to build OpenEXR from this repo.
I was able to compile and install IlmBase, but when I try to make OpenEXR there are a few c++ errors, the main one being that ILMTHREAD_NAMESPACE
is not defined.
Any pointers on what's wrong? : )
I'm on Centos 7.6, using gcc 7.3.1.
Thanks!
Making all in config
make[1]: Entering directory '/home/users/vvzen/Documents/code/building-stuff/openexr/OpenEXR/config'
make all-am
make[2]: Entering directory '/home/users/vvzen/Documents/code/building-stuff/openexr/OpenEXR/config'
make[2]: Leaving directory '/home/users/vvzen/Documents/code/building-stuff/openexr/OpenEXR/config'
make[1]: Leaving directory '/home/users/vvzen/Documents/code/building-stuff/openexr/OpenEXR/config'
Making all in IlmImf
make[1]: Entering directory '/home/users/vvzen/Documents/code/building-stuff/openexr/OpenEXR/IlmImf'
g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I/usr/include/libdrm -pthread -I.. -I../config -pipe -g -O2 -std=c++14 -pthread -MT b44ExpLogTable.o -MD -MP -MF .deps/b44ExpLogTable.Tpo -c -o b44ExpLogTable.o b44ExpLogTable.cpp
mv -f .deps/b44ExpLogTable.Tpo .deps/b44ExpLogTable.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -pipe -g -O2 -std=c++14 -pthread -o b44ExpLogTable b44ExpLogTable.o -pthread -pthread -lImath -lHalf -lIex -lIexMath -lIlmThread -lpthread -pthread
libtool: link: g++ -pipe -g -O2 -std=c++14 -pthread -o b44ExpLogTable b44ExpLogTable.o -pthread -pthread -pthread -lImath -lHalf -lIex -lIexMath -lIlmThread -lpthread -pthread
./b44ExpLogTable > b44ExpLogTable.h
g++ -DHAVE_CONFIG_H -I. -I../config -pthread -I/usr/include/OpenEXR -I/usr/include/libdrm -pthread -I.. -I../config -pipe -g -O2 -std=c++14 -pthread -MT dwaLookups.o -MD -MP -MF .deps/dwaLookups.Tpo -c -o dwaLookups.o dwaLookups.cpp
In file included from ./ImfIO.h:45:0,
from dwaLookups.cpp:54:
./ImfInt64.h:49:7: error: ‘IMATH_NAMESPACE’ has not been declared
using IMATH_NAMESPACE::Int64;
^~~~~~~~~~~~~~~
./ImfInt64.h:50:7: error: ‘IMATH_NAMESPACE’ has not been declared
using IMATH_NAMESPACE::SInt64;
^~~~~~~~~~~~~~~
In file included from dwaLookups.cpp:54:0:
./ImfIO.h:117:13: error: ‘Int64’ does not name a type; did you mean ‘int64_t’?
virtual Int64 tellg () = 0;
^~~~~
int64_t
./ImfIO.h:125:25: error: ‘Int64’ has not been declared
virtual void seekg (Int64 pos) = 0;
^~~~~
./ImfIO.h:191:13: error: ‘Int64’ does not name a type; did you mean ‘int64_t’?
virtual Int64 tellp () = 0;
^~~~~
int64_t
./ImfIO.h:199:25: error: ‘Int64’ has not been declared
virtual void seekp (Int64 pos) = 0;
^~~~~
In file included from dwaLookups.cpp:55:0:
./ImfXdr.h: In function ‘void Imf_2_3::Xdr::write(T&, double)’:
./ImfXdr.h:544:12: error: ‘Int64’ does not name a type; did you mean ‘int64_t’?
union {Int64 i; double d;} u;
^~~~~
int64_t
./ImfXdr.h: In function ‘void Imf_2_3::Xdr::read(T&, double&)’:
./ImfXdr.h:831:12: error: ‘Int64’ does not name a type; did you mean ‘int64_t’?
union {Int64 i; double d;} u;
^~~~~
int64_t
./ImfXdr.h:833:13: error: ‘Int64’ was not declared in this scope
u.i = ((Int64) b[0] & 0x00000000000000ffULL) |
^~~~~
./ImfXdr.h:833:13: note: suggested alternative:
In file included from ./ImfInt64.h:44:0,
from ./ImfIO.h:45,
from dwaLookups.cpp:54:
/usr/include/OpenEXR/ImathInt64.h:53:31: note: ‘Imath::Int64’
typedef long unsigned int Int64;
^~~~~
In file included from dwaLookups.cpp:55:0:
./ImfXdr.h:833:20: error: expected ‘)’ before ‘b’
u.i = ((Int64) b[0] & 0x00000000000000ffULL) |
^
dwaLookups.cpp: At global scope:
dwaLookups.cpp:65:35: error: ‘ILMTHREAD_NAMESPACE’ has not been declared
class Runner : public ILMTHREAD_NAMESPACE::Thread
^~~~~~~~~~~~~~~~~~~
dwaLookups.cpp:65:56: error: expected ‘{’ before ‘Thread’
class Runner : public ILMTHREAD_NAMESPACE::Thread
^~~~~~
dwaLookups.cpp:67:17: error: expected primary-expression before ‘public’
public:
^~~~~~
dwaLookups.cpp:67:17: error: expected ‘}’ before ‘public’
dwaLookups.cpp:67:17: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘int’ in initialization
dwaLookups.cpp:67:17: error: expected ‘;’ before ‘public’
dwaLookups.cpp: In function ‘int cpuCount()’:
dwaLookups.cpp:439:10: error: ‘ILMTHREAD_NAMESPACE’ has not been declared
if (!ILMTHREAD_NAMESPACE::supportsThreads()) return 1;
^~~~~~~~~~~~~~~~~~~
dwaLookups.cpp: In function ‘void generateLutHeader()’:
dwaLookups.cpp:495:9: error: ‘ILMTHREAD_NAMESPACE’ has not been declared
if (ILMTHREAD_NAMESPACE::supportsThreads()) {
^~~~~~~~~~~~~~~~~~~
dwaLookups.cpp:498:79: error: invalid use of incomplete type ‘class {anonymous}::LutHeaderWorker::Runner’
runners.push_back( new LutHeaderWorker::Runner(*workers[i], (i==0)) );
^
dwaLookups.cpp:65:19: note: forward declaration of ‘class {anonymous}::LutHeaderWorker::Runner’
class Runner : public ILMTHREAD_NAMESPACE::Thread
^~~~~~
dwaLookups.cpp:502:29: warning: possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
delete runners[i];
^
dwaLookups.cpp:502:29: warning: invalid use of incomplete type ‘class {anonymous}::LutHeaderWorker::Runner’
dwaLookups.cpp:65:19: note: forward declaration of ‘class {anonymous}::LutHeaderWorker::Runner’
class Runner : public ILMTHREAD_NAMESPACE::Thread
^~~~~~
dwaLookups.cpp:502:29: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
delete runners[i];
^
make[1]: *** [Makefile:785: dwaLookups.o] Error 1
make[1]: Leaving directory '/home/users/vvzen/Documents/code/building-stuff/openexr/OpenEXR/IlmImf'
make: *** [Makefile:491: all-recursive] Error 1