Menu

#61 fg source fails to build terrasync when svn development libraries are installed

Verified
nobody
TerraSync (19)
Medium
2011-06-19
2010-02-08
Anonymous
No

Originally created by: j...@flygarna.se
Originally owned by: zakalawe@mac.com

What steps will reproduce the problem?
1. Make sure you have svn development libraries installed
2. run configure
3. make

What is the expected output? What do you see instead?

I'd expect a clean compile of fg but instead I get (in directory
utils/TerraSync) a lot of Undefined symbols for apr and subversion calls:
  "_svn_cmdline_setup_auth_baton", referenced from:
      mysvn_setup()     in terrasync.o
  "_apr_palloc", referenced from:
      mysvn_setup()     in terrasync.o
      mysvn_setup()     in terrasync.o
... and more

What version of the product are you using? On what operating system?

fg from CVS february 8 2010 2200 UTC on Mac OS X 10.6.2

Please provide any additional information below.

I have attached a patch that resolves the issue of building terrasync in my
set up. However, building terrasync with subversion built-in will lead to
terrasync locking directories. I'll report this in another issue.

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2010-02-09

    Originally posted by: pedromor...@gmail.com

    (No comment was entered for this change.)

    Labels: terrasync

     
  • Anonymous

    Anonymous - 2010-11-24

    Originally posted by: zakalawe@mac.com

    The autoconf terraysnc handling was recently updated, please re-test.

    Cc: zakalawe

     
  • Anonymous

    Anonymous - 2010-11-24

    Originally posted by: j...@flygarna.se

    The configure.ac in git now sets the proper LDFLAGS and gives a clean compile of terrasync. This issue can be signed of as resolved.

     
  • Anonymous

    Anonymous - 2010-11-24

    Originally posted by: zakalawe@mac.com

    Awesome, thanks for following up.

    Status: Verified

     
  • Anonymous

    Anonymous - 2010-11-24

    Originally posted by: j...@flygarna.se

    I have to change my previous comment. I do get a clean compile but it turns out that terrasync does not use built-in svn support. The problem is that in configure.ac AC_SEARCH_LIBS is currently used rather than AC_CHECK_LIB to look for svn libs. AC_CHECK_LIB sets preprocessor macros that are used in terrasync.cxx to include or reject internal svn support. I am attaching a simple patch to configure.ac that makes terrasync to use built-in svn support.

     
  • Anonymous

    Anonymous - 2010-11-24

    Originally posted by: zakalawe@mac.com

    Re-opened, patch looks sane to me, but I'm going to mention this to papillion  for further testing, since he's the one who did the most recent libsvn autoconf changes. Thanks for testing - I really wish libsvn supported pkg-config!

    Status: Dev

     
  • Anonymous

    Anonymous - 2010-11-25

    Originally posted by: j...@flygarna.se

    Some more information.

    The autoconf manual recommends usage of AC_SEARCH_LIBS. The patch I suggest does not follow the recommendation because AC_SEARCH_LIBS does not set the C++ preprocessor HAVE_LIBSVN_CLIENT_1 macro in config.h used in terrasync.cxx.

    If AC_SEARCH_LIBS is used in the future then either terrasync.cxx depency on HAVE_LIBSVN_CLIENT_1 must be removed or configure must set the macro in config.h. Irrespective which of the AC_ macros are used a check for library svn_ra-1 is needed on my machine (64bit Snowleopard 10.6.5).

    I prefer usage of AC_SEARCH_LIBS but as it used now it does not produce a proper terrasync binary (assuming built-in svn support is desired).

     
  • Anonymous

    Anonymous - 2010-11-25

    Originally posted by: zakalawe@mac.com

    Setting HAVE_LIBSVN_CLIENT_1 'by hand' should be easy enough - and then we could use AC_SEARCH_LIBS as recommended. Is that all correct? Checking for svn-ra should be fine, but I'll let papillion confirm.

    Owner: zakalawe
    Cc: -zakalawe

     
  • Anonymous

    Anonymous - 2010-11-25

    Originally posted by: j...@flygarna.se

    Reading through terrasync.cxx makes me wonder if there isn't a small problem in the use of the SVN related preprocessor macros. I think that the original idea is to either fetch scenery with rsync or subversion. Subversion support is either built-in into the terrasync binary (when subversion devel libs are available) or by the use of the external 'svn' command.

    My understanding of the code is that the current git state will never build a terrasync with built-in subversion support (since HAVE_LIBSVN_CLIENT_1 is never defined in config.h). This means that either external rsync or svn is used to fetch scenery.

    There is two ways to get terragear built-in svn support. Either fix terrasync.cxx or make configure to set HAVE_LIBSVN_CLIENT_1 in config.h. I uploaded patches for both cases, you and papillion can select which one to use. Both patches uses AC_SEARCH_LIBS and I prefer the terrasync-configure patch since it removes the dependency on HAVE_LIBSVN_CLIENT_1 macro in terrasync.cxx.

     
  • Anonymous

    Anonymous - 2010-11-25

    Originally posted by: j...@flygarna.se

    Another version of the configure.ac only change patch. There was an extra line in the previous patch.

     
  • Anonymous

    Anonymous - 2011-05-29

    Originally posted by: bre...@gmail.com

    Stalled. Any news on this issue James/papillion?

    Labels: Priority-Medium
    Status: Stalled

     
  • Anonymous

    Anonymous - 2011-05-29

    Originally posted by: bre...@gmail.com

    (No comment was entered for this change.)

    Labels: -terrasync TerraSync

     
  • Anonymous

    Anonymous - 2011-05-29

    Originally posted by: zakalawe@mac.com

    Uh, hmm - this is fixed with CMake - no idea about autoconf :)

     
  • Anonymous

    Anonymous - 2011-05-29

    Originally posted by: bre...@gmail.com

    Plan is to drop autoconf support after releasing 2.4.0 and then use CMake only.
    Would/should we bother with fixing this for autoconf/2.4.0 (if it wasn't working)?

     
  • Anonymous

    Anonymous - 2011-05-29

    Originally posted by: j...@flygarna.se

    I haven't compiled fg for a long time so I cannot test perform a test on the latest git. I just haven't the time to go through all compile issues that appears after a being off compiling from git for a long time. However, if the patches I proposed were applied then autoconf should be happy. The issue was not to get a clean compile, the issue was to acutally use the svn programming API. Does the cmake build actually utilize the svn API rather than relying on external svn or rsync?

    Why is autoconf dropped?

     
  • Anonymous

    Anonymous - 2011-05-29

    Originally posted by: bre...@gmail.com

    Will drop autoconf since it's twice as much work to support both make systems. Plus cmake is (apparently) better in cross platform support - and also works for MSVC.

     
  • Anonymous

    Anonymous - 2011-06-11

    Originally posted by: bre...@gmail.com

    Well, I've pushed the patch after all... Thanks! :-)

    I'm currently looking into terrasync - also see the obvious problem with missing macro/automake. I applied the configure-only patch, since it restores the same/similar behaviour as cmake.
    http://www.gitorious.org/fg/flightgear/commit/a8778b232c8a9ea21748798cf80945c962e41bbd

    We'll see what happens to our two (well three including MSVC projects) competing build systems.

    Status: Testing

     
  • Anonymous

    Anonymous - 2011-06-19

    Originally posted by: j...@flygarna.se

    Great, I have now tested the latest git (next branch) with successful result. None of my local fixes w.r.t to this issue are needed any more so from my point of view this issue can be closed as resolved.

     
  • Anonymous

    Anonymous - 2011-06-19

    Originally posted by: zakalawe@mac.com

    Great, marking resolved.

    Status: Verified

     

Log in to post a comment.

MongoDB Logo MongoDB