Unbreak the blender build on FreeBSD #37477
Labels
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#37477
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System: FreeBSD 8.x to -CURRENT, amd64 and i386
Brief:
The current blender release 2.69 is broken on FreeBSD, since the OpenShadingLanguage implementation as well as all upcoming FreeBSD versions (starting with 10.0) will use LLVM and Clang as default compile and linker environment.
Instead of GCC and libstdc++, Clang, Clang++ and LLVM (version 3.3) are used.
Find below links to the current set of patches (against 2.69) that enable blender to build, link and work on FreeBSD.
Patch to remove the hardcoded libstdc++ linker argument. The correct c++ library is picked by the compiler:
http://svnweb.freebsd.org/ports/head/graphics/blender/files/patch-CMakelists.txt?revision=333890&view=co
Fix an issue with clang++ and libc++ in the triangulator code:
http://svnweb.freebsd.org/ports/head/graphics/blender/files/patch-extern_carve_lib_triangulator.cpp?revision=333890&view=co
Fix a libstdc++ specific pass-through that is not covered by the C++ standard using an explicit assignment operator for Range structs:
http://svnweb.freebsd.org/ports/head/graphics/blender/files/patch-extern_rangetree_range_tree.hh?revision=333890&view=co
Fix the itasc KDL::TreeElement implementation by not using SegmentMap, but a standard compliant std::pair implementation.
A minor caveat might be that you can't safely increment/decrement the parent member anymore, but the code does not
use such an approach (and it also would not make any sense to inc/dec over the parent):
http://svnweb.freebsd.org/ports/head/graphics/blender/files/patch-intern_itasc_kdl_tree.hpp?revision=333890&view=co
Fix an issue with libc++ bringing in several parts of C++11 that are already in the std:: namespace. It does not have a std::tr1 namespace
http://svnweb.freebsd.org/ports/head/graphics/blender/files/patch-extern_libmv_third_party_ceres_internal_ceres_collections_port.h?revision=333890&view=co
Furthermore, the current cycles implementation violates the OpenCL standard due to the definition of reserved compiler keywords, such as __global, __local, ... Right now, libc++ only gets hickups with __global and __align, so those were replaced with
cycles_global and cycles_align in the following headers:
Changed status to: 'Open'
Added subscriber: @mva
The Range struct fix has already been committed in commit
cf9edb2610
.This issue was referenced by blender/blender-addons-contrib@c18712e868
This issue was referenced by
c18712e868
Added subscriber: @Sergey
@Sergey, the carve and ceres patches look ok to me but I'm not sure what the policy was to commit these things again?
The libstdc++ and itasc changes I can review and commit.
Changes to carve is to be put to extern/carve/patches.
But they're suspicious. You basically disabled that ASSERT for all clang compilers which doesn't define _LIBCPP_VERSION. And the thing is, carve used to compile with Clang here on linux some time ago. This makes me believe this assert would not be compiled with that Clang version which i used here?
Also, is it possible somehow define std::__is_heap to std::is_heap (or maybe other way around) somewhere in the utility/platform header so code itself is free of #ifdef branches?
As for ceres couple of moments:
I'm about to upgrade to ceres 1.8.0
Changes there i would rather send directly to the upstream
Changes like this no-go for the upstream. This is all about making it so CERES_HASH_NAMESPACE_START is defined by the build system. Easy to do with the CMake. With SCons it's a bit more tricky but we have to do it anyway to support MSVC10 there.
#if defined(_LIBCPP_VERSION)
#else
#endif
This is also no-go for the upstream.You are inside #if !defined(CERES_NO_TR1) branch and adds an extra branch inside it to not use TR1. Proper way to do it is to define CERES_NO_TR1 from the build system.This would require re-shuffling includes bliock.
#if defined(_LIBCPP_VERSION)
#else
#endif
The carve patch could be changed to something like:
#endif
At the moment, clang/libcxx also defines GNUC, so a change like the one should work at the moment. I do not know, if and how long GNUC will remain.
Note that the patches are just to make it work, not to be nice and shiny - especially not, if the knowledge about the codebase is limited as it is in my case.
Added subscriber: @Keir
Also note that Ceres has changed the handling of the hash stuff upstream; the proper solution is probably to upgrade Ceres first, then add the appropriate defines.
@mva as discussed in IRC would try just
#endif
in the beginning of the file. We would need to put it as a patch to
extern/carve/patches
and list this patch inextern/carve/patches/series
.This i would call as clean as we can be ATM :) Would contact Tobias about this later, maybe he'll have some suggestions about where to put such a things.
@Sergey the define on __is_heap works.
@mva, pushed changes to Carve library, hash
dc71cb5f6e
.Pushed latest Ceres at
de6c1c9287
. Collections part was re-worked there and since Ceres by itself works fine in FreeBSD hopefully now Blender wil lwork as well :)Please give it a try and tell how it goes.
This issue was referenced by blender/blender-addons-contrib@683093b5c8
This issue was referenced by
683093b5c8
This issue was referenced by blender/blender-addons-contrib@19a41e5a10
This issue was referenced by
19a41e5a10
Changed status from 'Open' to: 'Resolved'
Committed fix for iTaSC as well now, with some modifications.
Thanks for your patches, I think everything has been committed now.