0001-use-buildroot-zmq-version-instead-of-detect.patch 1.9 KB

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