I'm having a bad time building svnwcrew, and as the readme file says: "There is no sophisticated installation procedure for this small utility."...

I modified the config.mk file setting the APR_INCLUDE as the readme says, and when I run make:


any suggestion to build this tool? Thanks!

  • 2
    Only if you post the actual error messages that appeared. Dec 30 '12 at 4:50
  • pastebin.com/NE1nevek
    – Kummo
    Dec 31 '12 at 3:15
  • The developer needs to update his code for more recent compilers/standard C++ libraries. Dec 31 '12 at 3:20
  • 1
    I added a #include <cstddef> to the SVNcRev.h as a guy at the Arch irc pointed out, now it compiles.
    – Kummo
    Dec 31 '12 at 3:28

Without more information I can only offer you how I've done this on CentOS & Fedora Linux distros. I know a co-worker who got it to build on Ubuntu as well but I'm not familiar with all the steps they took to accomplish this.

For myself I used the following steps.

First I needed to make a change to line # 150 in SVNWcRev.cpp.

# before: 
#define USE_TIME_NOW    -2  // 0 and -1 might already be significant.

# after:
#define USE_TIME_NOW    apr_time_now()  // 0 and -1 might already be significant.

NOTE: The details for the apr_time_now() function were on this page.

This function returns the current time. Also that page detailed the function apr_time_exp_lt(). In the file SVNWcRev.cpp there is a function InsertDate() that is called with several arguments including USE_TIME_NOW. This argument along with a newly constructed apr_time_exp_t object are passed to the apr function, apr_time_exp_lt(). With the original value of -2, this function was returning 12/31/1969 (1/1/1970 - 2usecs).

My co-workers and I seemed to think that this might have been correct behavior on a different platform, or possibly a older version of the apr library was implemented differently where that used to work. I used apr version 1.4.5 to build svnwcrev.

Changing to the function apr_time_now() fixed the issue.

Installation & Setup

svnwcrev is a implementation of the subwcrev.exe tool provided by TortoiseSVN, here. I found svnwcrev here. I downloaded svnwcrev like so:

% svn checkout http://svnwcrev.tigris.org/svn/svnwcrev/trunk svnwcrev --username guest

NOTE: I got the following version of svnwcrev.

% svn info
Path: .
URL: http://svnwcrev.tigris.org/svn/svnwcrev/trunk
Repository Root: http://svnwcrev.tigris.org/svn/svnwcrev
Repository UUID: 4d73e863-0307-0410-bf4f-fe65b2d002b6
Revision: 10
Node Kind: directory
Schedule: normal
Last Changed Author: mailman
Last Changed Rev: 10
Last Changed Date: 2011-05-26 05:05:03 -0400 (Thu, 26 May 2011)

Once downloaded I made the following changes.

1. created a config.mk file:

% cp config_mk.template config.mk

2. changed config.mk so that it looked like this:


3. installed the apr-devel and subversion-devel RPMs.

4. compiled svnwcrev like so:

% make
  • I don't have before: #define USE_TIME_NOW -2 // 0 and -1 might already be significant. at line # 151
    – Kummo
    Dec 31 '12 at 3:22
  • that line isn't a literal "before: that's what the line looked like before and after I changed it. The after is what it should look like after.
    – slm
    Dec 31 '12 at 5:51
  • BTW, try the steps I outlined above, I just double checked and they worked fine on my Fedora & CentOS systems.
    – slm
    Dec 31 '12 at 6:02

Adding to the answer from slm I had to do the following to get the latest source from tigress to compile on Ubuntu 15.10

wget http://svnwcrev.tigris.org/files/documents/3444/44067/svnwcrev-1.0.tar.gz
tar -xzvf svnwcrev-1.0.tar.gz 
apt-get install libapr1-dev libsvn-dev
cd svnwcrev-1.0

This provided the headers referred to in the config.mk file, then after renaming config_mk.template to config.mk.

I then had to add the following at line 33 of src/SVNWcRev.cpp

#include <stddef.h>

This fixed a compiler error where Expansion and ptrdiff_t were undefined.

I also had to modify the Makefile to include missing libraries and disable a warning. The changed lines are listed here:

CPPFLAGS=-I$(SUBVERSION_INCLUDE) -I$(APR_INCLUDE) -Wno-deprecated-declarations
LDLIBS=-lpthread -L$(LIBRARIES) -lsvn_client-1 -lsvn_wc-1 -lsvn_subr-1 -lapr-1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.