Compiling latest branch on MacOS fails (undefined symbol)

Great, thank you very much. Seriously!

Libraries have been updated (https://developer.blender.org/rBL62590). So you could now try running make update.

I just tried now and I get another build error (at around 50% of the build) unrelated to python. I removed the build folder but the error with cryptomatte remains:

/blender/nodes/composite/nodes/node_composite_cryptomatte.cc:62:33: error: call to unavailable member
      function 'value': introduced in macOS 10.14
  BLI_remlink(&n.entries, entry.value());
/blender/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc:63:19: error: call to unavailable member
      function 'value': introduced in macOS 10.14
  MEM_freeN(entry.value());

That was fixed in https://developer.blender.org/rB87da26404f26a482365319681d699c73e032113c
but there was a better way https://developer.blender.org/rB9734a78bc81b0565d605577ea9a9ff9752b50d13
CC @JeroenBakker

Edit: actually not so better as the older commit had caused error on windows too.

Ok, the cryptomatte error is gone but compilation still fails with respect to python.
See error below:

Undefined symbols for architecture x86_64:
  "___isPlatformVersionAtLeast", referenced from:
      _py_posix_spawn in libpython3.9.a(posixmodule.o)
      _posixmodule_exec in libpython3.9.a(posixmodule.o)
  "_preadv", referenced from:
      _os_preadv in libpython3.9.a(posixmodule.o)
  "_pwritev", referenced from:
      _os_pwritev in libpython3.9.a(posixmodule.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [bin/Blender.app/Contents/MacOS/Blender] Error 1
make[2]: *** [source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

Edit: compilation actually works until the part where it does “Linking CXX executable” with python. Same as error I reported at the start of this thread.

1 Like

I can confirm the build still fails as @nantille said.

[100%] Linking CXX executable ../../bin/Blender.app/Contents/MacOS/Blender
Undefined symbols for architecture x86_64:
  "___isPlatformVersionAtLeast", referenced from:
      _py_posix_spawn in libpython3.9.a(posixmodule.o)
      _posixmodule_exec in libpython3.9.a(posixmodule.o)
  "_preadv", referenced from:
      _os_preadv in libpython3.9.a(posixmodule.o)
  "_pwritev", referenced from:
      _os_pwritev in libpython3.9.a(posixmodule.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [bin/Blender.app/Contents/MacOS/Blender] Error 1
make[2]: *** [source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
1 Like

@dupoxy @nantille @ErikK It’s not recommended that you use binaries from anyone on the Internet.
https://developer.blender.org/F9865901
Replace blender/…/lib/darwin/python folder with this one and it may fix the build error.
After the libraries land in svn, remove that python folder, and run make update to start using official ones.

@ankitm thanks for your answer but you’re puzzling me. Of course using binaries from anyone is unsafe. If I understand correctly, you give us a general warning but you give us binaries assuming we trust you so that we fix the issue as you said? Nothing wrong with it but I want to confirm I got it right.

Is it a temporary fix (meaning we can wait for the lib to land) or is it something that we will have to do even after the libraries land in svn?

I built the libraries to see if they work. They worked for macOS 10.14.6 at least (2 more people confirmed in chat)… then figured it might take until next week to get SVN libs landed. So I shared them here too in case something important is stuck.

It’s a temporary fix.

1 Like

Perfect, thanks!

Also thanks for mentioning this thread in Blender 2.9 CUDA on Mac. I also have this CUDA issue, worth having a look if this can be solved (but less important).

It does work with the temporary binaries you proposed. Thanks @ankitm

1 Like

I can confirm this works for macOS 10.13.6 also with https://developer.blender.org/F9865901 temporary fix. Thanks @ankitm.

1 Like

@sebbas any update ?
I’m unable to build on macOS 10.13.6 with the provided Libraries.

3 Likes

Platform maintainers decided to build all intel dependencies on an older macOS, or at least with an older Xcode version to avoid such issues with any other dependency. There’s no time frame about it AFAIK.
A maniphest task to track the progress would indeed be good.

1 Like

Thanks for sharing. I was wondering when I’d be able to build Blender 2.93 again. (Build failed a couple of minutes ago.)
So I’ll wait.

Out of curiosity, the experimental builds are running fine on my system (macOS 10.13.6). I was under the impression that the git-version is the one used to compile them as well. (The build failed a couple of minutes ago with the error that started this thread.)

Apparently it’s only a build issue, not a runtime issue.

@sebbas @all Is this still in progress ??

@dupoxy It certainly doesn’t seem to be fixed.

Specifically, I still see the same linker errors about ___isPlatformVersionAtLeast etc when building from head, using XCode 10.3 (on OSX 10.14.6, FWIW).

If I replace the python libraries with the libraries that @ankitm supplied then the build succeeds.

1 Like

Just curious, just in case I start building my own versions…
Are these errors happening because of some trying to build for old versions of MacOS?
I’m assuming that the current and working builds for BIG Sur, like on Blender’s download page, aren’t having these issues.

Tim