libccd not the latest.

Issue #53 resolved
Bram Stolk created an issue

The libccd that is included in OpenDE is not the latest version as found at: https://github.com/danfis/libccd

I tried dropping in the latest, but it fails on missing ccdcustom subdir.

I couldn't find the origin of ccdcustom, it seems to be a ODE specific thing? As this ccdcustom/ directory does not show up in the history of the upstream depot.

I wonder if taking libccd copy out of OpenDE, and replace it with a link to upstream reposity would be worthwhile? That way, libccd would never be out of date.

Git has a feature for nesting repositories. So mercurial probably as well.

Comments (7)

  1. Steve Peters

    I think we can also search for the system version of libccd with some configuration flags:

    • cmake: -DODE_WITH_LIBCCD=On -DODE_WITH_LIBCCD_SYSTEM=On

    • autotools: --with-libccd=system

    I believe libccd is available from Ubuntu and homebrew in case you want to try it.

  2. Oleh Derevenko Account Deactivated

    We already have it in ./configure that it uses system libccd by default. If the system package is not installed it falls back to the internal copy. You can explicitly control that with --with-libccd=system|internal

  3. Oleh Derevenko Account Deactivated

    @bram_stolk the ccdcustom folder was necessary because we fixed some issues that were in the libccd we had. It contained function implementation replacements. If you use system copy of the library, that patch will not be required.

  4. Bram Stolk reporter

    Thanks guys.

    It's good to know you can use a system libccd. I would like, however, to use the latest libccd built from source. I built it, and installed in /usr/local/lib but ODE will not find it because it uses pkg-config.

    'make install' from libccd will not create a package config, thus, ODE configure responds with:

    configure:18544: checking for CCD configure:18551: $PKG_CONFIG --exists --print-errors "ccd" Package ccd was not found in the pkg-config search path. Perhaps you should add the directory containing `ccd.pc' to the PKG_CONFIG_PATH environment variable

    There is a ccd.pc.in in the libccd depot though, I'll try to make ccd install that somehow.

    Bram

  5. Bram Stolk reporter

    Awesome, Steven. Thanks for your help.

    I managed to build it properly now, with pkgconfig.

    $ pkg-config --modversion ccd
    2.0
    

    And ODE's configure picks it up:

    Configuration:
      Build  system type:      x86_64-pc-linux-gnu
      Host   system type:      x86_64-pc-linux-gnu
      Use double precision:    no
      Use drawstuff:           X11
      Demos enabled:           yes
      Use OPCODE:              yes
      Use GIMPACT:             no
      Use libccd:              yes
      libccd source:           system
    

    It compiles...

    libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../include -I../../include -D__ODE__ -I../../ou/include -I../../OPCODE -I../../OPCODE/Ice -DdTRIMESH_ENABLED -DdTRIMESH_OPCODE -DdLIBCCD_ENABLED -I../../libccd/src/custom -I/home/bram/include -DdLIBCCD_SYSTEM -DdLIBCCD_CYL_CYL -DdLIBCCD_CAP_CYL -DdLIBCCD_CONVEX_BOX -DdLIBCCD_CONVEX_CAP -DdLIBCCD_CONVEX_CYL -DdLIBCCD_CONVEX_SPHERE -DdLIBCCD_CONVEX_CONVEX -g -O2 -MT collision_libccd.lo -MD -MP -MF .deps/collision_libccd.Tpo -c collision_libccd.cpp -o collision_libccd.o
    

    And it links...

    /bin/bash ../../libtool  --tag=CXX   --mode=link g++  -g -O2 -version-info 7:0:1  -o libode.la -rpath /home/bram/lib nextafterf.lo array.lo box.lo capsule.lo collision_cylinder_box.lo collision_cylinder_plane.lo collision_cylinder_sphere.lo collision_kernel.lo collision_quadtreespace.lo collision_sapspace.lo collision_space.lo collision_transform.lo collision_trimesh_disabled.lo collision_util.lo convex.lo cylinder.lo default_threading.lo error.lo export-dif.lo fastdot.lo fastldltfactor.lo fastldltsolve.lo fastlsolve.lo fastltsolve.lo fastvecscale.lo heightfield.lo lcp.lo mass.lo mat.lo matrix.lo memory.lo misc.lo objects.lo obstack.lo ode.lo odeinit.lo odemath.lo plane.lo quickstep.lo ray.lo resource_control.lo rotation.lo simple_cooperative.lo sphere.lo step.lo timer.lo threading_base.lo threading_impl.lo threading_pool_posix.lo threading_pool_win.lo util.lo odetls.lo odeou.lo  collision_trimesh_opcode.lo collision_trimesh_internal.lo collision_trimesh_trimesh.lo collision_trimesh_trimesh_old.lo collision_trimesh_sphere.lo collision_trimesh_ray.lo collision_trimesh_box.lo collision_trimesh_ccylinder.lo collision_cylinder_trimesh.lo collision_trimesh_plane.lo collision_convex_trimesh.lo collision_libccd.lo joints/libjoints.la ../../ou/src/ou/libou.la  ../../OPCODE/libOPCODE.la ../../OPCODE/Ice/libIce.la  -L/home/bram/lib -lccd -lrt -lm  -lpthread
    

    Running demo_convex on it, gives me a div by zero though. I will try to track that down now.

    I'll close this issue.

  6. Log in to comment