Comments (6)
I had the same problem (next time I'll look here first), but your suggestion would not solve the problem IMO, since ZeroMQ might be installed a different location (it is on my machine) and the point of pkgconfig is exactly to enable that.
I think it would be sufficient to include it in the README file that prior to building the PKG_CONFIG_PATH variable has point to where ZeroMQ is installed.
from zeromq.node.
No! PKG_CONFIG_PATH
should point to where pkgconfig database is installed, not to where ZeroMQ is installed. The problem is that pkgconfig database is located at /usr/local/lib/pkgconfig/
on many systems (see other tickets mentioning pkgconfig), and pkgconfig itself assumes a different location for its database (/usr/lib/pkgconfig/
folder if I remember correctly).
I vote for setting PKG_CONFIG_PATH
within wscript
, not for setting library search paths and duplicating what pkgconfig
is for.
README is not a solution because the preferred way of installing the library is through NPM. What if a user installs a library and zmq
is installed as a dependency? Resolving issues by downloading the broken library and reading README is a great PITA. If pain can avoided, why not?
NPM uses node-waf to build binary node.js extensions such as zmq
, and node-waf seems to be powerful enough to set such search paths and enable a fully automated configuration and compilation.
from zeromq.node.
You got it wrong. I was not setting the library search path via pkg-config, which would not work since that's done via ldconfig or LD_LIBRARY_PATH. pkg-config informs the configure procedure whether a library is installed and where the necessary header files are.
If you install zeromq in a non-default path (i.e. I installed it in /opt/local/zeromq) under ./lib/pkgconfig you find the corresponding pkgconfig database. If you read the man page it clearly states that pgk-config
"will additionally look in the colon-separated ... list of directories specified by the PKG_CONFIG_PATH environment variable".
As for the README. What I suggested was to include a note to set the PKG_CONFIG_PATH before executing nmp.
Should look something like this:
export PKG_CONFIG_PATH=/path/to/zeromq/prefix/lib/pkgconfig
npm install zeromq
Where "/path/to/zeromq/prefix/" is the prefix that you used when you installed zeromq from source.
That worked for me. My understanding is that npm downloads the sources and uses pkg-config (and subsequently PKG_CONFIG_PATH) to figure out where zeromq is installed. You still have to make sure that your system finds the zeromq library at runtime. There are at least two ways that I know of either using ldconfig or LD_LIBRARY_PATH.
Hard coding a specific path into the install script seems to defeat the whole purpose of pkg-config IMO since it's meant to be a generic mechanism to set such paths.
from zeromq.node.
Related: it's impossible to npm install
this repo unless you already have system wide libzmq-dev installed (debian-ly speaking) or you've root privileges to install libzmq. While it's easy to override libzmq headers location by running PKG_CONFIG_PATH=/path/of/your/local/libzmq/build/src CXXFLAGS="-I/path/of/your/local/libzmq/build/include" node-waf configure build
, node-waf
seems to not honor passed LINKFLAGS=/path/of/your/local/libzmq/build/src/.libs
which results in not finding -lzmq
.
Please, consider adding maybe a special target which could download and use libzmq sources locally.
TIA,
--Vladimir
from zeromq.node.
Are you asking to add support for local libzmq installations (without root privileges)? If so, it's better to create a special ticket
from zeromq.node.
Sure -- #53
from zeromq.node.
Related Issues (20)
- ZMQ msg len in push-pull socket is zero? HOT 1
- Queue stats - memory usage, queue length etc
- Client-server pattern implementation (ZMQ_CLIENT)
- Expose zmq_z85_encode and zmq_z85_decode HOT 2
- Support for building zeromq with yarn instead of npm HOT 3
- Mark this project as unmaintained in favor of zeromq/zeromq.js HOT 13
- Cannot use ZeroMQ 4.2 sockopt ZMQ_ROUTER_HANDOVER HOT 1
- fatal error: zmq.h: No such file or directory HOT 4
- How to receive messages with multiple frames
- Confused between zmq and zeromq HOT 2
- hyperledger-sawtooth error
- How does Monitor Interval effect REQ/REP PUB/SUB network traffic? HOT 1
- zmq.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 59. This version of Node.js requires NODE_MODULE_VERSION 54. HOT 3
- node 10 install issue HOT 2
- How do we include zeromq so we can bundle the Node application? HOT 1
- router/dealer proxy doesn't forward multipart msgs correctly
- Facing zmq router timeout issue HOT 1
- Dish/Radio Support?
- zmq.socket is not a function HOT 5
- The test fails on PowerPC ppc64le architecture
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zeromq.node.