[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion Makefile.in issue on Solaris 10

From: Branko Čibej <brane_at_wandisco.com>
Date: Thu, 07 Nov 2013 17:06:17 +0100

On 07.11.2013 16:53, Andy Stocks wrote:
> Hi,
> I'm building Subversion 1.8.4 from source (standard configuration, using alternative --prefix) on a Solaris 10 installation, which has little in the way of GNU tools built - many of the standard commands are still the Sun implementations, only some are GNU variants. Caveat: I don't have control over the system I'm building on.
> There appears to be a problem in the Makefile.in script caused by Solaris versions of find and xargs - according to the change history, it was introduced in r1416646 and r1421636. I've checked the releases and this first appears in 1.8.0.
> There are invalid parameters (for Solaris implementations) on the find and xargs commands:
> find subversion/tests/cmdline/svn-test-work -print0 -mindepth 1 -maxdepth 1 | xargs -0 rm -rf
> Solaris 'find' does not support '-print0', and Solaris 'xargs' does not support '-0'.
> This causes make clean to fail almost immediately:
>> make clean
> rm -f gcov-lcov.dat gcov-lcov.log gcov-genhtml.log
> rm -rf gcov-report
> find . -name "*.gcda" -o -name "*.gcno" -print0 | xargs -0 rm -f --
> xargs: illegal option -- 0
> xargs: Usage: xargs: [-t] [-p] [-e[eofstr]] [-E eofstr] [-I replstr] [-i[replstr]] [-L #] [-l[#]] [-n # [-x]] [-s size] [cmd [args ...]]
> find: bad option -print0
> find: [-H | -L] path-list predicate-list
> make: *** [gcov-clean] Error 2
> Replacing the -print0 with -print and removing the -0 parameters cures the immediate issue, though I realise the clean operation is going to fail for filenames with whitespace/newline content after the alteration; I've not time at present to implement a proper fix that will still work and won't upset other OS's.
> I appreciate there's probably not much desire to put in fixes for non-GNU Solaris 10, and I know I could build the GNU find/xargs locally if necessary; however I thought I'd share this so it might be addressed for those that don't have this option.

I noticed the GNU-ism, too, and wondered about it. It should be fairly
easy to replace with "for n in `ls -a $(dir)`; do rm -fr $n" kind of
thing, but we'd have to filter out '.' and '..' -- which is why find was
used in the first place.

The reason for -print0 is probably in the test suite, where we do have
one or two files with spaces in them; but they really shouldn't show up
in the first level below svn-test-work/, so I guess we can just use
-print and be done with it.

And in case you were wondering why we don't simply nuke the whole
svn-test-work directory: mounting or symlinking a RAM-disk to it is a
rather common setup amongst the developers, in order to make the tests
run faster.

-- Brane

Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2013-11-07 17:07:00 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.