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

configure option --with-libzmq=PREFIX removed #818

Closed
pijyoi opened this issue Nov 19, 2014 · 14 comments
Closed

configure option --with-libzmq=PREFIX removed #818

pijyoi opened this issue Nov 19, 2014 · 14 comments

Comments

@pijyoi
Copy link
Contributor

pijyoi commented Nov 19, 2014

commit 313714f seems to have removed the above option.
This prevents compilation against a non-system-installed copy of libzmq.

@jemc
Copy link
Member

jemc commented Nov 19, 2014

When this feature gets restored, we should make sure it make its way into zproject so that it doesn't go away again when we start using zproject to autogenerate the czmq build systems.

@pmienk can you take a look at this, since the commit is yours and you've been dealing with the autoconf stuff in zproject?

@pmienk
Copy link
Contributor

pmienk commented Nov 19, 2014

Please note that when pkg-config is involved, the equivalent behavior is accomplished by extending PKG_CONFIG_PATH with the path containing libzmq.pc. Given a versioned reference, this is the only mechanism in zproject to accomplish detection. Otherwise, zproject will fall back to processing a prefix provided in this manner if PKG_CHECK_MODULES fails.

@jemc
Copy link
Member

jemc commented Nov 19, 2014

@pijyoi
Can you use pkg-config in your use case? Whatever solution we use for package detection in autoconf needs to work in the general case (that is, general for any dependency package) because the czmq build systems will "soon" be under the domain of zproject.

@pmienk
Copy link
Contributor

pmienk commented Nov 19, 2014

@pijyoi , presumably the install for libzmq you are trying to use has a lib/pkgconfigdirectory. We'll call that <path> (note it ends in /lib/pkgconfig). When configuring czmq, PKG_CONFIG_PATH=<path> ./configure should accomplish your goal. Or if you are installing to the same prefix, the pkgconfigdir mentioned by @evoskuil may provide the same path augmentation.

@pijyoi
Copy link
Contributor Author

pijyoi commented Nov 19, 2014

Okay, the following invocation works for me:
PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig ./configure --prefix=$HOME/local

The following doesn't work though:
./configure --with-pkgconfigdir=$HOME/local/lib/pkgconfig

@pijyoi
Copy link
Contributor Author

pijyoi commented Nov 19, 2014

Could not get mingw32 cross-compiling to work with the new syntax (where it used to work with the --with-libzmq syntax):
PKG_CONFIG_PATH=$HOME/mingw32/lib/pkgconfig ./configure --prefix=$HOME/mingw32 --host=i686-pc-mingw32

@sappo
Copy link
Member

sappo commented Nov 19, 2014

I do have mingw32 cross compiling. I can tell you more when I'm back at
work tomorrow morning.
Am 19.11.2014 22:31 schrieb "pijyoi" notifications@github.com:

Could not get mingw32 cross-compiling to work with the new syntax (where
it used to work with the --with-libzmq syntax):
PKG_CONFIG_PATH=$HOME/mingw32/lib/pkgconfig ./configure
--prefix=$HOME/mingw32 --host=i686-pc-mingw32


Reply to this email directly or view it on GitHub
#818 (comment).

@sappo
Copy link
Member

sappo commented Nov 20, 2014

@pijyoi you'll need to define a pkg-config path for your host, this works for me:

PKG_CONFIG_PATH_x86_64_w64_mingw32="~/workspace/zeromq/cross_x86_64/lib/pkgconfig" ./configure --host=x86_64-w64-mingw32 --prefix=~/workspace/zeromq/cross_x86_64

@evoskuil
Copy link
Contributor

It looks like configure.ac is handling --with-pkgconfigdir=<path> properly, so this should work.

./configure --with-pkgconfigdir=$HOME/local/lib/pkgconfig

This technique seems preferable to the environment variable, as it should be more selective in that it would apply only to this one ./configure call.

@sappo
Copy link
Member

sappo commented Nov 20, 2014

@evoskuil thanks for the hint. The --with-pkgconfigdir option works. But the errors when executing make remain. See #819

@evoskuil
Copy link
Contributor

Cool, i'd guess the compiler error is unrelated. Also @pmienk pointed out to me that these pkgconfigdir techniques are equivalent as long as the env var technique is executed on one line.

@sappo
Copy link
Member

sappo commented Nov 20, 2014

Okay, do you have any idea about the compiler error?

@evoskuil
Copy link
Contributor

Some idea, I'll refer readers to that thread - #819

@pijyoi
Copy link
Contributor Author

pijyoi commented Nov 21, 2014

Following Kevin's tip of naming the environment variable according to the
target (e.g. PKG_CONFIG_PATH_i686_pc_mingw32), I can run configure
successfully for host build or for cross-compile.

However, I can't seem to get "--with-pkgconfigdir" to work for either case.
This option seems to me to be much preferable if only for avoiding the
ugliness of the name of environment variable.

On Thu, Nov 20, 2014 at 3:02 PM, Eric Voskuil notifications@github.com
wrote:

Cool, i'd guess the compiler error is unrelated. Also @pmienk
https://github.com/pmienk pointed out to me that these pkgconfigdir
techniques are equivalent as long as the env var option is executed on one
line.

Reply to this email directly or view it on GitHub
#818 (comment).

@pijyoi pijyoi closed this as completed Dec 18, 2014
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

5 participants