Kapeli / Dash-iOS

Dash for iOS was discontinued. Please check out Dash for macOS instead.
https://kapeli.com/dash
Other
7.13k stars 926 forks source link

Build Failed for v1.6.0, Xcode 8.2 #28

Closed RegalMedia closed 7 years ago

RegalMedia commented 7 years ago

While following the installation instructions using either the master branch, or 1.6.0 tag, building the workspace shows some build errors. Building the main Dash project in the workspace directly to an iPhone 6s shows a link error. Each dependency builds correctly though. libPods-Dash builds correctly, but think the actual output folder doesn't match where the project is looking for it.

As a workaround, had to copy the output from Dash-iOS/build/Debug-iphoneos to Dash-iOS/Dash/build/Debug-iphoneos. Then it builds/runs fine. Couldn't figure out how to fix the project or podfile setup.

/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/Dash.app/Dash
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/AutoCoding'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/DTBonjour'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/DZNEmptyDataSet'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/GZIP'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/JGMethodSwizzler'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/KissXML'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/MRProgress'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/NSTimer-Blocks'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/Reachability'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/SAMKeychain'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/UIActionSheet+Blocks'
ld: warning: directory not found for option '-L/Users/XYZ/Projects/Dash-iOS/Dash/build/Debug-iphoneos/UIAlertView+Blocks'
ld: library not found for -lAutoCoding
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Kapeli commented 7 years ago

Weird. Has anyone else had this problem? It seems to work fine for me.

aamck commented 7 years ago

Has anyone else had this problem?

1.6 builds & runs on a 6S for me with non of the mentioned errors.

RegalMedia commented 7 years ago

Bizarre. Reinstalled Xcode, deleted the local workspace, checked out the branch from Github again, updated the Bundle ID and chose my developer account in the Dash iOS project settings. That's as completely "from scratch" as I could try...and I get the same issue. Using Xcode 8.2 on El Capitan.

Right "out of the box" Dash iOS builds to (and looks for dependencies) in: workspace/Dash/build/Debug-iphoneos

Pods project builds to: workspace/build/Debug-iphoneos/

To fix, I changed the Build Products Path in the Pods project from ../build to ../Dash/build. This allows the linker to find the built pods, and everything works fine.

SYMROOT = "${SRCROOT}/../build"
SYMROOT = "${SRCROOT}/../Dash/build"

Not sure what the heck I'm doing wrong here, or what's wrong with my setup. Isn't cocoapods supposed to make this just work? smirk Even tried updating my cocoapods installation and running an update...didn't make a difference. Grasping at straws...this an issue with my Derived Data maybe?

Where do you see the build artifacts get created on your system?

RegalMedia commented 7 years ago

Bingo! Found the root cause. While my Derived Data location was set to Default in Xcode preferences, in the Advanced... settings, the Build Location was set to Legacy which uses the target settings for the build path. I changed the advanced setting to Unique, which builds all projects' output in the same location somewhere in DerivedData, and lo and behold...no problems! Just works! Thanks. My bad. Closing the issue.

Kapeli commented 7 years ago

This means that the build products path wasn't set correctly in Dash. I think I fixed it.