1 detect.py: fix the ZMQ version check to the ZMQ version of the buildroot
3 The setup.py script tries to compile a test C program and runs it, to
4 retrieve a version string for the installed ZMQ library, but if the cross
5 compiler links it together, the result cannot be run on the host, due to
6 different architectures and libraries.
8 And if the host compiler would compile/link it, it would not link with
9 the library version inside buildroot but with the library from the
10 host, possibly returning a wrong version number.
12 Instead of trying to run the compiled test program to get the version
13 dynamically, return the version of the buildroot environment.
15 Written by Michael Rommel, modified for version 16.0.2 by Lionel
18 Signed-off-by: Lionel Flandrin <lionel@svkt.org>
20 buildutils/detect.py | 14 ++++++++------
21 1 file changed, 8 insertions(+), 6 deletions(-)
23 diff --git a/buildutils/detect.py b/buildutils/detect.py
24 index 9520da7..823144f 100644
25 --- a/buildutils/detect.py
26 +++ b/buildutils/detect.py
27 @@ -117,13 +117,15 @@ def detect_zmq(basedir, compiler=None, **compiler_attrs):
29 cc = get_compiler(compiler=compiler, **compiler_attrs)
30 efile = test_compilation(cfile, compiler=cc)
31 - patch_lib_paths(efile, cc.library_dirs)
32 + #patch_lib_paths(efile, cc.library_dirs)
34 - rc, so, se = get_output_error([efile])
36 - msg = "Error running version detection script:\n%s\n%s" % (so,se)
39 + #rc, so, se = get_output_error([efile])
41 + # msg = "Error running version detection script:\n%s\n%s" % (so,se)
42 + # logging.error(msg)
43 + # raise IOError(msg)
45 + so = "vers: ##ZEROMQ_VERSION##"
47 handlers = {'vers': lambda val: tuple(int(v) for v in val.split('.'))}