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

unable to build project #229

Closed
steveschow opened this issue Mar 13, 2016 · 5 comments
Closed

unable to build project #229

steveschow opened this issue Mar 13, 2016 · 5 comments

Comments

@steveschow
Copy link

I followed the instructions in the read me.

git clone --recursive git://github.com/codykrieger/gfxCardStatus.git

Open the project in Xcode 6.2, attempt to build it, get the following linker error:

ld: library not found for -lPods-gfxCardStatus-JRSwizzle clang: error: linker command failed with exit code 1 (use -v to see invocation)

@CarlQLange
Copy link

Same here.

@steveschow
Copy link
Author

steveschow commented Apr 26, 2016

I was able to get the debug version to build, but not release as of yet. Basically there is a sub project that needs to be built, which appears to be not configured to do so in the main Xcode project. I don't know that much about Xcode, so this is straining my brain to figure out honestly, but if you go into the Pods sub folder you will see an Xcode project. Open it and build it as DEBUG. Then go find the library binaries it builds and copy them into the DEBUG destination for gfxCardStatus. There are four of them:

libPods-gfxCardStatus-JRSwizzle.a libPods-gfxCardStatus-libextobj.a libPods-gfxCardStatus-ReactiveCocoa.a libPods-gfxCardStatus.a

After that go back to the main gxCardStatus Xcode project and build DEBUG. Worked for me. However it did not work for me on the release build, I got some errors about some kind of another incompatible lib, I will try to figure out later when my brain doesn't hurt.

I think probably the main gfxCardStatus Xcode project needs to be updated to included information about the sub project, both how to build it first, as well as including the lib subproject lib binaries in the library search path for the main app build. Unfortunately I am not knowledgeable about Xcode to do that at this time.

@steveschow
Copy link
Author

this is the error when trying to build release version in case anyone knows solution:

error: -fobjc-arc is not supported on platforms using the legacy runtime
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

i get the same error while trying to build the Pods subproject as release also.

@socketbox
Copy link

Late to the party, but maybe someone else who happens upon this will get some use out of the instructions below. Caveat: I've got very little Xcode/Obj-C experience.

NB: I'm running XCode 7.3.1 under 10.11.5 on an early-2011 MBP 15"

At any rate, here's what I did. Again, I'm not at all sure if I've gone in the right direction, because some of the changes I've made were quite drastic in terms of dependencies. I hope that someone with more knowledge who's following the project will point out my mistakes.

  1. Installed Cocoapods using Homebrew
  2. git clone https://github.com/codykrieger/gfxCardStatus.git
  3. cd ./gfxCardStatus
  4. Edited the Podfile such that ReactCocoa was brought up to its latest version (4.2.1) and that libextobjc was eliminated as a pod (I add it back later as a git submodule).
  5. pod install
  6. git submodule add https://github.com/jspahrsummers/libextobjc.git
  7. Opened XCode and from File menu, chose Open... and selected the gfxCardStatus.xcworkspace file (not the .xcodeproj file)
  8. With gfxCardStatus selected in the Project navigator, set Deployment Target (under the General tab/screen) to the desired version of OS X. Repeated same with Pods project selected.
  9. In the Code Signing section of the Build Settings tab, selected Don't Code Sign for Release (NB: do this as well for the Target of gfxCardStatus while you're in Build Settings)
  10. In the Architectures section of the Build Settings tab, selected Standard Architectures (64-bit Intel) for Architectures; eliminated i386 as a Valid Architecture in same section. Repeated the same procedure with Pods project selected.
  11. In the Issue navigator, under the gfxCardStatus.xcodeproj item, selected Update to recommended settings, then chose Perform Changes and Continue
  12. Checked the Deployment section of Build Settings tab once again, for both projects, in order to ensure that the value selected jibed with that chosen earlier.
  13. Edited [GSMenuController.m](https://github.com/socketbox/gfxCardStatus/blob/master/Classes/GSMenuController.m), gfxCardStatusAppDelegate.m such that rac_signalForKeyPath is no longer called, but rather rac_valuesForKeyPath.
  14. Once again, ensured that Don't Code Sign is configured for all projects and targets (there's got to be a less tedious way of changing the same flag across all configurations).
  15. Product menu, Clean.
  16. Product menu, Build.
  17. Product menu, Archive.

Hope this helps.

@codykrieger
Copy link
Owner

Tip-of-tree gfxCardStatus now builds like a champ—just open the .xcworkspace and hit ⌘B.

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

4 participants