1. 05 Nov, 2014 1 commit
    • Samuel Martin's avatar
      cmake/OpenCVGenPkgconfig.cmake: rework opencv.pc generation · eceada58
      Samuel Martin authored
      Using absolute path to locate the components in the "Libs:" field of the
      *.pc can badly break cross-compilation, especially when building
      statically linked objects.
      
      Indeed, pkg-config automatically replaces the '-I...' and '-L...' paths
      when the PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR environment
      variables are set [1]. This feature is very helpful and common in
      cross-compilation framework like Buildroot [2,3].
      
      When there are absolute paths in the *.pc files, pkg-config won't be
      able to do the path substitions for these paths when the afromentioned
      environment variables are set.
      In such case, since the prefix is the target one, not the sysroot one,
      these libraries' abolute paths will point to:
      - in the best case: a non-existing file (i.e. these files do not exists
        on the host system;
      - at worst: the host system's libraries. This will make the linking
        failed because these host system's libraries will most likely not be
        build for the target architecture [4].
      
      So, this patch replace the components' absolute paths by the form:
        -L<libdir> -l<libname>
      
      This way, the linker will be able to resolve each dependency path,
      whatever the kind of objects/build (shared object or static build) it
      is dealing with.
      
      Note that for static link, the library order does matter [5]. The order
      of the opencv components has been carefully chosen to comply with this
      requirement.
      
      Fixes #3931
      
      [1] http://linux.die.net/man/1/pkg-config
      [2] http://buildroot.org/
      [3] http://git.buildroot.net/buildroot/tree/package/pkgconf/pkg-config.in
      [4] http://autobuild.buildroot.net/results/e8a/e8a859276db34aff87ef181b0cce98916b0afc90/build-end.log
      [5] http://stackoverflow.com/questions/45135/linker-order-gccSigned-off-by: 's avatarSamuel Martin <s.martin49@gmail.com>
      
      ---
      Note: this patch properly applies on top of the master branch, though it
            has been written on top of the 2.4 branch.
      eceada58
  2. 31 Oct, 2014 1 commit
  3. 30 Oct, 2014 1 commit
  4. 29 Oct, 2014 1 commit
  5. 27 Oct, 2014 2 commits
    • Maksim Shabunin's avatar
      d77088b1
    • Dinar Ahmatnurov's avatar
      fixed issue with malformed UTF-8 string; · b5a6df49
      Dinar Ahmatnurov authored
      ocl: Change static variable order in cl_context.cpp to avoid crashes during destruction
      
      ContextImpl::currentContext contains a reference to one of the
      DeviceInfoImpl objects from:
      
      static std::vector<DeviceInfoImpl> global_devices;
      
      ContextImpl::currentContext is destroyed in the destructor
      for the statically defined object __module, and relies on its
      DeviceInfoImpl reference to query some hardware features while
      being destroyed.
      
      This means that we need to ensure that the global_devices vector is
      destroyed affter __module, otherwise ContextImpl::currentContext's
      DeviceInfoImpl reference will no longer be valid when __module is
      destroyed.
      
      Since these variables are all confined to a single compilation unit,
      they will be destruct from bottom to top, so we need to make sure
      that __module is the bottom definition so it can be destroyed first.
      
      iOS: fix crash from overrelease in UIImageToMat
      
      viz: fixed memory leak, issue 3961
      
      fix installation layout for debian packages:
      
      Install symlinks to shared libraries as a part of development package,
      not runtime package.
      
      It is default behavior for debian packages.
      
      Fix test name.
      
      TIFF loader: Allocate large enough buffer when (bpp * ncn) > 8.
      
      TIFF loader: Pass buffer size to read functions.
      
      replace not ascii and not cyrillic symbols with '?';
      
      add test for putText;
      
      fix warning;
      
      minor fixes;
      b5a6df49
  6. 26 Oct, 2014 4 commits
  7. 23 Oct, 2014 6 commits
  8. 21 Oct, 2014 5 commits
  9. 20 Oct, 2014 1 commit
  10. 18 Oct, 2014 6 commits
  11. 17 Oct, 2014 3 commits
  12. 16 Oct, 2014 1 commit
  13. 15 Oct, 2014 1 commit
    • Tom Stellard's avatar
      ocl: Change static variable order in cl_context.cpp to avoid crashes during destruction · 8f3b876e
      Tom Stellard authored
      ContextImpl::currentContext contains a reference to one of the
      DeviceInfoImpl objects from:
      
      static std::vector<DeviceInfoImpl> global_devices;
      
      ContextImpl::currentContext is destroyed in the destructor
      for the statically defined object __module, and relies on its
      DeviceInfoImpl reference to query some hardware features while
      being destroyed.
      
      This means that we need to ensure that the global_devices vector is
      destroyed affter __module, otherwise ContextImpl::currentContext's
      DeviceInfoImpl reference will no longer be valid when __module is
      destroyed.
      
      Since these variables are all confined to a single compilation unit,
      they will be destruct from bottom to top, so we need to make sure
      that __module is the bottom definition so it can be destroyed first.
      8f3b876e
  14. 12 Oct, 2014 2 commits
  15. 11 Oct, 2014 5 commits