Problem building appleseed on LInux

39 views
Skip to first unread message

Rajiv Vaidyanathan

unread,
Jul 6, 2017, 2:11:44 AM7/6/17
to appleseed-dev
When I built Appleseed on Linux, I got the following error:

In file included from /home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/foundation/math/aabb.h:36:0,
                 from /home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/renderer/global/globaltypes.h:38,
                 from /home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/renderer/modeling/bssrdf/directionaldipolebssrdf.cpp:33:
/home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/foundation/math/vector.h: In member function ‘virtual void renderer::{anonymous}::DirectionalDipoleBSSRDF::evaluate_profile(const void*, const renderer::ShadingPoint&, const Vector3f&, const renderer::ShadingPoint&, const Vector3f&, renderer::Spectrum&) const’:
/home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/foundation/math/vector.h:728:9: error: ‘*((void*)& wr +8)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         result += lhs[i] * rhs[i];
         ^
/home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/renderer/modeling/bssrdf/directionaldipolebssrdf.cpp:170:22: note: ‘*((void*)& wr +8)’ was declared here
             Vector3f wr;
                      ^
In file included from /home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/foundation/math/aabb.h:36:0,
                 from /home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/renderer/global/globaltypes.h:38,
                 from /home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/renderer/modeling/bssrdf/directionaldipolebssrdf.cpp:33:
/home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/foundation/math/vector.h:728:9: error: ‘*((void*)& wr +4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         result += lhs[i] * rhs[i];
         ^
/home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/renderer/modeling/bssrdf/directionaldipolebssrdf.cpp:170:22: note: ‘*((void*)& wr +4)’ was declared here
             Vector3f wr;
                      ^
In file included from /home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/foundation/math/aabb.h:36:0,
                 from /home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/renderer/global/globaltypes.h:38,
                 from /home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/renderer/modeling/bssrdf/directionaldipolebssrdf.cpp:33:
/home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/foundation/math/vector.h:728:9: error: ‘wr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         result += lhs[i] * rhs[i];
         ^
/home/rajiv/Programming/OSF/Libraries/appleseed/src/appleseed/renderer/modeling/bssrdf/directionaldipolebssrdf.cpp:170:22: note: ‘wr’ was declared here
             Vector3f wr;
                      ^
cc1plus: all warnings being treated as errors
make[2]: *** [src/appleseed/CMakeFiles/appleseed.dir/renderer/modeling/bssrdf/directionaldipolebssrdf.cpp.o] Error 1
make[1]: *** [src/appleseed/CMakeFiles/appleseed.dir/all] Error 2
make: *** [all] Error 2

François Beaune

unread,
Jul 6, 2017, 2:18:06 AM7/6/17
to apples...@googlegroups.com
Hey Rajiv,

It's interesting that none of the many compilers we're using has ever caught this. The code is mostly safe, but this compiler warning (turned compiler *error* since we enabled warnings-as-errors) is entirely legitimate.

Which compiler & version are you using?

As a quick fix to continue compilation, you can disable warnings-as-errors by running again CMake with -DWARNINGS_AS_ERRORS=OFF. In your build/ directory you can just do

    cmake -DWARNINGS_AS_ERRORS=OFF ..
    make

and that should get you going.

Franz


--
You received this message because you are subscribed to the Google Groups "appleseed-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appleseed-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rajiv Vaidyanathan

unread,
Jul 6, 2017, 11:20:37 AM7/6/17
to appleseed-dev
Hey Franz,
    I am using g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
To unsubscribe from this group and stop receiving emails from it, send an email to appleseed-de...@googlegroups.com.

François Beaune

unread,
Jul 6, 2017, 11:22:15 AM7/6/17
to apples...@googlegroups.com
Thanks!

I pushed a fix to GitHub this afternoon.

Franz

To unsubscribe from this group and stop receiving emails from it, send an email to appleseed-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages