forked from icaven/glm
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
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:
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:
- Downgrade to glm 0.9.7
- Downgrade Ubuntu to 14.04LTS
- Downgrade all my code to c++03 standard (-std=c++03)