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

Getting a "Couldn't find pc file" warning if I include this package in iOS app #3

Closed
bengottlieb opened this issue Oct 25, 2019 · 10 comments

Comments

@bengottlieb
Copy link

No information is given, and there's nothing in the build log. Easy to reproduce:

  • use Xcode 11.1
  • create a Single View iOS app
  • add this package to it
  • build
@weissi
Copy link
Member

weissi commented Oct 25, 2019

@bengottlieb But it works correctly on iOS, right? I know it issues the warning (because the iOS SDK doesn't use pkg-config) but I would assume it to work.

For zlib we could actually drop the pkg-config thing because zlib is always present in $SDKROOT/usr/{include,lib}

@Lukasa
Copy link
Contributor

Lukasa commented Oct 25, 2019

For zlib we cannot drop pkg-config as it is required to work on Linux, where pkg-config is the correct location mechanism.

@weissi
Copy link
Member

weissi commented Oct 25, 2019

@Lukasa any Linux distro you know where zlib isn't in /usr/lib and /usr/include or needs any specials?

Ubuntu is:

$ pkg-config --cflags --libs zlib
 -lz  

@Lukasa
Copy link
Contributor

Lukasa commented Oct 25, 2019

In general, no, but the nature of pkg-config is to guard against strange build configurations. In particular, if you are trying to build with a custom collection of packages that shadow the system packages, removing the pkg-config declaration will break it.

I guess what I'm saying is that right now this package builds successfully on all platforms, but with warnings on iOS. Removing the pkg-config declaration removes the warning but may cause a breakage in those cases. It doesn't seem like trading a warning for possible breakage is worth it.

@bengottlieb
Copy link
Author

@weissi it does build and work fine, but it harshes my zero-warnings vibe. Not a huge deal.

@weissi
Copy link
Member

weissi commented Oct 25, 2019

@bengottlieb I mean one option would be to just make your own package. You can just take what's in this package and remove the pkgConfig: "zlib" line, that should be it. If you do that, please do rename the package name (both URL and in Package.swift) as well as the exported module. If any of those three things don't get renamed we will suffer from clashes which will cause trouble in the ecosystem.

@bengottlieb
Copy link
Author

bengottlieb commented Oct 25, 2019

@weissi if I were directly including this, I think that would be fine. But I'm adding a package that's got its own dependencies (and in this case, nio-zlib is, in turn added one layer down, so I'd actually need to create three packages). Maybe I'll see about doing a PR on the package one layer up the stack (SocketIO, in this case). Thanks!

@patburns
Copy link

patburns commented Mar 3, 2020

I'm also trying to clear out my warnings. This is used in the iOS websocket library starscream:

daltoniam/Starscream#719

That's being used by apollo, which is what I'm actually including. So my problem is three hops way on the dependency chain.

@weissi
Copy link
Member

weissi commented Mar 4, 2020

@patburns / @bengottlieb well, this package requires the zlib pkg-config package to be installed, that's why declare it. If you don't want to ship pkg-config, then I think this is an issue for Starscream and not this package, sorry.

@weissi weissi closed this as completed Mar 4, 2020
@patburns
Copy link

patburns commented Mar 4, 2020

@weissi, that's reasonable. I figured out it's not required to ship the App to "silence" this warning, but you just need to have it install on the device you are compiling on. I installed this using brew:

brew install pkg-config

Thanks for you comment, your suggestion gave me the idea to try this out. I'll suggest to starscream they at least update their docs. Cheers!

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

4 participants