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

pkg-config isn't finding libmarkdown on Linux #3

Open
twostraws opened this issue Nov 29, 2016 · 5 comments
Open

pkg-config isn't finding libmarkdown on Linux #3

twostraws opened this issue Nov 29, 2016 · 5 comments

Comments

@twostraws
Copy link

Using crossroadlabs/Markdown 1.0.0-alpha.2, which pulls in crossroadlabs/CDiscount 2.2.1, I get the following warning on Ubuntu 16.04:

note: you may be able to install libmarkdown using your system-packager: apt-get install libmarkdown2-dev

I have already installed that package. The compilation completes successfully, so I suspect what is happening is that libmarkdown2-dev doesn't install a pkg-config .pc file on Linux, whereas brew install discount does provide one on macOS.

Removing either the "pkgConfig" or "providers" sections of your Package.swift might silence the warning, but that presumably introduces other problems? AFAIK "providers" is only advisory for users.

@twostraws
Copy link
Author

A suggestion from the inimitable @aciidb0mb3r: because Package.swift is Swift source code in its own right, you can use #if os(OSX) to enable "pkgConfig" only for macOS. This seems like the best of both worlds.

@dileping
Copy link
Member

dileping commented Dec 5, 2016

@twostraws Sounds like a possible solution to me. What I'm afraid of is that there will be no way to show a message to run apt-get install libmarkdown2-dev if the package is not installed. My personal feeling is that it's better to always show a warning instead of silencing when an error occurs.

@ypopovych What do you think?

@twostraws
Copy link
Author

The warning occurs every single time you build, even when no changes have been made; it's quite irritating! Worse, for some reason swift build prints the warning three times, so it's triply irritating :)

@ypopovych
Copy link
Member

Seems as the library is missing .pc file (doesn't updated yet to latest versions).

Maybe, we should disable this feature to time, when this will be fixed in Ubuntu repositories?

@dileping
Copy link
Member

dileping commented Dec 5, 2016

@twostraws @ypopovych Guys, what's the behavior on Linux if we keep .Apt provider, but remove pkgConfig? On success? On failure?

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

3 participants