develop branch, and maybe 2.4, does not compile with boost 1.46

Issue #40 resolved
Richard Roberts created an issue

No description provided.

Comments (14)

  1. Richard Roberts reporter

    @dkeyes Can you please try with the 'feature/boost-compatibility' branch and see if you still have any compile errors?

  2. Daniel K

    Most of it seems to build, but I'm getting a linking error. I'm checking to make sure I'm not missing any important libraries on my system right now.

    #!
    
    Linking CXX executable testCholesky
    ../libgtsam.so.3.0.0: undefined reference to `clock_gettime'
    collect2: ld returned 1 exit status
    make[2]: *** [gtsam/base/testCholesky] Error 1
    make[1]: *** [gtsam/base/CMakeFiles/testCholesky.dir/all] Error 2
    make: *** [all] Error 2
    
  3. Richard Roberts reporter

    Hmm, @dkeyes can you tell me what version of Ubuntu, and if you're using boost from the standard repositories? Anything unusual about your system?

  4. Daniel K

    I'm using Ubuntu 12.04.4 LTS, Precise Pangolin. I'm using the standard boost libraries (libboost-all-dev). A quick google search suggests -lrt needs to be specified to gcc for posix timer libraries. Is that already included in the linker path for gtsam?

  5. Richard Roberts reporter

    I'm checking that... we've sometimes used that but it would be nice to understand why it works on one system and not another :-) To avoid future problems...

  6. Daniel K

    I'm also enabling the matlab wrapper in cmake, but I can't think of anything else that's different.

  7. Richard Roberts reporter

    Ok, yeah I don't think that would cause it since the link error is in testCholesky.

  8. Richard Roberts reporter

    Ok, @dkeyes found it, it looks like the old boost timer library is header-only, thus when using it we need to manually link with -lrt. The new boost timer library uses a compiled library with then automatically pulls in -lrt as needed. With boost <= 1.48 only the old timer library is available so we use that. So for the case when we use the old boost timer library, we need to manually link with -lrt. I'll make that change now...

  9. Richard Roberts reporter

    Ok, @dkeyes, just pushed that change, can you let me know if it now works for you?

  10. Log in to comment