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

SDL2 OpenGL ES examples do not work on Linux x86-64 #9

Closed
unity-car-tutorials opened this Issue May 12, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@unity-car-tutorials

unity-car-tutorials commented May 12, 2015

My prefix folder is /opt and I build everything with BUILD_STATIC=OFF, but I still receive the error

Utility::Resource: group 'MagnumShaders' was not found

Whenever I try to run the Triangle example.

Also, the OpenGEX importer does not work with GCC 4.8.2 and the compiler throws errors.

@unity-car-tutorials unity-car-tutorials changed the title from SDL2 OpenGL ES examples Examples do not work on x64 to SDL2 OpenGL ES examples do not work on x64 May 12, 2015

@unity-car-tutorials unity-car-tutorials changed the title from SDL2 OpenGL ES examples do not work on x64 to SDL2 OpenGL ES examples do not work on Linux x86-64 May 12, 2015

@mosra

This comment has been minimized.

Owner

mosra commented May 12, 2015

Hi,

thanks for the reports!

This particular error is, in fact, really related to static build. Are you sure you didn't link to static MagnumShaders library by accident? (For example because CMake found it sooner than the shared one -- look for MAGNUM_SHADERS_LIBRARY in CMakeCache.txt.) The original point with the example was to keep it as short as possible, but, yeah, that doesn't work with static build. The fix for static build is simple, just adding these three lines. I'll add these or find a way to avoid these inconveniences altogether.

Incidentally, I tested the OpenGEX importer on GCC 4.9 and 4.7 and it worked on both, so I expected it to work also on all versions in between. Guess I need to install 4.8 and test it also there, then :)

@unity-car-tutorials

This comment has been minimized.

unity-car-tutorials commented May 12, 2015

Thanks. The demos compiled and worked when I deleted the caches and rebuilt all the projects, including the demos, with the STATIC_BUILD=OFF option. But I had to explicitly mention the libEGL library in the examples' CMake files because of undefined references to a specific EGL method.

Here is the type of errors I receive when building the OpenGEXImporter with 64-bit GCC 4.8.2 on Linux.

....../MagnumPlugins/OpenGexImporter/OpenDdl/parsers.cpp:328:52: error: redeclaration ‘Magnum::OpenDdl::Type Magnum::OpenDdl::Implementation::{anonymous}::typeFor() [with = unsigned char]’ differs in ‘constexpr’
#define _c(T) template<> constexpr Type typeFor() { return Type::T; }

I instead used Clang++ 3.4 to build the plug-ins.

@mosra

This comment has been minimized.

Owner

mosra commented May 12, 2015

Okay, so:

  • examples with static builds should be working now, no more group 'MagnumShaders' was not found messages
  • EGL linking is now also done automatically
  • OpenGEX plugin (and everything else) now builds also on GCC 4.8 without errors and test failures

Note that you need to pull new changes also from Corrade to make the fixes compilable.

Thanks for all the reports!

@mosra mosra closed this May 12, 2015

@mosra mosra added this to the 2018.02 milestone Feb 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment