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
Kitura 0.13.6 doesn't build in Xcode #472
Comments
@michalkalinowski- There is no need to force link curl. Usually the problem is solved by deleting .build and Packages, rebuilding the application, and then doing a swift build -X to create the XCode project. There may have been some stuff remaining from older builds of the application. In general when one wants to upgrade versions of dependencies with Swift Package Manager, one must delete the Packages directory. |
I did one more test:
I get the same linker error. in #463 adding |
@michalkalinowski- I appear to have been mistaken above. I can build KituraSample using XCode. I can't build Kitura using XCode. I'm trying to understand what if any differences exist between the generated XCode projects. |
What's funny with error, is that if one looks at the log, one sees that CHttpParser.dylib was built correctly and placed into the XCode build directory, which is not BTW ${SRCROOT}/.build/debug. Having said that the link of Kitura-net fails, even though the link seems to include the CHttpParser.dynlib file. |
Kitura-Sample depends on |
@michalkalinowski- I believe it had something to do with SPM bug: https://bugs.swift.org/browse/SR-1444 (still being unresolved), particularly w/ the 05-03 snapshot. I got a weird error when using the Snapshot 05-03 for an iOS experiment (which wasn't happened in the 04-25). |
@michalkalinowski- Which Kitura-Sample did you take? The one in the develop branch prereqs 0.13.X of Kitura.... In fact the Kitura-Sample in master shouldn't even run of 05/03 drop of Swift. |
@aquarchitect The issue with Kitura-TemplateEngine was solved in Kitura issue #459. If one is using the develop branch of Kitura et. al (i.e. 0.13.x) then the fix should be there. |
I spent a little while yesterday trying to build different tags of Kitura-net with no luck. They all fail with the linking problem that makes me think it may be an issue with Xcode 7.3.1 I'll try to install 7.3 and try to build again this evening @shmuelk I just had a look at Kitura-Sample Package.swift to understand your results, didn't try to build myself. |
I did some more testing. The issue doesn't lie within Xcode, it's the I'm able to build Kitura-net in Xcode 7.3.1 using For now steps to reproduce my findings:
Repeat the same steps but generate Kitura-net.xcodeproj with |
Ok, I've narrowed the problem down to CHttpParser package
|
This is a known issue we started seeing in 5/3. I don't believe there is a linker issue via CLI, only in Xcode. Please try the workaround in Step 2 in my recent blog post about contributing to Kitura. |
you're right, issue is only in Xcode. I'm aware of the workaround, but I'm trying to find a root cause of this error. |
Found it! New Kitura fix:
It looks like they changed structure of project.pbxproj file, one of the changes is naming of frameworks (used to be lib[nameOfFramework] and now they removed lib) Now for some strange reason, in case of CHttpParser which is just a modulemap and c files Xcode still looks under an old name. I can not explain that any further, but I'd say it's a bug with Xcode. |
Great work figuring that out @michalkalinowski!! Has any bug been filed yet for this issue? |
Closing this issue since a workaround for CHttpParser has been documented on the wiki. If you have a fix for the Xcode project generation, you should open a bug at bugs.swift.org or submit a PR against the Swift Package Manger. |
Hello,
Bringing this issue to a wider audience. Originally reported in Kitura-net:
Issue #28
Building Kitura 0.13.6 using
swift build
works ok. However when building from Xcode following error is returned when linking Kitura-net:ld: library not found for -lCHttpParser for architecture x86_64
Xcode: 7.3.1 (7D1014)
Toolchain: Swift Development Snapshot 2016-05-03 (a)
I have previously installed and force-linked curl with
brew install curl && brew link curl --force
The text was updated successfully, but these errors were encountered: