I've tried installing xcodeproj version 0.8.1 and 0.0.9 and I get the same error on installation:
checking for CoreFoundation... no
checking for main() in -lCoreFoundation... no
CoreFoundation is needed to build the Xcodeproj C extension.
I'm using rvm ruby 2.0.0-p247 on Mac OS X 10.8.4 with Xcode 4.6.3 installed.
If I download the source, I see the same error from rake ext:build. Any ideas?
I think this looks like an upstream bug in RVM. I found the following options crept in to the mkmf options:
I think this is the first RVM that I've used that did a binary distribution of ruby... I'll investigate further.
Perhaps not RVM. I've reinstalled ruby and the Xcode command line tools. It still fails. I've discovered that the "-Z" flag seems to cause the problem from RbConfig::CONFIG["LDFLAGS"]. Removing it allows me to build the gem locally. Adding:
Before unless have_framework('CoreFoundation') got me going.
The flag could be coming from RVM still...
You're not alone, I'm having the same issue (using rvm head). Haven't had time to investigate properly yet though.
I had the same problem, and I reinstalled ruby 2 from source with clang and everything works now:
rvm reinstall ruby-2.0.0-p247 --with-gcc=clang --verify-downloads 1
The verify-downloads part was needed coz rvm couldn't verify checksum of rubygems when I tried to reinstall ruby 2. YMMV
Thanks. I had to completely remove xcodeproj and reinstall. Simply doing gem pristine xcodeproj wasn't enough, although it claimed to have rebuilt the native extensions correctly. It's all working now though.
gem pristine xcodeproj
Thanks! Helped me too.
Remove -Z linker flag to avoid missing CoreFoundation compile error
Refer Issue #80
Fixed by #86.