Xcode not launching


    Oct 04 2020 | 6:43 pm
    Is anyone else using the C++ object dev kit on mac? I created a package but when I try to create an object with a name Xcode doesn’t open. In fact; nothing happens. Anyone any ideas? tks max 8.1.5 min-devkit 0.5.4

    • Oct 12 2020 | 3:32 am
      When I follow the readme instructions up to `cmake --build ..`, I get an error indicating that `mock_kernel_postBuildPhase.makeDebug` is missing.
    • Oct 12 2020 | 4:18 am
      The solution to my problem was downloading an older (10.1) version of Xcode. The Xcode project still uses the legacy build system and that causes a warning/error.
    • Oct 12 2020 | 4:47 am
      That simply allowed me to get further outside of Max. If, within Max, I open the min.dev patch and select an object to compile, Max crashes.
    • Oct 19 2020 | 5:47 pm
      I am seeing the same thing. A few debugging details for Cycling folks...
      When using the min-devkit launcher per and following along on the tutorial video, I click on the Compile Code step 2 and it is just silent. XCode never launches.
      I click on the button in Create a Package and the new package folder is created (I'm named it "weft" which is used below). I then go to Create an Object and do see my new package name in the menu. I click the button to create an object, supply a name and then nothing happens. Again, XCode never launches. However, when I look at the file system in Finder, I do see both the package and the object.
      I do see the following file:
      ~/Documents/Max 8/Packages/weft/tmp/min-cmake-log.txt
      with the contents:
      sh: /Users/<username>/Documents/Max 8/Packages/min-devkit/script/cmake-mac/bin/cmake: No such file or directory
      I do see cmake installed on my computer:
      $ cmake --version cmake version 3.18.4
    • Oct 19 2020 | 6:47 pm
      Little more debugging. This seems to be the reference to cmake that is out of sync with where files might be:
      ~/Documents/Max 8/Packages/min-devkit $ grep -r "cmake-mac/bin/cmake" . 
      ./source/projects/min.project/min.project.cpp: string cmake_path {"/script/cmake-mac/bin/cmake"};
      Binary file ./externals/min.project.mxo/Contents/MacOS/min.project matches
      ~/Documents/Max 8/Packages/min-devkit $ find . -name "cmake" -print 
      ./source/min-api/max-api/script/cmakepp/source/core/cmake
      ./source/min-api/max-api/script/cmakepp/source/formats/cmake
      ./source/min-api/max-api/script/cmakepp/source/cmake
      ./source/min-api/max-api/script/cmakepp/tests/formats/cmake
      ./source/min-api/max-api/script/cmakepp/tests/cmake
    • Oct 20 2020 | 3:10 pm
      here's what I can say to get you going with Min (terminal commands are for Mac, adjust if on windows)
      • don't use the Package manager version, instead clone from github (you can clone anywhere but easiest is probably Documents/Max 8/Packages folder). the branch tag is optional:
        • git clone --recursive https://github.com/Cycling74/min-devkit.git
      • ensure you are meeting all the necessary prerequisites
      • I had to make the following change to get the package creation script to run - open up the script/create_package.rb file in your favorite text editor, and insert a # (pound sign) at the beginning of line 69 and line 70 to comment them out, and then save the script file.
        • #FileUtils::cp "#{source_dir}/.travis.yml", "#{target_dir}/.travis.yml" #FileUtils::cp "#{source_dir}/appveyor.yml", "#{target_dir}/appveyor.yml"
      [edit: the above step should no longer be necessary if cloning from the tip of master]
      • to create a new package, run the setup script, passing the path to where you want your package to live: script/create_package.rb ../foo
      • this creates your starter package one level down and names it foo
      • cd into your new package directory build folder, and run cmake to test the build :
        • cd ../foo/build
          • On Mac - cmake -G Xcode ..
          • On Win - cmake -G "Visual Studio 16 2019" ..
      • Open the generated project (e.g. build/foo.xcodeproj) in your IDE and build the project. If you are working from inside the Max 8/Packages folder then the compiled external and help patch are already in the correct place to be found by max (Max 8/Packages/foo/externals)
      • To add your own object, follow the instructions here - https://github.com/Cycling74/min-devkit/blob/master/HowTo-NewObject.md
    • Oct 20 2020 | 6:06 pm
      Rob, thank you so much, I got everything up and running. Now that the environment is set up, I am eager to continue learning C++, min-devkit and the testing framework. I'd be happy to rerun any steps to test future changes to the repository.
      I got everything working per your instructions with one minor caveat. In order follow your instructions precisely I first attempted to "download" a release, but this resulted in an error in the final steps of the Ruby script. I then cloned the release and everything is working.
      Details follow below, including the unsuccessful attempt in case it can help anyone in the future searching for the same error messages in Google.
      Attempt 2 (Successful): Remove download and generated package from attempt 1, Clone the release tag, retry
      git clone git@github.com:Cycling74/min-devkit.git --branch v0.5.4
      Comment out lines and run the script:
      ~/Documents/Max 8/Packages/min-devkit-0.5.4 $ ruby script/create_package.rb ../weft
      This is successful.
      Running cmake from the newly created package's build directory also worked. And then I could open the project in Xcode.
      The build also succeeded, but with a warning. In the other post where I tried to build from the command line and it failed, I got the same message from within Xcode, but this time only as a warning while building the default hello_world object.
      Warning in Xcode that stopped a command line compilation/build.
      Warning in Xcode that stopped a command line compilation/build.
      And for final confirmation, I can create a [weft.hello-world] object in Max itself.
      Attempt 1 (Unsuccessful): Download the tarball file, move it into Max 8/Packages, extract contents
      Comment out lines and run the script:
      ~/Documents/Max 8/Packages/min-devkit-0.5.4 $ ruby script/create_package.rb ../weft
         CREATING PACKAGE weft
         SOURCE DIR: /Users/<username>/Documents/Max 8/Packages/min-devkit-0.5.4
          TARGET DIR: /Users/<username>/Documents/Max 8/Packages/weft
      fatal: not a git repository: /Users/<username>/Documents/Max 8/Packages/weft/source/min-api/../../.git/modules/source/min-api
      'source/min-api' does not have a commit checked out
      fatal: not a git repository: /Users/<username>/Documents/Max 8/Packages/weft/source/min-lib/../../.git/modules/source/min-lib
      'source/min-lib' does not have a commit checked out
      fatal: Failed to resolve 'HEAD' as a valid ref.
      I can verify that during this first attempt most of the Ruby script worked because the last call to its substitute_strings_in_file method did change the newly generated ReadMe.md contents to replace the default package name with "weft" (my package name).
      The first git command (git init) also appeared to work because I ran git status and saw untracked files.
    • Oct 20 2020 | 8:12 pm
      ah thank you for following up, I see now the release version doesn't include the package scripts!
      ok I've updated the post to suggest using git clone instead (make sure you're cloning recursively to include the sub-modules)
    • Oct 21 2020 | 12:54 am
      please add `git clone https://github.com/Cycling74/min-devkit.git --recursive` to step 0 of building. I figured out the travis, appveyor bit eventually but the need for --recursive is pretty subtle.
      Thank you! It works in the command line (the 13 Release tests still 'fail' but that doesn't seem to be of consequence), Max doesn't crash, and max opened the project when I selected the object on the compile page!
    • Oct 21 2020 | 4:58 pm
      thanks for confirming, I've updated the min-devkit readme as suggested.
    • Oct 23 2020 | 11:37 pm
      Thanks all for your help here. Im up and running!
    • Oct 25 2020 | 2:59 pm
      What are the exact steps to rebuild the object after I have edited the code? Because I am having issues where the changes are not showing up in Max.
    • Oct 26 2020 | 1:29 pm
      After building in Xcode, I just quit Max and restart it, then create the object as you would any object. Since my package is "weft" I would just create a new object [weft.hello-world] and it would show updated behavior.
    • Oct 26 2020 | 1:31 pm
      Ok tks. So you just build in Xcode, nothing with Cmake or anything?
    • Oct 26 2020 | 3:29 pm
      Yes, I just build with Xcode, though I am not very experienced with it. The only thing that has tripped me up is making sure the menu for the "active scheme" is set to the right thing. For example, if it is set to specifically build <something>_test and I intended to build the Max object itself.
    • Oct 27 2020 | 8:51 pm
      Ye I built with Xcode but after restarting Max, the object wouldn't show up when I typed it out. It never shows up with autocompletion.
      Eventually it shows up. But doesn't seem to be regular steps . Have to just wait until it shows up. Sometimes dragging the object from the package folder speeds it up.
    • Oct 28 2020 | 3:12 pm
      you have to make sure the external you are building is in the search path. this is why the min-devkit instructions recommend installing in your documents/max 8/packages folder, so that any externals build will already be in the correct place.
      alternatively you can add your package folder to the search path via Options -> File Preferences
    • Oct 30 2020 | 11:38 pm
      This is my path 'Max 8⁩ ▸ ⁨Packages⁩ ▸ ⁨min-devkit⁩ ▸ ⁨foo⁩ ▸ ⁨externals⁩'.
      This is wrong?
    • Oct 31 2020 | 12:02 am
      yes. it should be Max 8 / Packages / foo (your package name) / externals
    • Oct 31 2020 | 12:21 am
      ah ok, Whats the quickest way to change that path?
    • Oct 31 2020 | 7:42 pm
      What worked for me was to create the package using the Ruby script per the instructions above. So after doing the recursive clone of the min-devkit repo into Max 8/Packages, I changed directory into min-devkit and ran: ~/Documents/Max 8/Packages/min-devkit $ ruby script/create_package.rb ../foo
      I believe that passing "../foo" at the command line to the Ruby script sets up all the paths correctly and results in ~/Documents/Max 8/Packages/foo. Then from Xcode, when the project builds, the actual Max external object is in a place that Max's search path can find.
    • Oct 31 2020 | 8:10 pm
      Working like a charm now. The problem is I ran the create_package.rb ../foo from inside the script folder initially, so this time just ran ruby create_package.rb ../../foo
      Thanks all.