You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andy Stocks <an...@hansard.com> on 2013/11/07 16:53:06 UTC

Subversion Makefile.in issue on Solaris 10

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.

Cheers,
Andy
The contents of this message and any attachments are confidential and are
intended for the use of the persons to whom it is addressed.
If you are not the intended recipient, you should not copy, forward, use or
alter the message in any way, nor disclose its contents to any other person.
Please notify the sender immediately and delete the e-mail from your system,
if you so wish you can contact us on +44 1624 688000. The sender is not
responsible for any alterations that may have occurred without authorisation.
Any files attached to this email will have been checked by us with virus
detection software before transmission. You should carry out your own virus
checks before opening any attachments, as we do not accept any liability for
loss or damage which may be caused by viruses.

For information regarding company registration please visit the contact page at www.hansard.com


Re: Subversion Makefile.in issue on Solaris 10

Posted by Branko Čibej <br...@wandisco.com>.
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@wandisco.com