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

Failed to Compile; Includes inline assembly #19

Closed
Ghawken opened this issue Feb 9, 2021 · 8 comments
Closed

Failed to Compile; Includes inline assembly #19

Ghawken opened this issue Feb 9, 2021 · 8 comments

Comments

@Ghawken
Copy link

Ghawken commented Feb 9, 2021

Describe the bug
Hi Adam

Thanks for this code - it is one of few mqtt libraries that I have found that is able to run independently on WatchOS. (which I need)
Testing and working well on both iOS and WatchOS 7, stimulators and devices.. Yah!

Unfortunately when i upload to Testflight: I receive this error:

ITMS-90562: Invalid Bundle - Bitcode failed to compile for your watchOS binary because it includes assembly source code or inline assembly. To resolve this issue, rewrite the corresponding code in a higher-level language such as Objective-C or Swift and redeliver your app.

At a guess it relates to the CCoreMqtt code? -- although can't find anything obvious.
Any suggestions or thoughts?

(Should mention - no other libraries/pods/dependencies, other than those needed/include with mqtt-nio)

Thanks.

@adam-fowler
Copy link
Collaborator

Could be swift-nio-ssl. It does vendor a copy of boringssl. I'd have to have a closer look.

@Ghawken
Copy link
Author

Ghawken commented Feb 9, 2021

I think you are right - a quick google finds this

apple/swift-nio-ssl#251

Wonder whether I can remove altogether as not using SSL, very simple client MQTT connection (it is WatchOS afterall!)...

@adam-fowler
Copy link
Collaborator

I might be able to remove NIOSSL for watchOS builds, event for SSL builds. The iOS, watch OS builds don't use it, they use NIOTransportServices

@Ghawken
Copy link
Author

Ghawken commented Feb 10, 2021

Thanks - that would be great.

Meanwhile....
I discovered this fork:
https://github.com/daltonclaybrook/swift-nio-ssl/tree/watch-asm-macro

Set asm and removing all .s files.

I forked this repo; removed package swift-nio-ssl from Package.swift.
Installed (via Add Package Dependency)
Above repo:
https://github.com/daltonclaybrook/swift-nio-ssl/tree/watch-asm-macro
&
then forked mqtt-nio version, minus the standard swift-nio-ssl

So far, runs, and has uploaded without error. Seems to fix issue currently.

Obviously a bit messy; but hopefully a starting point.

@adam-fowler
Copy link
Collaborator

Do you want to try #20

@Ghawken
Copy link
Author

Ghawken commented Feb 11, 2021

Thanks - will test asap and update this

@Ghawken
Copy link
Author

Ghawken commented Feb 11, 2021

Apology - clean and rebuild and okay now.
Uploading and will check bitcode error.

Okay - all looks good.
Compiled fine (after my self-induced hiccup)
Uploaded.
Past Bitcode tests - no fail as per top

Seem fixed.
Thanks!

@adam-fowler
Copy link
Collaborator

#20 merged into main

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

2 participants