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

Can't compile using GLM 0.9.8 with gcc 4.8 and c++11 on Ubuntu 16.04LTS #550

Closed
mean-ui-thread opened this issue Sep 12, 2016 · 1 comment
Assignees
Milestone

Comments

@mean-ui-thread
Copy link

mean-ui-thread commented Sep 12, 2016

The problem

I'm on Ubuntu 16.04LTS. I am required to build my product using gcc 4.8 (instead of default gcc 5.4) for binary compatibility reasons with older versions of Ubuntu.

To reproduce the problem, you will need to install gcc-4.8 on Ubuntu 16.04LTS:

sudo apt-get install gcc-4.8 g++-4.8

Then get my test source code:

Test.cpp.zip

Assuming that GLM is cloned in git/glm-0.9.8, and checked-out on the 0.9.8 release tag, compile my test source code this way, using g++4.8 :

/usr/bin/g++-4.8 -Igit/glm-0.9.8 -std=c++11 -o Test.o -c Test.cpp

This will generate the following error:

glm/glm/detail/type_vec4_simd.inl:446: error: redeclaration ‘constexpr glm::tvec4<T, P>::tvec4(A, B, C, D) [with A = int; B = int; C = int; D = int; T = int; glm::precision P = (glm::precision)5u]’ differs in ‘constexpr’
  GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_lowp>::tvec4(int32 a, int32 b, int32 c, int32 d) :
                                                                                                            ^

Work-around

So far, I have 3 options:

  1. Downgrade to glm 0.9.7
  2. Downgrade Ubuntu to 14.04LTS
  3. Downgrade all my code to c++03 standard (-std=c++03)
@Groovounet
Copy link
Member

I submitted a tentative fix in GLM 0.9.8 and master branches,

Not sure it will be effective. Please let me know whether it worked for you!

Thanks,
Christophe

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

No branches or pull requests

2 participants