Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error compiling blender 2.72-r1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Khumarahn
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2009
Posts: 121

PostPosted: Sun Sep 28, 2014 11:04 am    Post subject: Error compiling blender 2.72-r1 Reply with quote

Hello everybody.

I cannot compile blender 2.72-r1, and don't see where the problem may come from

Code:
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +64)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +56)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +52)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +48)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +40)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +36)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +32)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +24)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +20)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: warning: ‘*((void*)& bsdf_eval +16)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
In file included from /var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path.h:29:0,
                 from /var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_avx2.cpp:41:
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_accumulate.h:90:2: warning: ‘bsdf_eval.ccl::BsdfEval::use_light_pass’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  if(eval->use_light_pass) {
  ^
In file included from /var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path.h:45:0,
                 from /var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_avx2.cpp:41:
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/kernel/kernel_path_surface.h:225:12: note: ‘bsdf_eval.ccl::BsdfEval::use_light_pass’ was declared here
   BsdfEval bsdf_eval;
            ^
Linking CXX static library ../../../lib/libcycles_kernel.a
cd /var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72_build/intern/cycles/kernel && /usr/bin/cmake -P CMakeFiles/cycles_kernel.dir/cmake_clean_target.cmake
cd /var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72_build/intern/cycles/kernel && /usr/bin/cmake -E cmake_link_script CMakeFiles/cycles_kernel.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-ar cr ../../../lib/libcycles_kernel.a  CMakeFiles/cycles_kernel.dir/kernel.cpp.o CMakeFiles/cycles_kernel.dir/kernel_sse2.cpp.o CMakeFiles/cycles_kernel.dir/kernel_sse3.cpp.o CMakeFiles/cycles_kernel.dir/kernel_sse41.cpp.o CMakeFiles/cycles_kernel.dir/kernel_avx.cpp.o CMakeFiles/cycles_kernel.dir/kernel_avx2.cpp.o
/usr/bin/x86_64-pc-linux-gnu-ranlib ../../../lib/libcycles_kernel.a
make[2]: Leaving directory `/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72_build'
/usr/bin/cmake -E cmake_progress_report /var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72_build/CMakeFiles  73
[  8%] Built target cycles_kernel
make[1]: Leaving directory `/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72_build'
make: *** [all] Error 2
 * ERROR: media-gfx/blender-2.72-r1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=media-gfx/blender-2.72-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/blender-2.72-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-gfx/blender-2.72-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/blender-2.72-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72_build'
 * S: '/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72'

>>> Failed to emerge media-gfx/blender-2.72-r1, Log file:

>>>  '/var/tmp/portage/media-gfx/blender-2.72-r1/temp/build.log'


emerge --info: http://pastebin.com/Z90nk2Hh
emerge -pqv:
Code:
[ebuild     U ] media-gfx/blender-2.72-r1 [2.71-r1] USE="boost bullet cycles dds elbeem ffmpeg fftw* game-engine nls openal* openexr openimageio openmp opennl player* sdl sse sse2 tiff -collada -colorio -debug -doc -jack -jpeg2k -ndof -redcode -sndfile" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4"

build log: http://www.dropbox.com/s/8u62rao8ytwsse4/build.log
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5674

PostPosted: Sun Sep 28, 2014 11:58 am    Post subject: Reply with quote

You don't see it, cause it happens very close to the start of the log.
Khumarahn wrote:
Code:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/lzcntintrin.h: In function ‘unsigned int __lzcnt32(unsigned int)’:
/var/tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/device/../util/util_simd.h:66:20: error: redefinition of ‘unsigned int __lzcnt32(unsigned int)’
 #define _lzcnt_u32 __lzcnt32


Unfortunately, without looking at the sources, that's as clear as mud.
Back to top
View user's profile Send private message
Khumarahn
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2009
Posts: 121

PostPosted: Sun Sep 28, 2014 7:03 pm    Post subject: Reply with quote

Bug on gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=523928
Back to top
View user's profile Send private message
Kadath
n00b
n00b


Joined: 13 Nov 2007
Posts: 15

PostPosted: Sun Sep 28, 2014 10:24 pm    Post subject: Reply with quote

The bug is caused by a developer accidentally including "<x86intrin.h>" after #define-ing one of it's functions to be the other; causing a redefinition error.

To fix it, run the following to prepare the source:
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild fetch
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild unpack

Then, add #include <x86intrin.h> to /tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/util/util_simd.h just beneath <limits>.

Then continue with the build:
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild compile
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild install
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild qmerge

Done. Works for me, anyway.
Back to top
View user's profile Send private message
Khumarahn
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2009
Posts: 121

PostPosted: Mon Sep 29, 2014 7:42 am    Post subject: Reply with quote

This works!

Thank you :-)
Back to top
View user's profile Send private message
Yamakuzure
Veteran
Veteran


Joined: 21 Jun 2006
Posts: 1467
Location: Bardowick, Germany

PostPosted: Wed Oct 01, 2014 7:16 am    Post subject: Reply with quote

Kadath wrote:
The bug is caused by a developer accidentally including "<x86intrin.h>" after #define-ing one of it's functions to be the other; causing a redefinition error.

To fix it, run the following to prepare the source:
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild fetch
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild unpack

Then, add #include <x86intrin.h> to /tmp/portage/media-gfx/blender-2.72-r1/work/blender-2.72/intern/cycles/util/util_simd.h just beneath <limits>.

Then continue with the build:
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild compile
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild install
ebuild /usr/portage/media-gfx/blender/blender-2.72-r1.ebuild qmerge

Done. Works for me, anyway.
Actually defining one for the other is wrong, and the defines should be removed.

However, I do not know whether this is a general problem or just for gcc-4.8.* and above. I have added two patches to the bug listed above that take those definitions out. The ebuild merges fine then on my system, and blender works as expected.

btw: shouldn't it be "merge" instead of "qmerge"? AFAIR qmerge does not completely finish the merge?
_________________
systemd - The biggest fallacies
Back to top
View user's profile Send private message
Kadath
n00b
n00b


Joined: 13 Nov 2007
Posts: 15

PostPosted: Wed Oct 01, 2014 5:10 pm    Post subject: Reply with quote

Quote:
Actually defining one for the other is wrong, and the defines should be removed.


You are probably right; I just assumed the developer had some arcane reason for doing it. Looking in lzcntintrin.h, both functions are identical anyway.

Quote:
btw: shouldn't it be "merge" instead of "qmerge"? AFAIR qmerge does not completely finish the merge?


I thought 'merge' did the download/unpack/compile/install steps in one go, and 'qmerge' was the last install step - though I could be wrong.
Back to top
View user's profile Send private message
Navar
Guru
Guru


Joined: 20 Aug 2012
Posts: 328

PostPosted: Wed Oct 15, 2014 8:40 pm    Post subject: Reply with quote

Kadath is correct. The merge option is just a (re)do-all.

ebuild manpage wrote:
merge Normally, to merge an ebuild, you need to fetch, unpack, compile, install and qmerge. If you're simply interested in merging the ebuild, you can use this command, which will perform all these steps for you, stopping along the way if a particular step doesn't complete successfully.
Back to top
View user's profile Send private message
Navar
Guru
Guru


Joined: 20 Aug 2012
Posts: 328

PostPosted: Thu Oct 16, 2014 1:11 am    Post subject: Reply with quote

Khumarahn wrote:
Bug on gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=523928

Just as a confirm, I don't seem to be affected on building with gcc-4.7.3.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum