Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error #18

Closed
pikaboo opened this issue Aug 14, 2015 · 10 comments
Closed

compile error #18

pikaboo opened this issue Aug 14, 2015 · 10 comments

Comments

@pikaboo
Copy link

pikaboo commented Aug 14, 2015

Hi Krzysztof,

I came across your library, and it seems great, but i am having some trouble making it work.

I get the following error from kicker

Couldn't load index file '/Users/Lena/.dyci/index/a3786fe6a1527268bf426a811b5b0718' ("/Users/Lena/Dev/TestProjects/iOS/testxibstoryboard/testxibstoryboard/Playground.m"). Use default compilation instead

Failed (1)
KZPlayground: Recompiled Playground.m

Do you know why it doesnt compile and how to fix it?

@krzysztofzablocki
Copy link
Owner

looks like a dyci error, make sure you have newest version installed and xcode-select path matches the one you are using in your IDE, look at #4 for more info

@inetfuture
Copy link

Same problem here, just installed, so it's newest.

My xcode-select -p showing: /Applications/Xcode.app/Contents/Developer

But how do check which one is my Xcode using?

@krzysztofzablocki
Copy link
Owner

each time you install xcode you need to install dyci again, check out their github for all instructions.

@inetfuture
Copy link

Actually dyci broke my Xcode on the first installation by following their instruction, it stuck on indexing forever, then I replaced my old Xcode.app with a newly downloaded Xcode6.4.dmg, then reinstall dyci, it works again, but I don't know what was wrong, it's like a black box to me.

I do read all the docs or issue discussion available, still, frustrated. Must be something wrong with my environment, I have a fuzzy memory about how I get Xcode installed at the beginning.

@trzeciak
Copy link
Contributor

Hey Aaron,
after you again reinstall all :-),
try install dyci with sudo, like:

git clone https://github.com/DyCI/dyci-main.git
cd dyci-main/Install/
sudo ./install.sh

Because i think you no have permission to change clang in:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

Before, you make backup part of XCode:

cp -r /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr usr

(Restore:)

sudo cp -r usr /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr

@inetfuture
Copy link

@trzeciak

I didn't use sudo at the first try, maybe that's why it broke Xcode. And I didn't have any backup, so I have to reinstall Xcode, which is done by download a dmg and replace Xcode.app, without root permission used. So I don't think sudo is required after the installation, the output of ./install.sh says everything is ok.

Let me clear the story:

  • I installed Xcode somehow months ago, most probably by App Store
  • Found this awesome KZPlayground, try to play with it
  • Clone dyci-main, cd /Install, run ./install.sh as it documented, it complains about permission denied, run it again with sudo
  • Go back to Xcode, can't compile, neither normal project nor KZPlayground project, restart, hang on indexing forever, clear derived data, didn't work
  • Don't know what ./install.sh did, and don't have to investigate it, try to reinstall Xcode
  • All references say something about call uninstall-devtools, but I can not find it, even with a global search, decided to ignore it, downloaded a dmg, delete old Xcode.app, replace with the new one.
  • Xcode works again, try ./install.sh again, without sudo, normal project works, KZPlayground can be used by Ctrl + X, no luck with kicker monitoring

😞

@trzeciak
Copy link
Contributor

Xcode works again, try ./install.sh again, without sudo, normal project works, KZPlayground can be used by Ctrl + X, no luck with kicker monitoring
Well, ok.

For correct operation of kicker you need:

  • kicker (sudo gem install kicker)
  • File: .kick in your project root directory (like: .kick)
  • run kicker in your project root directory:
    kicker -sql 0.05 ./

NOTE: To validate the installation dyci you can run:

@:~/> file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang.backup
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang.backup: Mach-O 64-bit executable x86_64
@:~/> 

@bioshrek
Copy link

bioshrek commented Mar 4, 2016

I think I found the solution.

In the handler file .kick, we should remove double quotes when passing arguments to dyci-recompile.py.
With the double quotes, we will get a wrong md5, which can't match the index under folder ~/.dyci/index/.
That is changing following code
execute("/usr/bin/python #{File.expand_path("~/.dyci/scripts/dyci-recompile.py")} '#{"\"%s\"" % File.expand_path(file)}'")
to
execute("/usr/bin/python #{File.expand_path("~/.dyci/scripts/dyci-recompile.py")} '#{"%s" % File.expand_path(file)}'")

I've tried it. It worked.

@krzysztofzablocki
Copy link
Owner

@inetfuture @trzeciak can you guys confirm it works for you?

@bQvle
Copy link

bQvle commented Dec 1, 2016

@krzysztofzablocki I can confirm that it solved the issue for me. I think you should remove the double quotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants