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

OSX: Cmake installs libzmq in a weird PATH #1801

Closed
zoobab opened this issue Feb 12, 2016 · 5 comments · Fixed by #2326
Closed

OSX: Cmake installs libzmq in a weird PATH #1801

zoobab opened this issue Feb 12, 2016 · 5 comments · Fixed by #2326

Comments

@zoobab
Copy link
Contributor

zoobab commented Feb 12, 2016

While autotools installs libzmq on OSX in /usr/local/lib, cmake installs it somewhere else:

`
vagrant@vagrant-osx /Users/vagrant/soft/libzmq/build [192]$ cmake ..
-- Using tweetnacl for CURVE security
-- Detected kqueue polling method
-- Detected ZMQ Version - 4.2.0
-- Checking whether SOCK_CLOEXEC is supported
-- Checking whether SO_KEEPALIVE is supported
-- Checking whether TCP_KEEPCNT is supported
-- Checking whether TCP_KEEPIDLE is supported
-- Checking whether TCP_KEEPINTVL is supported
-- Checking whether TCP_KEEPALIVE is supported
-- Could NOT find AsciiDoc (missing: ASCIIDOC_EXECUTABLE)
CMake Warning (dev) at CMakeLists.txt:605 (add_custom_command):
Policy CMP0040 is not set: The target in the TARGET signature of
add_custom_command() must exist. Run "cmake --help-policy CMP0040" for
policy details. Use the cmake_policy command to set the policy and
suppress this warning.

The target name "libzmq" is unknown in this context.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

MACOSX_RPATH is not specified for the following targets:

libzmq

This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/vagrant/soft/libzmq/build
`

When you do a make install, it installs it in a weird location, which makes it hard to find when you want to compile for ex malamute:

`
$ sudo make install

[...building tests...]

Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Headers
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/libzmq
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Resources
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/etc
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/etc/AUTHORS
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/etc/COPYING
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/etc/COPYING.LESSER
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/etc/MAINTAINERS
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/etc/NEWS
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/Headers
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/Headers/zmq.h
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/lib
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/lib/pkgconfig
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/lib/pkgconfig/libzmq.pc
-- Installing: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/libzmq
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/Resources
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/4.2.0/Resources/Info.plist
-- Up-to-date: /usr/local/Library/Frameworks/libzmq.framework/Versions/Current
-- Installing: /usr/local/lib/libzmq-static.a

`

@zoobab
Copy link
Contributor Author

zoobab commented Feb 12, 2016

czmq does not seem to have this problem tough.

@viohex
Copy link

viohex commented Jul 12, 2016

I get the same problem,how do you resolve it under OSX?

@viohex
Copy link

viohex commented Jul 12, 2016

When I make install by autotools, zeromq seems work ok. but I can not make it work by cmake.

@SylvainCorlay
Copy link
Contributor

SylvainCorlay commented Jan 19, 2017

The solution is to disable this behavior with -D ZMQ_BUILD_FRAMEWORK=OFF.

@SylvainCorlay
Copy link
Contributor

@bluca what do you think of making ZMQ_BUILD_FRAMEWORK=OFF the default behavior, in order to have the least surprise on OS X compared to other unix platforms?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants