Hi! I hope I’m writing in the correct section. I’ve been given a mac for my work and I’m trying to configure it. What I’m trying to do is to have gazebo running, step by step.
This is going to be a specific macos question about a command not found.
Right now I’m trying to make an apple version for the ogre3d package, and I’m willing to merge it into mainstream when is finished. I’m almost finished, but at the end of the compilation, I get the error
/bin/sh: ditto: command not found
I’ve tried many times but I cannot find the proper nix package that includes ditto. Do you have any ideas where I can find it?
unfortunately ditto is one of those commands that Apple has never released the source code for. ditto is used rarely enough that we have been able to get away with not having it for the most part. However, it looks like ogre3d uses ditto pretty extensively. Perhaps we can make a fake wrapper for it. I think it is pretty close to rsync and perhaps that would work? You can try something like this:
Another thing to try would be to replace “ditto” commands in ogre3d with “/usr/bin/ditto”. It’s impure but in this case might be acceptable as a quick fix.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_NSArray", referenced from:
objc-class-ref in OgreOSXConfigDialog.mm.o
"_OBJC_CLASS_$_NSDictionary", referenced from:
objc-class-ref in OgreOSXConfigDialog.mm.o
"_OBJC_CLASS_$_NSMutableArray", referenced from:
objc-class-ref in OgreOSXConfigDialog.mm.o
ld: symbol(s) not found for architecture x86_64
togheter with a lot of warnings about DEPLOYMENT_RUNTIME_SWIFT being undefined.
/nix/store/pdhxr5a7qqqq8ld64ahfapn8kv8gn48i-swift-corefoundation-private/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:154:5: warning: 'DEPLOYMENT_RUNTIME_SWIFT' is not defined, evaluates to 0 [-Wundef]
#if DEPLOYMENT_RUNTIME_SWIFT
I understood that you want to define DEPLOYMENT_RUNTIME_SWIFT when you are using the open source version of swift and undefine it if you want the OBJECTIVE_C runtime for swift. I even wonder if I really need this at all…
Anyway, do you have any idea what am I doing wrong with this core foundation framework?
The DEPLOYMENT_RUNTIME_SWIFT can probably be ignored. You could add something like NIX_CFLAGS_COMPILE="-DDEPLOYMENT_RUNTIME_SWIFT=0"; to fix the warning (no difference in code generation though).
You might need -lobjc to fix the undefined symbol error. It should be available from darwin.objc4. You can do this with:
NIX_LDFLAGS="-lobjc";
I don’t know why that’s not included by default though.
@basvandijk I see you’ve reported the failure upstream. If adding cf-private fixes it, it’s probably a Nix-specific issue, since the way Nix splits apart frameworks and stuff is kind of specific to it. If you were building using Apple’s CLT or Xcode you probably wouldn’t have the issue.
@qyliss THANK YOU! I already tried it but I was mixing it with other versions of CF and that’s probably why I couldn’t make it work.
I still have some problems liking AGL, but it seems a problem of the source CMakeFile.txt that I can quickly fix using sed. I will make a pull request on the main repo once I finish it so others can install ogre on their OSX using nix.