10110111 / CalcMySky

Simulator of light scattering by planetary atmospheres
GNU General Public License v3.0
30 stars 8 forks source link

Failed to compile on aarch64 #6

Closed paolostivanin closed 2 years ago

paolostivanin commented 2 years ago

Hello, I'm packaging this software for openSUSE, but I'm facing some issues on aarch64:

[   47s] -- The CXX compiler identification is GNU 11.3.0
[   47s] -- Detecting CXX compiler ABI info
[   47s] -- Detecting CXX compiler ABI info - done
[   47s] -- Check for working CXX compiler: /usr/bin/g++-11 - skipped
[   47s] -- Detecting CXX compile features
[   47s] -- Detecting CXX compile features - done
[   47s] -- Looking for C++ include glm/glm.hpp
[   47s] -- Looking for C++ include glm/glm.hpp - found
[   47s] -- Checking that GLM has the required features
[   48s] -- Checking that GLM has the required features - done
[   48s] -- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0") 
[   48s] -- Configuring done
[   48s] -- Generating done
[   48s] CMake Warning:
[   48s]   Manually-specified variables were not used by the project:
[   48s] 
[   48s]     BUILD_STATIC_LIBS
[   48s]     CMAKE_C_FLAGS
[   48s]     CMAKE_Fortran_FLAGS
[   48s]     CMAKE_INSTALL_DO_STRIP
[   48s]     CMAKE_MODULES_INSTALL_DIR
[   48s]     INCLUDE_INSTALL_DIR
[   48s]     LIB_INSTALL_DIR
[   48s]     LIB_SUFFIX
[   48s]     SHARE_INSTALL_PREFIX
[   48s]     SYSCONF_INSTALL_DIR
[   48s] 
[   48s] 
[   48s] -- Build files have been written to: /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build
...
[   50s] [ 35%] Building CXX object tests/CMakeFiles/test-Spectrum.dir/test-Spectrum.cpp.o
[   50s] cd /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build/tests && /usr/bin/g++-11 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build/tests/test-Spectrum_autogen/include -I/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build -isystem /usr/include/eigen3 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -Werror=return-type -Wall -Wextra -fvisibility=hidden -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -DNDEBUG -O2 -g -DNDEBUG -fPIC -std=gnu++17 -MD -MT tests/CMakeFiles/test-Spectrum.dir/test-Spectrum.cpp.o -MF CMakeFiles/test-Spectrum.dir/test-Spectrum.cpp.o.d -o CMakeFiles/test-Spectrum.dir/test-Spectrum.cpp.o -c /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/test-Spectrum.cpp
[   50s] In file included from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/Spectrum.hpp:7,
[   50s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/test-Spectrum.cpp:1:
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:85:6: error: variable or field 'checkFramebufferStatus' declared void
[   50s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   50s]       |      ^~~~~~~~~~~~~~~~~~~~~~
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:85:29: error: 'QOpenGLFunctions_3_3_Core' was not declared in this scope
[   50s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   50s]       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:85:56: error: 'gl' was not declared in this scope; did you mean 'glm'?
[   50s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   50s]       |                                                        ^~
[   50s]       |                                                        glm
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:85:60: error: expected primary-expression before 'const'
[   50s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   50s]       |                                                            ^~~~~
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:88:6: error: variable or field 'dumpActiveUniforms' declared void
[   50s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   50s]       |      ^~~~~~~~~~~~~~~~~~
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:88:25: error: 'QOpenGLFunctions_3_3_Core' was not declared in this scope
[   50s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   50s]       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:88:52: error: 'gl' was not declared in this scope; did you mean 'glm'?
[   50s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   50s]       |                                                    ^~
[   50s]       |                                                    glm
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:88:56: error: 'GLuint' was not declared in this scope; did you mean 'uint'?
[   50s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   50s]       |                                                        ^~~~~~
[   50s]       |                                                        uint
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:90:31: error: 'GLenum' was not declared in this scope; did you mean 'enum'?
[   50s]    90 | std::string openglErrorString(GLenum error);
[   50s]       |                               ^~~~~~
[   50s]       |                               enum
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:137:6: error: variable or field 'roundTexData' declared void
[   50s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   50s]       |      ^~~~~~~~~~~~
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:137:19: error: 'GLfloat' was not declared in this scope; did you mean 'float'?
[   50s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   50s]       |                   ^~~~~~~
[   50s]       |                   float
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:137:28: error: 'data' was not declared in this scope; did you mean 'std::data'?
[   50s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   50s]       |                            ^~~~
[   50s]       |                            std::data
[   50s] In file included from /usr/include/c++/11/vector:69,
[   50s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/Spectrum.hpp:4,
[   50s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/test-Spectrum.cpp:1:
[   50s] /usr/include/c++/11/bits/range_access.h:319:5: note: 'std::data' declared here
[   50s]   319 |     data(initializer_list<_Tp> __il) noexcept
[   50s]       |     ^~~~
[   50s] In file included from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/Spectrum.hpp:7,
[   50s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/test-Spectrum.cpp:1:
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:137:41: error: expected primary-expression before 'size'
[   50s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   50s]       |                                         ^~~~
[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:137:47: error: expected primary-expression before 'int'
[   50s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   50s]       |                                               ^~~
[   50s] make[2]: *** [tests/CMakeFiles/test-Spectrum.dir/build.make:93: tests/CMakeFiles/test-Spectrum.dir/test-Spectrum.cpp.o] Error 1
[   50s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build'
[   50s] make[1]: *** [CMakeFiles/Makefile2:547: tests/CMakeFiles/test-Spectrum.dir/all] Error 2
...
[   54s] /usr/bin/g++-11 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build/common_autogen/include -I/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build -isystem /usr/include/eigen3 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -Werror=return-type -Wall -Wextra -fvisibility=hidden -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -DNDEBUG -O2 -g -DNDEBUG -fPIC -std=gnu++17 -MD -MT CMakeFiles/common.dir/common/Spectrum.cpp.o -MF CMakeFiles/common.dir/common/Spectrum.cpp.o.d -o CMakeFiles/common.dir/common/Spectrum.cpp.o -c /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/Spectrum.cpp
[   54s] In file included from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/Spectrum.hpp:7,
[   54s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/Spectrum.cpp:1:
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:85:6: error: variable or field 'checkFramebufferStatus' declared void
[   54s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   54s]       |      ^~~~~~~~~~~~~~~~~~~~~~
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:85:29: error: 'QOpenGLFunctions_3_3_Core' was not declared in this scope
[   54s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   54s]       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:85:56: error: 'gl' was not declared in this scope; did you mean 'glm'?
[   54s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   54s]       |                                                        ^~
[   54s]       |                                                        glm
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:85:60: error: expected primary-expression before 'const'
[   54s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   54s]       |                                                            ^~~~~
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:88:6: error: variable or field 'dumpActiveUniforms' declared void
[   54s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   54s]       |      ^~~~~~~~~~~~~~~~~~
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:88:25: error: 'QOpenGLFunctions_3_3_Core' was not declared in this scope
[   54s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   54s]       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:88:52: error: 'gl' was not declared in this scope; did you mean 'glm'?
[   54s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   54s]       |                                                    ^~
[   54s]       |                                                    glm
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:88:56: error: 'GLuint' was not declared in this scope; did you mean 'uint'?
[   54s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   54s]       |                                                        ^~~~~~
[   54s]       |                                                        uint
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:90:31: error: 'GLenum' was not declared in this scope; did you mean 'enum'?
[   54s]    90 | std::string openglErrorString(GLenum error);
[   54s]       |                               ^~~~~~
[   54s]       |                               enum
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:137:6: error: variable or field 'roundTexData' declared void
[   54s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   54s]       |      ^~~~~~~~~~~~
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:137:19: error: 'GLfloat' was not declared in this scope; did you mean 'float'?
[   54s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   54s]       |                   ^~~~~~~
[   54s]       |                   float
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:137:28: error: 'data' was not declared in this scope; did you mean 'std::data'?
[   54s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   54s]       |                            ^~~~
[   54s]       |                            std::data
[   54s] In file included from /usr/include/c++/11/vector:69,
[   54s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/Spectrum.hpp:4,
[   54s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/Spectrum.cpp:1:
[   54s] /usr/include/c++/11/bits/range_access.h:319:5: note: 'std::data' declared here
[   54s]   319 |     data(initializer_list<_Tp> __il) noexcept
[   54s]       |     ^~~~
[   54s] In file included from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/Spectrum.hpp:7,
[   54s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/Spectrum.cpp:1:
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:137:41: error: expected primary-expression before 'size'
[   54s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   54s]       |                                         ^~~~
[   54s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/../common/util.hpp:137:47: error: expected primary-expression before 'int'
[   54s]   137 | void roundTexData(GLfloat* data, size_t size, int precision);
[   54s]       |                                               ^~~
[   54s] make[2]: *** [CMakeFiles/common.dir/build.make:121: CMakeFiles/common.dir/common/Spectrum.cpp.o] Error 1
[   54s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build'
...
[   55s] /usr/bin/g++-11 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build/common_autogen/include -I/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build -isystem /usr/include/eigen3 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -Werror=return-type -Wall -Wextra -fvisibility=hidden -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -DNDEBUG -O2 -g -DNDEBUG -fPIC -std=gnu++17 -MD -MT CMakeFiles/common.dir/common/AtmosphereParameters.cpp.o -MF CMakeFiles/common.dir/common/AtmosphereParameters.cpp.o.d -o CMakeFiles/common.dir/common/AtmosphereParameters.cpp.o -c /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/AtmosphereParameters.cpp
[   55s] In file included from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/types.hpp:7,
[   55s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/AtmosphereParameters.hpp:7,
[   55s]                  from /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/AtmosphereParameters.cpp:1:
[   55s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/util.hpp:85:6: error: variable or field 'checkFramebufferStatus' declared void
[   55s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   55s]       |      ^~~~~~~~~~~~~~~~~~~~~~
[   55s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/util.hpp:85:29: error: 'QOpenGLFunctions_3_3_Core' was not declared in this scope; did you mean 'QOpenGLFunctionsPrivate'?
[   55s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   55s]       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~
[   55s]       |                             QOpenGLFunctionsPrivate
[   55s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/util.hpp:85:56: error: 'gl' was not declared in this scope; did you mean 'glm'?
[   55s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   55s]       |                                                        ^~
[   55s]       |                                                        glm
[   55s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/util.hpp:85:60: error: expected primary-expression before 'const'
[   55s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   55s]       |                                                            ^~~~~
[   55s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/util.hpp:88:6: error: variable or field 'dumpActiveUniforms' declared void
[   55s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   55s]       |      ^~~~~~~~~~~~~~~~~~
[   55s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/util.hpp:88:25: error: 'QOpenGLFunctions_3_3_Core' was not declared in this scope; did you mean 'QOpenGLFunctionsPrivate'?
[   55s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   55s]       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
[   55s]       |                         QOpenGLFunctionsPrivate
[   55s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/util.hpp:88:52: error: 'gl' was not declared in this scope; did you mean 'glm'?
[   55s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   55s]       |                                                    ^~
[   55s]       |                                                    glm
[   55s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/common/util.hpp:88:63: error: expected primary-expression before 'program'
[   55s]    88 | void dumpActiveUniforms(QOpenGLFunctions_3_3_Core& gl, GLuint program);
[   55s]       |                                                               ^~~~~~~
[   55s] make[2]: *** [CMakeFiles/common.dir/build.make:107: CMakeFiles/common.dir/common/AtmosphereParameters.cpp.o] Error 1
[   55s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build'
[   61s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/build'
10110111 commented 2 years ago

This means that the Qt installation has broken header <QOpenGLFunctions_3_3_Core>:

[   50s] /home/abuild/rpmbuild/BUILD/CalcMySky-0.1.0/tests/../common/../common/util.hpp:85:29: error: 'QOpenGLFunctions_3_3_Core' was not declared in this scope
[   50s]    85 | void checkFramebufferStatus(QOpenGLFunctions_3_3_Core& gl, const char* fboDescription);
[   50s]       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~

The header is included in common/util.hpp in line 10, while the class apparently isn't declared for some reason.

10110111 commented 2 years ago

I suppose this is the problem (in QT_PREFIX/include/QtOpenGL/qopenglfunctions_3_3_core.h):

#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)

If Qt is compiled without OpenGL support or it uses OpenGL ES 2, then CalcMySky won't work with it.

paolostivanin commented 2 years ago

I see! Yes, I just saw that on aarch64 we don't support opengl. Thanks!