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

Problem: pkg-config file cannot be used for static linking, missing dependencies in packaging #3336

Merged
merged 3 commits into from
Dec 15, 2018

Conversation

bluca
Copy link
Member

@bluca bluca commented Dec 15, 2018

Solution: add Requires.private which gets recursively expanded by applications to pkg-config

Solution: use the same for both autotools and cmake
Solution: use requires.private, which pkg-config expands recursively
so that dependencies of dependencies can be linked against when
using pkg-config --static
Solution: add them so that pkg-config Requires.private is
satisfied
@c-rack c-rack merged commit 1c604c6 into zeromq:master Dec 15, 2018
@bluca bluca deleted the pkgconfig_requires branch December 15, 2018 09:12
@scpeters
Copy link
Contributor

@bluca I'm having trouble finding zeromq on macOS since this has been released into homebrew-core, and there doesn't seem to be a libunwind.pc

@EricLambrecht
Copy link

I have the same problem. I can't install any npm package that requires zeromq at the moment, which is kinda problematic.

@bluca
Copy link
Member Author

bluca commented Jan 16, 2019

Which dependency is missing?

@EricLambrecht
Copy link

@bluca we have an internal package in the company that uses "zeromq" and it can't be installed, because during installation (via npm/yarn), the build process fails because of this.

@bluca
Copy link
Member Author

bluca commented Jan 16, 2019

Again, which dependency is missing?

@EricLambrecht
Copy link

EricLambrecht commented Jan 16, 2019

I don't know what kind of dependency you mean right now(?). During the build? Or in npm? On my machine?

The errors I get are various:

../binding.cc:28:10: fatal error: 'zmq.h' file not found
#include <zmq.h>
         ^~~~~~~
1 error generated.

if I don't install zeromq via Homebrew.

clang: error: no such file or directory: './Release/../../zmq/lib/libzmq.a' afterwards.

I also get this warning

WARNING: 'aclocal-1.14' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>

but I have aclocal-1.16 installed, and after some research that doesn't seem to be the problem.

@bluca
Copy link
Member Author

bluca commented Jan 16, 2019

That's not a full log, what exactly is the problem with the header?

@EricLambrecht
Copy link

EricLambrecht commented Jan 16, 2019

Full log is too long for this comment section. I created a gist: https://gist.github.com/EricLambrecht/7b7e5ec7dcaae3020a45d0ad4c13cf42

@bluca
Copy link
Member Author

bluca commented Jan 16, 2019

Autotools dependencies are missing on your system - specifically aclocal, which on Linux is usually installed via automake

@EricLambrecht
Copy link

EricLambrecht commented Jan 16, 2019

@bluca But I have aclocal-1.16 according to aclocal --version.

I could also pin the error down a little bit more. I don't get the error when I install it globally. It only happens when I try to install zeromq locally! The Warning regarding aclocal doesn't appear when I install it globally, too.

Any idea why it can't be found during a local npm install, but can be found when installing globally?

@bluca
Copy link
Member Author

bluca commented Jan 16, 2019

As you can see from the log, for whatever reason it's looking for aclocal-1.14, not 1.16. Note that this has nothing to do with libzmq at all, it's purely and exclusively an issue with the autotools setup on the machine you are running this from.

@EricLambrecht
Copy link

Okay just for documentation purposes. It seemed to be related to my external hard drive (or rather the path). When I created the project on my internal SSD, the problem was gone!

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

Successfully merging this pull request may close these issues.

4 participants