php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48947 vcsclean should remove .lo and .la files
Submitted: 2009-07-16 16:50 UTC Modified: 2009-07-17 12:14 UTC
From: sixd@php.net Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.3CVS-2009-07-16 (CVS) OS: Ubuntu 8.10 (32bit)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sixd@php.net
New email:
PHP Version: OS:

 

 [2009-07-16 16:50 UTC] sixd@php.net
Description:
------------
The files removed by vcsclean are only a subset of the files removed by 'make clean'.  File extensions .lo .la .gcno .gcda are not removed by vcsclean.

Using the sequence 'cd php53; svn up; ./vcsclean; ./configure ...;
make' fails to find some .o files.

Some .o's get built but link fails with a bunch of errors of the form:
  gcc: ext/<ext>/.libs/<file>.o: No such file or directory

The vcsclean command removes the ext/*/.libs directories but doesn't
remove ext/*.lo files. This causes C files to be skipped for recompilation and no .libs/*.o files are created. 

A patch is to add .lo to the extension list in build/build.mk.

Index: build.mk
===================================================================
--- build.mk	(revision 284190)
+++ build.mk	(working copy)
@@ -67,12 +67,12 @@
 
 cvsclean-work:
 	@for i in `find . -name .cvsignore`; do \
-		(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice | sed 's/[[:space:]]/ /g'` *.o *.a .libs || true); \
+		(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice | sed 's/[[:space:]]/ /g'` *.lo *.o *.a .libs || true); \
 	done
 
 svnclean-work:
 	@for i in `find . -type d -not -path '*/.svn/*' | grep -v '.svn'`; do \
-		(cd `dirname $$i` 2>/dev/null && rm -rf `svn propget svn:ignore . | grep -v config.nice` *.o *.a .libs || true); \
+		(cd `dirname $$i` 2>/dev/null && rm -rf `svn propget svn:ignore . | grep -v config.nice` *.o *.lo *.a .libs || true); \
 	done
 
 gitclean-work:

Also, adding '.la .gcno .gcda' in addition to '.lo' would make
vcsclean consistent with 'make clean'.

A secondary bug is that .o files are not recreated from existing .lo files.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-17 12:14 UTC] jani@php.net
Fixed in all branches. And if you really want to do clean builds, build outside source tree.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 23:00:02 2025 UTC