Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building error of GLEWContextStruct in arch linux #141

Open
crekIron opened this issue Apr 13, 2021 · 3 comments
Open

Building error of GLEWContextStruct in arch linux #141

crekIron opened this issue Apr 13, 2021 · 3 comments

Comments

@crekIron
Copy link

I properly followed the documentation for building mitsuba. I am currently getting an error below.

In file included from include/mitsuba/mitsuba.h:52,
                 from src/libhw/glrenderer.cpp:19:
src/libhw/glrenderer.cpp: In member function ‘virtual void mitsuba::GLRenderer::init(mitsuba::Device*, mitsuba::Renderer*)’:
src/libhw/glrenderer.cpp:148:39: warning: ‘?:’ using integer constants in boolean context [-Wint-in-bool-context]
  148 |         Log((m_warnLogLevel == EWarn) ? EInfo : m_warnLogLevel,
include/mitsuba/core/logger.h:40:31: note: in definition of macro ‘Log’
   40 |         if (logger != NULL && level >= logger->getLogLevel()) \
      |                               ^~~~~
src/libhw/glrenderer.cpp:197:39: warning: ‘?:’ using integer constants in boolean context [-Wint-in-bool-context]
  197 |         Log((m_warnLogLevel == EWarn) ? EInfo : m_warnLogLevel,
include/mitsuba/core/logger.h:40:31: note: in definition of macro ‘Log’
   40 |         if (logger != NULL && level >= logger->getLogLevel()) \
      |                               ^~~~~
In file included from include/mitsuba/mitsuba.h:51,
                 from src/libhw/glrenderer.cpp:19:
include/mitsuba/core/tls.h: In instantiation of ‘static void* mitsuba::PrimitiveThreadLocal<ValueType>::construct() [with ValueType = GLEWContextStruct]’:
include/mitsuba/core/tls.h:118:60:   required from ‘mitsuba::PrimitiveThreadLocal<ValueType>::PrimitiveThreadLocal() [with ValueType = GLEWContextStruct]’
src/libhw/glrenderer.cpp:33:57:   required from here
include/mitsuba/core/tls.h:140:16: error: invalid use of incomplete type ‘struct GLEWContextStruct’
  140 |         return new ValueType();
      |                ^~~~~~~~~~~~~~~
In file included from src/libhw/glrenderer.cpp:25:
include/mitsuba/hw/glrenderer.h:25:8: note: forward declaration of ‘struct GLEWContextStruct’
   25 | struct GLEWContextStruct;
      |        ^~~~~~~~~~~~~~~~~
In file included from include/mitsuba/mitsuba.h:51,
                 from src/libhw/glrenderer.cpp:19:
include/mitsuba/core/tls.h: In instantiation of ‘static void mitsuba::PrimitiveThreadLocal<ValueType>::destruct(void*) [with ValueType = GLEWContextStruct]’:
include/mitsuba/core/tls.h:119:32:   required from ‘mitsuba::PrimitiveThreadLocal<ValueType>::PrimitiveThreadLocal() [with ValueType = GLEWContextStruct]’
src/libhw/glrenderer.cpp:33:57:   required from here
include/mitsuba/core/tls.h:145:13: warning: possible problem detected in invocation of ‘operator delete’ [-Wdelete-incomplete]
  145 |             delete static_cast<ValueType *>(data);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/mitsuba/core/tls.h:145:20: warning: invalid use of incomplete type ‘struct GLEWContextStruct’
  145 |             delete static_cast<ValueType *>(data);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/libhw/glrenderer.cpp:25:
include/mitsuba/hw/glrenderer.h:25:8: note: forward declaration of ‘struct GLEWContextStruct’
   25 | struct GLEWContextStruct;
      |        ^~~~~~~~~~~~~~~~~
In file included from include/mitsuba/mitsuba.h:51,
                 from src/libhw/glrenderer.cpp:19:
include/mitsuba/core/tls.h:145:13: note: neither the destructor nor the class-specific ‘operator delete’ will be called, even if they are declared when the class is defined
  145 |             delete static_cast<ValueType *>(data);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scons: *** [build/release/libhw/glrenderer.os] Error 1
scons: building terminated because of errors.
@jesscel
Copy link

jesscel commented Mar 1, 2022

I also got the same error. I wonder if you solved the problem? Thanks!

@LZleejean
Copy link

see #159

@kririae
Copy link

kririae commented May 12, 2022

Refer to the homepage of glew, "MX discontinued" since GLEW 2.0.0. You can refer to my notes on compiling Mitsuba on Arch Linux or directly use the dependencies_arch although further modification in config.py is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants