[Bf-committers] Error compiling blender on Mac

Arto Kitula arto.kitula at gmail.com
Sun Mar 4 14:11:55 CET 2018


There has been problem with many brewed libraries clashing with lib/darwin libraries.

BTW if you want to build OMP enabled build of master on your macOS, you can use brew llvm clang with setting first env variables:

CC=/usr/local/opt/llvm/bin/clang
CXX=/usr/local/opt/llvm/bin/clang++
LDFLAGS=-L/usr/local/opt/llvm/lib
CPPFLAGS=-I/usr/local/opt/llvm/include

and then run cmake.

Keep in mind that binary is then using runtime libs libc++.1.dylib and libomp.dylib from /usr/local/opt/llvm/lib/ so the binary won’t run on systems that don’t have them. You can bundle them yourself to blender.app/Contents/Resources and set blender.app/Contents/MacOS/blender to load them from @loader_path relative. We’ll do automated build for that later on, probably when updating LLVM from the lib/darwin.


> On 4 Mar 2018, at 13.04, Bob Geller <bobgeller401 at gmail.com> wrote:
> 
> Thank you so much Brecht. Everything was fixed with that commit. I know
> what to check for next time now :)
> 
> Regards,
> Bob
> 
> On 4 March 2018 at 06:43, Brecht Van Lommel <brechtvanlommel at pandora.be>
> wrote:
> 
>> I've committed a fix now, assuming the OSL paths are the issue:
>> https://developer.blender.org/rB3607b4eb521d9
>> 
>> On Sun, Mar 4, 2018 at 7:18 AM, Brecht Van Lommel <
>> brechtvanlommel at pandora.be> wrote:
>> 
>>> CMake seems to have found OSL libraries in /usr/local, and maybe there's
>>> an OpenImageIO there as well. This could be causing the problem.
>>> 
>>> The workaround would be to disable WITH_CYCLES_OSL, or to edit the
>>> CMakeCache.txt to point to Blender's OSL libraries:
>>> http://pasteall.org/855658
>>> 
>>> I'll check on fixing the code so it always uses Blender's OSL libraries.
>>> 
>>> 
>>> On Sun, Mar 4, 2018 at 5:33 AM, Bob Geller <bobgeller401 at gmail.com>
>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> Thank you for the quick response. I did compile it with the default
>> build
>>>> settings and also tried a clean build but the errors persist. I have
>>>> attached the CMakeCache as well as the build log. I hope that helps.
>> Thank
>>>> you.
>>>> 
>>>> Regards,
>>>> Bob
>>>> 
>>>> http://pasteall.org/855418 (CMakeCache)
>>>> http://pasteall.org/855426 (build log)
>>>> 
>>>> On 4 March 2018 at 04:01, Brecht Van Lommel <brechtvanlommel at pandora.be
>>> 
>>>> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> This is the right place, since recently we have
>>>>> https://devtalk.blender.org/c/blender/building-blender as well.
>>>>> 
>>>>> * Are you compiling with the the default build settings, or did you
>>>> change
>>>>> any CMake configuration?
>>>>> * Try a clean build by removing the "build_darwin" folder and then
>>>> running
>>>>> "make update && make".
>>>>> * If it still fails, please attach the complete build log and
>>>>> build_darwin/CMakeCache.txt.
>>>>> * Which Xcode version do you have installed? Did you install another
>>>>> compiler (with macports, hombrew, ..)?
>>>>> 
>>>>> Regards,
>>>>> Brechts.
>>>>> 
>>>>> 
>>>>> On Sun, Mar 4, 2018 at 4:32 AM, Bob Geller <bobgeller401 at gmail.com>
>>>> wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> I'm not sure whether this is the right list but I'm having errors
>>>>> compiling
>>>>>> the latest blender source on a Mac. It seems to be an error with the
>>>>>> openimageIO library that is attached as a dependency. The relevant
>>>> errors
>>>>>> are shown here http://www.pasteall.org/855176 . I hope someone can
>>>> help
>>>>>> fix
>>>>>> this. Thank you.
>>>>>> 
>>>>>> Regards,
>>>>>> Bob
>>>>>> _______________________________________________
>>>>>> Bf-committers mailing list
>>>>>> Bf-committers at blender.org
>>>>>> https://lists.blender.org/mailman/listinfo/bf-committers
>>>>>> 
>>>>> _______________________________________________
>>>>> Bf-committers mailing list
>>>>> Bf-committers at blender.org
>>>>> https://lists.blender.org/mailman/listinfo/bf-committers
>>>>> 
>>>> _______________________________________________
>>>> Bf-committers mailing list
>>>> Bf-committers at blender.org
>>>> https://lists.blender.org/mailman/listinfo/bf-committers
>>>> 
>>> 
>>> 
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> https://lists.blender.org/mailman/listinfo/bf-committers
>> 
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers

-- 
Arto Kitula
arto.kitula at gmail.com






More information about the Bf-committers mailing list