How to build costume SkeletalControls on Mac, since "editor" schemes doesn't work on Xcode?

Hi,

I have successfully created a custom SkeletalControl in windows and I was trying to compile the same code for Mac.

Since these nodes are made of a runtime part and an editor part (Atimnode and AnimGraphNode) I have created two modules, one that compiles only the runtime part for when compiling the game and one that include the node UI for when compiling for the editor.

When compiling only game, Xcode succeed, but it fails when compiling for the editor making impossible to use my custom SkeletalControl in UEEditor and make something with it.

I have noticed in a different question that a staff member explicitly said that compiling for editor doesn’t work!
ā€œPlease choose the ā€œEdit Schemesā€ option and ensure that the one you’re using is set to an option that does not include the word ā€œEditorā€, as those do not work for OSX developmentā€

If this is true, then how am I supposed to do any custom AnimNode on Mac and use it in my project?

Cheers,

Hello daniele_niero,

I apologize for the confusion from that other post. I was under the impression that the build configurations worked for Mac in general but that restriction should only apply to building for iOS platforms. You should be able to build for ā€œEditorā€ configurations when building for Mac itself.

Hi and thanks for your reply.

Ok so I’m definitely doing something wrong, which is better because it means I can fix it :slight_smile:
Unfortunately I never worked with Xcode before, so I’m a little bit lost…

If you or one of your colleagues want to see the project and try, I have it on bitbucket:

It is very small. I created just for testing my first skeletal control.

I can’t post here my whole error log, because I don’t have enough characters available, but this is the relevant part:

clang: error: no such file or directory: ā€˜/Users/Shared/UnrealEngine/4.11/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor-Core.dylib’
clang: error: no such file or directory: ā€˜/Users/Shared/UnrealEngine/4.11/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor-CoreUObject.dylib’
clang: error: no such file or directory: ā€˜/Users/Shared/UnrealEngine/4.11/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor-Engine.dylib’

For Xcode there are more missing files on the same directory…

Thank you,

If you need to post your whole log, you can do so in the form of a text file. It can be attached to your comment. From those error messages it says you’re using 4.11 while your question says 4.10. Are you compiling in the same version on both your PC and your Mac? Also, are you using Binary builds (from the launcher) or source-built builds from Github?

Hi,

I have tried 4.9, 4.10, 4.11

On windows no problems whatsoever, on Mac all sort :slight_smile: In any case I’m using the Binary builds in both platforms.

Just to be sure I have explained correctly the issue, Xcode fails to compile only when I use an ā€œeditorā€ scheme, otherwise it compiles.

So the previous error was related to an issue with my Unreal installations.
Cleaned up and re-installed Unreal and then tried to build again.

The result is that building messed up again my unreal installation as if it tries to build Unreal as well… now in the installation directory UEEditor.app is gone.

To create the XCode project I right-clicked my .uproject file and went to Services->Generate XCode Project.
The |I simply opened, be sure the scheme is Development Editor and pressed cmd+B…

The all build report has been attached.
link text

Is there anybody that can try this on your side? as I said the code is available on BitBucket.

It would take 10 minutes of your time.

I’ve tried compiling the project that you provided on a couple different macs and Binary builds but I’m getting the same result with the .dylib errors. If I try compiling the project with a source built engine however, I receive errors related to the source for your plugin, such as undeclared identifiers and missing constructors. Could you try downloading 4.9, 4.10, or 4.11 Preview from Github and see if you get these same errors? If so, it may be able to point you in the right direction.

Have you had a chance to give any of those source builds a try as of yet? I’d be interested to know what results you received.

Hi ,

I’m trying right now meanwhile I’m writing :slight_smile:

It seems I still have the same error, but I noticed in the very long log, that Xcode complains about some virtual functions not implemented and v-table.
This is not a warning nor an error in the log… I want to try to implement more virtual function and see if it compiles. Again, on Windows is not e problem if those functions are not implemented.

this is the part:
Undefined symbols for architecture x86_64:
ā€œvtable for FAnimNode_SkeletalControlBaseā€, referenced from:
UAnimGraphNode_ForelimbRolls::~UAnimGraphNode_ForelimbRolls() in AnimGraphNode_ForelimbRolls.cpp.o
UAnimGraphNode_ForelimbRolls::~UAnimGraphNode_ForelimbRolls() in AnimGraphNode_ForelimbRolls.cpp.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64

I’m still getting used to Xcode and how it reports errors, set variants etc…
I’ll keep you posted

Nothing to do, I keep having errors related to file existance…

Here is the build log

I have tried also to build only by command line, but I have the same result.
I tried this too: Generating Xcode project wrongly with source build engine on Mac - Platform & Builds - Epic Developer Community Forums
But it has no impact on the build output.

As I said I’m new to XCode and your build tools, making very difficult for me to even guess what is going on.

One thing I forgot to mention is that I’m on ā€œEl Capitanā€. I have no idea if this makes any difference.

Another thing. At some point I could see a different output in XCode, with proper errors related to my code, but as soon as I click on one of them, it disappear and it showed me again the same useless (at least for me) log. I have no idea why this happened, I must have tried to build a hundred times but I never seen again those errors…

The only thing that I can guess right now, is that the generated XCode project is wrong. Could it be?

Try adding ā€œAnimGraphRuntimeā€ to PrivateDependencyModuleNames in SkeletalControlsEditor.Build.cs

1 Like

Hi There,

This actually works, but only with the source code from github (I believe I’m on the 4.10 branch).
If I try to compile with a binary distribution of Unreal, it doesn’t work. I tried with 4.10.2 and 4.11 preview, both give me the same error.
ErrorLog

I want to be able to give this plugin to others that are not programmers, so this is actually an issue.

Beside that, could you please explain how to understand that ā€œAnimGraphRuntimeā€ was missing in PrivateDependencyModuleNames from the error log I had?
It really isn’t obvious to me, maybe because, as I said, I don’t know XCode. But really without you, I would have never guessed. :slight_smile:

The ā€œUndefined symbols for architecture x86_64ā€ error you had before means that your UAnimGraphNode_ForelimbRolls is using FAnimNode_SkeletalControlBase class, but your module does not link with a module that contains this class, which is AnimGraphRuntime. By adding AnimGraphRuntime to PrivateDependencyModuleNames you make SkeletalControlsEditor link to AnimGraphRuntime dylib

As for the new errors, I’m confused. You seem to have CircularlyReferencedDependentModules set up correctly, so it looks like something’s wrong with how we handle that in binary builds on Mac :confused: I’ll try take a closer look later today and get back to you when I know more.

Many thanks, I really appreciate the support! :slight_smile:

Also… is there a reason why building with the source code take always so much time even with a simple code like this one?
It is like if it compiles a piece of the engine every and each time I compile, even if I do a simple modification in only one of my files.

It shouldn’t be compiling any engine files. Do you have a log from building? If you give me more details, I should be able to explain this.

Sure, here it is

I’ve transform the original project in a plugin, but also the old one has the same ā€œissueā€ :slight_smile:

It doesn’t compile engine files, but recreates dSYMs as a workaround for some bug in OS X 10.10. We have a better solution for this in UE 4.11.

Hello daniele_niero,

It seems that ZeroEightSix has been able to fix this problem for you. I converted his comment to an answer and marked it as resolved due to this. If I’m incorrect, please comment to let me know and this will open back up for more responses

Have a nice day!

Hi,

The issue is solved only using the source from github, however it is not using a binary distribution.

I can keep working now, that for sure, and it 's great, but I would prefer to use the binary distribution at some point.

Have a nice day too!