Circular port dependency

George Mitchell george+freebsd at
Sat Jan 19 15:04:27 UTC 2013

On 01/11/13 19:41, George Mitchell wrote:
> On 01/11/13 03:22, Gleb Kurtsou wrote:
>> On (10/01/2013 20:21), George Mitchell wrote:
>>> I grabbed the ports tree as of 308518, the RELEASE_9_1_0 tag.
>>> devel/libtool won't build, because it requires autom4te during the
>>> configure phase.  So I put "BUILD_DEPENDS= autom4te:devel/autoconf"
>>> in the Makefile.  But autoconf depends on gmake, which depends on
>>> gettext, which depends on libiconv, which depends on libtool.
>>> What to do?
>> [...]

It turns out that my problem was due to compiling on the Raspberry
Pi, a machine that is slow enough that this post-configure target in
the port's top-level Makefile:

         @${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH} -f

could end up setting the last write time for config.status earlier than
the last write time for configure, thereby triggering this make rule in
the port's own Makefile:

$(top_builddir)/config.status: $(top_srcdir)/configure 
         $(SHELL) ./config.status --recheck

It's this "--recheck" that would cause the build to try to run autom4ke,
leading to the circular dependency.  So the correct fix is as attached,
guaranteeing that the config.status modification time will always be

I'm not entirely sure why the post-configure rule is there in the first
place, and refuses to show me anything in
ports/head/devel below liglogging.  I was trying to look at the log
for ports/devel/Makefile to see how the post-configure rule got there,
because simply removing it also appears to make the build succeed.  But
I assume it's there for some reason, and this fix seems to be less
antagonistic than removing the whole rule.                    -- George
-------------- next part --------------
--- Makefile.orig	2013-01-10 19:56:02.000000000 -0500
+++ Makefile	2013-01-19 09:44:24.000000000 -0500
@@ -34,6 +34,6 @@
 		${WRKSRC}/configure ${WRKSRC}/libltdl/configure
-	@${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH} -f
+	@${FIND} ${WRKSRC} -type f -name config.status | ${XARGS} ${TOUCH} -f
 .include <>

More information about the freebsd-ports mailing list