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

DeepSpeech iOS Compile Error in XCode 12.4 #3525

Closed
erksch opened this issue Feb 10, 2021 · 17 comments
Closed

DeepSpeech iOS Compile Error in XCode 12.4 #3525

erksch opened this issue Feb 10, 2021 · 17 comments
Assignees

Comments

@erksch
Copy link
Contributor

erksch commented Feb 10, 2021

Hey there!

I am currently integrating the DeepSpeech iOS framework into an App.
I downloaded the ios framework from task cluster on tag 0.9.3.

With XCode 12.4 and swift 5.3.2 I am getting the following compile error:

module compiled with Swift 5.1.3 cannot be imported by the Swift 5.3.2

Here are some issues / resources on that

https://stackoverflow.com/questions/58654714/module-compiled-with-swift-5-1-cannot-be-imported-by-the-swift-5-1-2-compiler

aws-amplify/aws-sdk-ios#2365 (Similar issue for AWS SDK)

I guess a quick fix would be to update the XCode in CI that builds the releases to 12.4.
Other sources suggest adding the flag BUILD_LIBRARY_FOR_DISTRIBUTION=YES in the build process.

  • Have I written custom code: Made a new project and added the framework
  • OS Platform and Distribution: macOS Big Sur Version 11.2 on Mac Mini
@lissyx
Copy link
Collaborator

lissyx commented Feb 10, 2021

I guess a quick fix would be to update the XCode in CI that builds the releases to 12.4.

That's actually not a quick fix

@lissyx
Copy link
Collaborator

lissyx commented Feb 10, 2021

Other sources suggest adding the flag BUILD_LIBRARY_FOR_DISTRIBUTION=YES in the build process.

I have no idea where to do that. @reuben maybe?

@zaptrem
Copy link
Contributor

zaptrem commented Feb 11, 2021

BUILD_LIBRARY_FOR_DISTRIBUTION=YES

@erksch I added that to the framework's build settings in Xcode a while ago and it started working for me. If you want, you can download the framework from my repo here.

However, the framework crashes completely on iOS when files are too long. I've been trying to fix the issue and provide information here, but the devs haven't commented on this significant issue in nearly a month in a half. I proposed a potential fix in the most recent comment, but it isn't quite working so I haven't opened a PR yet. Would you be willing to take a look at it?

@lissyx
Copy link
Collaborator

lissyx commented Feb 11, 2021

I added that to the framework's build settings in Xcode a while ago and it started working for me.

You should make a PR then.

@zaptrem
Copy link
Contributor

zaptrem commented Feb 11, 2021

I added that to the framework's build settings in Xcode a while ago and it started working for me.

You should make a PR then.

I would, but I don’t know whether the Xcode GUI settings interact with your build system or if I have to modify some script somewhere.

@lissyx
Copy link
Collaborator

lissyx commented Feb 11, 2021

I added that to the framework's build settings in Xcode a while ago and it started working for me.

You should make a PR then.

I would, but I don’t know whether the Xcode GUI settings interact with your build system or if I have to modify some script somewhere.

And I have no idea where this needs to be applied: env variable, config?

Please open a PR, we can help you, it's better than letting issues like that lay around.

@lissyx
Copy link
Collaborator

lissyx commented Feb 11, 2021

@zaptrem
Copy link
Contributor

zaptrem commented Feb 11, 2021

I added that to the framework's build settings in Xcode a while ago and it started working for me.

You should make a PR then.

I would, but I don’t know whether the Xcode GUI settings interact with your build system or if I have to modify some script somewhere.

And I have no idea where this needs to be applied: env variable, config?

Please open a PR, we can help you, it's better than letting issues like that lay around.

Maybe I misunderstood how PRs work? I thought I’m only supposed to open one when I’ve built the feature/fix (like I did when I submitted the last commit changes to that Swift folder you linked to). What’s it supposed to look like when there is no change yet?

If I’m not misunderstanding you I’ll definitely submit it, but it’s 4:30am here (I wanted to see if I could catch Reuben while he was awake/online for the other issue) so I’ll do it tomorrow.

@lissyx
Copy link
Collaborator

lissyx commented Feb 11, 2021

Maybe I misunderstood how PRs work? I thought I’m only supposed to open one when I’ve built the feature/fix (like I did when I submitted the last commit changes to that Swift folder you linked to). What’s it supposed to look like when there is no change yet?

We can discuss on this issue, and then you can open the PR, for example. But I really really hate it if you know a fix, and we have other people facing an issue than can be solved by that fix.

but it’s 4:30am here

I guess you should be sleeping :)

I wanted to see if I could catch Reuben while he was awake/online for the other issue

Reuben and myself are on the same timezone, and it's 10:47 now, but I know he's working on other things and I'm unsure he has time in the next hours / days to look at that. But when he can, I know he will look at it, no worries. It's not we don't care, it's just we lack of time (and we still have to babysit the macOS CI infra, which is painful ...)

@reuben
Copy link
Contributor

reuben commented Feb 11, 2021

I added that to the framework's build settings in Xcode a while ago and it started working for me.

You should make a PR then.

I would, but I don’t know whether the Xcode GUI settings interact with your build system or if I have to modify some script somewhere.

Our CI simply calls xcodebuild which respects the GUI settings.

@lissyx
Copy link
Collaborator

lissyx commented Feb 12, 2021

Fixed in #3527

@lissyx
Copy link
Collaborator

lissyx commented Feb 12, 2021

@erksch @zaptrem If this is required on 0.9, please send matching PR.

@zaptrem
Copy link
Contributor

zaptrem commented Feb 12, 2021

Or just download it here and drop it in: https://community-tc.services.mozilla.com/tasks/DoV-Ms9WRNKXsC_1yTPBxA

@lissyx
Copy link
Collaborator

lissyx commented Feb 12, 2021

Or just download it here and drop it in: https://community-tc.services.mozilla.com/tasks/DoV-Ms9WRNKXsC_1yTPBxA

Yes, but PRs artifact expires after seven days, merges artifacts expires after a bit more, but quite quickly.
And that does not change the fact it's only on master, while the original report was on 0.9.3, though I'm unsure we would release a new stable version for just that, we could do a new alpha on master.

@zaptrem
Copy link
Contributor

zaptrem commented Feb 12, 2021

Whatever's easiest. A new alpha would probably be fine as afaik there haven't been any breaking changes for a while now.

If not, I can make the changes again and resubmit tomorrow.

@erksch
Copy link
Contributor Author

erksch commented May 23, 2021

Just came back to this and saw that there are no artifacts from the task cluster that have run the BUILD_LIBRARY_FOR_DISTRIBUTION=YES configuration, I think. Is there a build available that was run with that configuration? Otherwise, a new alpha on master would be very helpful.

@lissyx
Copy link
Collaborator

lissyx commented May 23, 2021

Taskcluster has been decommissioned, you would need to add github actions support for iOS bindings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants