View previous topic :: View next topic |
Author |
Message |
Khumarahn Apprentice
Joined: 17 Apr 2009 Posts: 199
|
Posted: Sun Sep 28, 2014 11:04 am Post subject: Error compiling blender 2.72-r1 |
|
|
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 |
|
|
VoidMage Watchman
Joined: 14 Oct 2006 Posts: 6196
|
Posted: Sun Sep 28, 2014 11:58 am Post subject: |
|
|
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 |
|
|
Khumarahn Apprentice
Joined: 17 Apr 2009 Posts: 199
|
|
Back to top |
|
|
Kadath n00b
Joined: 13 Nov 2007 Posts: 16
|
Posted: Sun Sep 28, 2014 10:24 pm Post subject: |
|
|
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 |
|
|
Khumarahn Apprentice
Joined: 17 Apr 2009 Posts: 199
|
Posted: Mon Sep 29, 2014 7:42 am Post subject: |
|
|
This works!
Thank you |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2283 Location: Adendorf, Germany
|
Posted: Wed Oct 01, 2014 7:16 am Post subject: |
|
|
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? _________________ Important German:- "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
- "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
|
|
Back to top |
|
|
Kadath n00b
Joined: 13 Nov 2007 Posts: 16
|
Posted: Wed Oct 01, 2014 5:10 pm Post subject: |
|
|
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 |
|
|
Navar Guru
Joined: 20 Aug 2012 Posts: 353
|
Posted: Wed Oct 15, 2014 8:40 pm Post subject: |
|
|
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 |
|
|
Navar Guru
Joined: 20 Aug 2012 Posts: 353
|
Posted: Thu Oct 16, 2014 1:11 am Post subject: |
|
|
Just as a confirm, I don't seem to be affected on building with gcc-4.7.3. |
|
Back to top |
|
|
KShots Guru
Joined: 09 Oct 2003 Posts: 591 Location: Florida
|
Posted: Tue Feb 03, 2015 6:43 pm Post subject: |
|
|
To simplify this a bit, output the following to /etc/portage/patches/media-gfx/blender/blender.redefinition.patch: Code: | diff -Nur old/intern/cycles/util/util_simd.h new/intern/cycles/util/util_simd.h
--- old/intern/cycles/util/util_simd.h 2014-10-20 03:58:22.000000000 -0400
+++ new/intern/cycles/util/util_simd.h 2015-02-03 13:29:26.156893414 -0500
@@ -19,6 +19,7 @@
#define __UTIL_SIMD_TYPES_H__
#include <limits>
+#include <x86intrin.h>
#include "util_debug.h"
#include "util_types.h" | Then, simply re-emerge blender. This will save you from having to manually re-do the steps mentioned above whenever someone releases a -r3 version or similar.
Warning - Once this bug is fixed upstream, you will need to remove (or backup and move) the patch above - no sense double-fixing this. _________________ Life without passion is death in disguise |
|
Back to top |
|
|
Khumarahn Apprentice
Joined: 17 Apr 2009 Posts: 199
|
Posted: Tue Feb 03, 2015 7:24 pm Post subject: |
|
|
I just tried this, and patch fails.
Code: |
* Failed Patch: blender.redefinition.patch !
* ( /etc/portage/patches//media-gfx/blender/blender.redefinition.patch )
*
|
maybe there were some repeated spaces lost while posting to forum? |
|
Back to top |
|
|
Khumarahn Apprentice
Joined: 17 Apr 2009 Posts: 199
|
Posted: Tue Feb 03, 2015 7:29 pm Post subject: |
|
|
no, its the opposite, your paste has some extra spaces in the end of the lines....
This looks good:
http://pastebin.com/k20VbHjG |
|
Back to top |
|
|
KShots Guru
Joined: 09 Oct 2003 Posts: 591 Location: Florida
|
Posted: Tue Feb 03, 2015 7:53 pm Post subject: |
|
|
Probably mangled by bbcode. Thanks for posting the fix, and letting people know why the above posted code won't work without some rework (pastebin stuff doesn't last long) _________________ Life without passion is death in disguise |
|
Back to top |
|
|
|