Building Cycles with BMI and LZCNT instruction sets fails #42279

Closed
opened 2014-10-17 17:45:13 +02:00 by Lukas Stockner · 4 comments
Member

Compiling the latest master (04fab84f) with GCC 4.8.1 and -march=native on an AMD FX-8350 fails with the following log:

/usr/lib/gcc/x86_64-linux-gnu/4.8/include/lzcntintrin.h: In function ‘unsigned int __lzcnt32(unsigned int)’:
/home/lukas/BlenderSrc/blender/intern/cycles/device/../util/util_simd.h:66:20: error: redefinition of ‘unsigned int __lzcnt32(unsigned int)’
 #define _lzcnt_u32 __lzcnt32
                    ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/immintrin.h:64:0,
                 from /home/lukas/BlenderSrc/blender/extern/clew/include/clew.h:480,
                 from /home/lukas/BlenderSrc/blender/intern/cycles/device/device.cpp:24:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/lzcntintrin.h:42:1: error: ‘unsigned int __lzcnt32(unsigned int)’ previously defined here
 __lzcnt32 (unsigned int __X)
 ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/lzcntintrin.h: In function ‘long long unsigned int __lzcnt64(long long unsigned int)’:
/home/lukas/BlenderSrc/blender/intern/cycles/device/../util/util_simd.h:67:20: error: redefinition of ‘long long unsigned int __lzcnt64(long long unsigned int)’
 #define _lzcnt_u64 __lzcnt64
                    ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/immintrin.h:64:0,
                 from /home/lukas/BlenderSrc/blender/extern/clew/include/clew.h:480,
                 from /home/lukas/BlenderSrc/blender/intern/cycles/device/device.cpp:24:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/lzcntintrin.h:55:1: error: ‘long long unsigned int __lzcnt64(long long unsigned int)’ previously defined here
 __lzcnt64 (unsigned long long __X)
 ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/bmiintrin.h: In function ‘unsigned int __tzcnt_u32(unsigned int)’:
/home/lukas/BlenderSrc/blender/intern/cycles/device/../util/util_simd.h:61:20: error: redefinition of ‘unsigned int __tzcnt_u32(unsigned int)’
 #define _tzcnt_u32 __tzcnt_u32
                    ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/immintrin.h:68:0,
                 from /home/lukas/BlenderSrc/blender/extern/clew/include/clew.h:480,
                 from /home/lukas/BlenderSrc/blender/intern/cycles/device/device.cpp:24:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/bmiintrin.h:96:1: error: ‘unsigned int __tzcnt_u32(unsigned int)’ previously defined here
 __tzcnt_u32 (unsigned int __X)
 ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/bmiintrin.h: In function ‘long long unsigned int __tzcnt_u64(long long unsigned int)’:
/home/lukas/BlenderSrc/blender/intern/cycles/device/../util/util_simd.h:62:20: error: redefinition of ‘long long unsigned int __tzcnt_u64(long long unsigned int)’
 #define _tzcnt_u64 __tzcnt_u64
                    ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/immintrin.h:68:0,
                 from /home/lukas/BlenderSrc/blender/extern/clew/include/clew.h:480,
                 from /home/lukas/BlenderSrc/blender/intern/cycles/device/device.cpp:24:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/bmiintrin.h:164:1: error: ‘long long unsigned int __tzcnt_u64(long long unsigned int)’ previously defined here
 __tzcnt_u64 (unsigned long long __X)
 ^

Removing the lzcnt and tzcnt macros makes it build and work just fine.

Compiling the latest master (04fab84f) with GCC 4.8.1 and -march=native on an AMD FX-8350 fails with the following log: ``` /usr/lib/gcc/x86_64-linux-gnu/4.8/include/lzcntintrin.h: In function ‘unsigned int __lzcnt32(unsigned int)’: /home/lukas/BlenderSrc/blender/intern/cycles/device/../util/util_simd.h:66:20: error: redefinition of ‘unsigned int __lzcnt32(unsigned int)’ #define _lzcnt_u32 __lzcnt32 ^ In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/immintrin.h:64:0, from /home/lukas/BlenderSrc/blender/extern/clew/include/clew.h:480, from /home/lukas/BlenderSrc/blender/intern/cycles/device/device.cpp:24: /usr/lib/gcc/x86_64-linux-gnu/4.8/include/lzcntintrin.h:42:1: error: ‘unsigned int __lzcnt32(unsigned int)’ previously defined here __lzcnt32 (unsigned int __X) ^ /usr/lib/gcc/x86_64-linux-gnu/4.8/include/lzcntintrin.h: In function ‘long long unsigned int __lzcnt64(long long unsigned int)’: /home/lukas/BlenderSrc/blender/intern/cycles/device/../util/util_simd.h:67:20: error: redefinition of ‘long long unsigned int __lzcnt64(long long unsigned int)’ #define _lzcnt_u64 __lzcnt64 ^ In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/immintrin.h:64:0, from /home/lukas/BlenderSrc/blender/extern/clew/include/clew.h:480, from /home/lukas/BlenderSrc/blender/intern/cycles/device/device.cpp:24: /usr/lib/gcc/x86_64-linux-gnu/4.8/include/lzcntintrin.h:55:1: error: ‘long long unsigned int __lzcnt64(long long unsigned int)’ previously defined here __lzcnt64 (unsigned long long __X) ^ /usr/lib/gcc/x86_64-linux-gnu/4.8/include/bmiintrin.h: In function ‘unsigned int __tzcnt_u32(unsigned int)’: /home/lukas/BlenderSrc/blender/intern/cycles/device/../util/util_simd.h:61:20: error: redefinition of ‘unsigned int __tzcnt_u32(unsigned int)’ #define _tzcnt_u32 __tzcnt_u32 ^ In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/immintrin.h:68:0, from /home/lukas/BlenderSrc/blender/extern/clew/include/clew.h:480, from /home/lukas/BlenderSrc/blender/intern/cycles/device/device.cpp:24: /usr/lib/gcc/x86_64-linux-gnu/4.8/include/bmiintrin.h:96:1: error: ‘unsigned int __tzcnt_u32(unsigned int)’ previously defined here __tzcnt_u32 (unsigned int __X) ^ /usr/lib/gcc/x86_64-linux-gnu/4.8/include/bmiintrin.h: In function ‘long long unsigned int __tzcnt_u64(long long unsigned int)’: /home/lukas/BlenderSrc/blender/intern/cycles/device/../util/util_simd.h:62:20: error: redefinition of ‘long long unsigned int __tzcnt_u64(long long unsigned int)’ #define _tzcnt_u64 __tzcnt_u64 ^ In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/immintrin.h:68:0, from /home/lukas/BlenderSrc/blender/extern/clew/include/clew.h:480, from /home/lukas/BlenderSrc/blender/intern/cycles/device/device.cpp:24: /usr/lib/gcc/x86_64-linux-gnu/4.8/include/bmiintrin.h:164:1: error: ‘long long unsigned int __tzcnt_u64(long long unsigned int)’ previously defined here __tzcnt_u64 (unsigned long long __X) ^ ``` Removing the lzcnt and tzcnt macros makes it build and work just fine.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @LukasStockner

Added subscriber: @LukasStockner

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2014-10-17 19:03:19 +02:00

Please do not report build issues on the tracker! Use either the ML (bf-committers) or IRC (#blendercoders).

Please do not report build issues on the tracker! Use either the ML (bf-committers) or IRC (#blendercoders).
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#42279
No description provided.