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

0.9.9.3 is not backwards compatible? #851

Closed
flaviut opened this issue Dec 24, 2018 · 2 comments
Closed

0.9.9.3 is not backwards compatible? #851

flaviut opened this issue Dec 24, 2018 · 2 comments

Comments

@flaviut
Copy link

flaviut commented Dec 24, 2018

I'm unable to build Kicad with 0.9.9.3 due to the following error:

In file included from /usr/include/glm/detail/type_vec3.hpp:431,
                 from /usr/include/glm/ext/vector_bool3.hpp:5,
                 from /usr/include/glm/vec3.hpp:5,
                 from /usr/include/glm/glm.hpp:117,
                 from /home/user/dev/co/kicad/trunk/src/kicad-5.0.1/include/plugins/3dapi/xv3d_types.h:38,
                 from /home/user/dev/co/kicad/trunk/src/kicad-5.0.1/common/../3d-viewer/3d_viewer/../3d_canvas/../3d_rendering/3d_render_raytracing/accelerators/../shapes2D/../ray.h:33,
                 from /home/user/dev/co/kicad/trunk/src/kicad-5.0.1/common/../3d-viewer/3d_viewer/../3d_canvas/../3d_rendering/3d_render_raytracing/accelerators/../shapes2D/cbbox2d.h:33,
                 from /home/user/dev/co/kicad/trunk/src/kicad-5.0.1/common/../3d-viewer/3d_viewer/../3d_canvas/../3d_rendering/3d_render_raytracing/accelerators/../shapes2D/cobject2d.h:33,
                 from /home/user/dev/co/kicad/trunk/src/kicad-5.0.1/common/../3d-viewer/3d_viewer/../3d_canvas/../3d_rendering/3d_render_raytracing/accelerators/ccontainer2d.h:33,
                 from /home/user/dev/co/kicad/trunk/src/kicad-5.0.1/common/../3d-viewer/3d_viewer/../3d_canvas/cinfo3d_visu.h:34,
                 from /home/user/dev/co/kicad/trunk/src/kicad-5.0.1/common/../3d-viewer/3d_viewer/eda_3d_viewer.h:36,
                 from /home/user/dev/co/kicad/trunk/src/kicad-5.0.1/pcbnew/pcb_base_frame.cpp:42:
/usr/include/glm/detail/type_vec3.inl: In instantiation of ‘constexpr glm::vec<3, T, Q>& glm::vec<3, T, Q>::operator=(const glm::vec<3, T, Q>&) const [with T = float; glm::qualifier Q = (glm::qualifier)0]’:
/home/user/dev/co/kicad/trunk/src/kicad-5.0.1/common/../3d-viewer/3d_rendering/3d_render_raytracing/clight.h:91:43:   required from here
/usr/include/glm/detail/type_vec3.inl:205:12: error: assignment of member ‘glm::vec<3, float, (glm::qualifier)0>::<unnamed union>::x’ in read-only object
    this->x = v.x;
    ~~~~~~~~^~~~~
/usr/include/glm/detail/type_vec3.inl:206:12: error: assignment of member ‘glm::vec<3, float, (glm::qualifier)0>::<unnamed union>::y’ in read-only object
    this->y = v.y;
    ~~~~~~~~^~~~~
/usr/include/glm/detail/type_vec3.inl:207:12: error: assignment of member ‘glm::vec<3, float, (glm::qualifier)0>::<unnamed union>::z’ in read-only object
    this->z = v.z;
    ~~~~~~~~^~~~~
/usr/include/glm/detail/type_vec3.inl:208:12: error: binding reference of type ‘glm::vec<3, float, (glm::qualifier)0>&’ to ‘const glm::vec<3, float, (glm::qualifier)0>’ discards qualifiers
    return *this;
            ^~~~
/usr/include/glm/detail/type_vec3.inl:209:3: error: body of ‘constexpr’ function ‘constexpr glm::vec<3, T, Q>& glm::vec<3, T, Q>::operator=(const glm::vec<3, T, Q>&) const [with T = float; glm::qualifier Q = (glm::qualifier)0]’ not a return-statement
   }
   ^

0.9.9.2 works great though. Here is the offending code in kicad, which to my inexperienced eye looks OK, since the thing being assigned to is not const or readonly.

typedef glm::vec3       SFVEC3F;
...
    void GetLightParameters( const SFVEC3F &aHitPoint,
                             SFVEC3F &aOutVectorToLight,
                             SFVEC3F &aOutLightColor,
                             float &aOutDistance ) const override
    {
        const SFVEC3F vectorLight = m_position - aHitPoint;

        aOutDistance = glm::length( vectorLight );
        aOutVectorToLight = vectorLight / aOutDistance; // <- error here
@sethhillbrand
Copy link

See #832

@flaviut
Copy link
Author

flaviut commented Jan 6, 2019

Dupe of #832

@flaviut flaviut closed this as completed Jan 6, 2019
zmedico pushed a commit to zmedico/gentoo that referenced this issue Apr 8, 2019
Has compatibility issues. Fixed in .4 version
g-truc/glm#851

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Alexey Shvetsov <[email protected]>
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

2 participants