Skip to content

Conversation

scpeters
Copy link
Contributor

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

The libunwind library is provided by macOS but without a pkg-config file. That wasn't a problem until the recent zeromq 4.3.1 release changed its libzmq.pc pkg-config file to require libunwind.pc ( Homebrew/homebrew-core#35940 (comment) ). I first noticed this in downstream software outside of homebrew-core, but it has also caused a build failure of libbitcoin-protocol in the boost 1.69 pull request ( Homebrew/homebrew-core#35030 ).

I created these libunwind.pc files from the libunwind.pc.in template in the upstream repository and copied the version numbers for 10.12, 10.13, and 10.14 from https://opensource.apple.com/release

This library is provided by macOS and the .pc file
is expected by zeromq 4.3.1
prefix=/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib/system
includedir=${prefix}/include
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scpeters This looks like it's going to be affected by #5068 and not work correctly. Any chance you could take a look at #5068 first and roll that into here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did notice #5068, but it doesn't affect zeromq in my testing, since libunwind is a private requirement.

Without this pull request, it fails hard because it can't find libunwind.pc:

$ pkg-config --cflags libzmq
Package libunwind was not found in the pkg-config search path.
Perhaps you should add the directory containing `libunwind.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libunwind', required by 'libzmq', not found

With this pull request, it succeeds, but I can't manage to see any reference to libunwind or /usr/include in the pkg-config outputs:

$ pkg-config --cflags libzmq
-I/usr/local/Cellar/zeromq/4.3.1/include
$ pkg-config --libs libzmq
-L/usr/local/Cellar/zeromq/4.3.1/lib -lzmq
$ pkg-config --static libzmq

I was hoping that #5068 wouldn't block this merge because things that depend on zeromq are broken right now. In parallel, I can take a look at helping with #5068.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping that #5068 wouldn't block this merge because things that depend on zeromq are broken right now. In parallel, I can take a look at helping with #5068.

@scpeters I'd rather we didn't add new pkg-config files which have a known, unfixed issue. Sorry :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, in the meantime I've submitted Homebrew/homebrew-core#36121 to disable libunwind from the zeromq formula to unbreak its pkg-config file.

@scpeters
Copy link
Contributor Author

This is blocked by #5068 and I'm not actively working on it, so I'm going to close this for now. This can be revisited in the future if so desired.

@scpeters scpeters closed this Jan 30, 2019
@lock lock bot added the outdated PR was locked due to age label Mar 1, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants