yonaskolb / yonaskolb/XcodeGen

Framework added in a "wrong" way

Open
#567 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
8.8k
Forks
908
Avg merge
17d 14h
Merged PRs (30d)
2

Description

I have a project generated with XcodeGen that works fine. Now I am trying to add a proprietary AirWatchSDK. The main file is AWSDK.framework.

When I drag and drop AWSDK.framework to the project manually, it gets added and builds just fine.

But when I use XCodeGen:

dependencies:
    - framework: SDKs/AirWatch/AWSDK.framework

The generated project looks fine, the AWSDK.framework appears in the right place, also SDKs/AirWatch/ is part of the framework search path but trying to build I get

ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _sha1_block_data_order from SDKs/AirWatch/AWSDK.framework/AWSDK(sha1-x86_64.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
...
ld: unexpected bindingNone in '_sha1_block_data_order' from SDKs/AirWatch/AWSDK.framework/AWSDK(sha1-x86_64.o) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is a very strange error I could not find any reasonable info about.

I do not think something is wrong in the configuration when manually adding the framework works, just having the addition generated by XcodeGen results in this error. So it must be something in the way XcodeGen adds the framework to the project.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the generated project using the shown dependencies entry and compare its framework and linker settings with a project where SDKs/AirWatch/AWSDK.framework was added manually. Inspect the generated project’s treatment of AWSDK.framework and the reported x86_64 linker failure; done means the generated project builds successfully with the proprietary framework.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift, yaml
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.