Compiling Subversion.

Gavin Baumanis gavinb at thespidernet.com
Sat May 7 20:10:55 PDT 2011


Hi Everyone,

My ultimate goal is to be able to compile Subversion from source code.
And after asking for some help on the SVN mailing lists, Ryan Schmidt suggested that I come across here and have a look at the portfile.
He explained to me that the portfile was "the recipe" for compiling SVN successfully on a Mac.

Of curse the issues for me are;
I am not really a C/C++ developer so don't know the first thing about autogen / configure or make.
(I learnt a loooong time ago. but haven't done any C coding in 20 years.)


I have installed apr, apr-util, neon, serf and sasl all from macports.
(Though I did try and do it from their respective sources too, but hit a snag trying to compile apr.)
I can successfully use MacPorts to install and run Subversion, too.
So it seemed sensible enough that I should be able to take the compile "options" from the portfile and compile SVN... but alas there is still something I am missing, because it doesn't work for me.

So, I am hoping that I will be able to give you all the details of what I am doing and then someone in the know - will be able to point me in the right direction with respect to what I am doing wrong or omitting outright.

sudo port installed - reveals that I have the following installed;
apr @1.4.2_1 (active)
  apr-util @1.3.10_0 (active)
  cyrus-sasl2 @2.1.23_3+kerberos (active)
  db46 @4.6.21_6 (active)
  expat @2.0.1_1 (active)
  gettext @0.18.1.1_2 (active)
  gperf @3.0.4_0 (active)
  libiconv @1.13.1_0 (active)
  ncurses @5.9_0 (active)
  ncursesw @5.8_0 (active)
  neon @0.29.5_0 (active)
  openssl @1.0.0d_0 (active)
  readline @6.2.000_0 (active)
  serf @0.7.1_0 (active)
  sqlite3 @3.7.6_0 (active)
  subversion @1.6.16_0 (active)
  zlib @1.2.5_0 (active)

from MacPorts I got the following configure options, replacing ${prefix} with /opt/local.

--with-berkeley-db=:/opt/local/include/db46:/opt/local/lib/db46:db-4.6 --with-neon=/opt/local --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --without-apxs --mandir=\\\/opt/local/share/man --disable-neon-version-check --with-serf=/opt/local --with-sasl=/opt/local

and I added in the --with-sqlite=/opt/local configure option to ensure I was using the MacPorts version.

So I performed the following;
sudo sh ./authogen.sh
sudo ./configure --with-berkeley-db=:/opt/local/include/db46:/opt/local/lib/db46:db-4.6 --with-neon=/opt/local --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --without-apxs --mandir=\\\/opt/local/share/man --disable-neon-version-check --with-serf=/opt/local --with-sasl=/opt/local --with-sqlite=/opt/local
sudo make
make check 

During make I get errors such as;
subversion/libsvn_diff/diff_file.c: In function ‘output_unified_flush_hunk’:
subversion/libsvn_diff/diff_file.c:1546: warning: format ‘%ld’ expects type ‘long int’, but argument 5 has type ‘long long int’
subversion/libsvn_diff/diff_file.c:1553: warning: format ‘%ld’ expects type ‘long int’, but argument 5 has type ‘long long int’
subversion/libsvn_diff/diff_file.c:1559: warning: format ‘%ld’ expects type ‘long int’, but argument 5 has type ‘long long int’
subversion/libsvn_diff/diff_file.c:1565: warning: format ‘%ld’ expects type ‘long int’, but argument 5 has type ‘long long int’

and others like;
/usr/bin/ranlib: file: .libs/libsvn_subr-1.a(config_win.o) has no symbols

(I have no idea if they are "real" or can simply be ignored.

using; echo $?   provides a return of 0 (zero)


But when I run make check I get 6 failures and it finally exits with;
Running tests in authz_tests.py [37/87]make: *** [check] Error 1

and doesn't perform any of the later tests.

So, now  - I am hoping that someone will be able to point me in the right direction!
Thanks.

Gavin.


More information about the macports-users mailing list