Page 1 of 1

[fixed] Bug: Build on OSX (all recent version of Abinit)

Posted: Mon Apr 16, 2012 5:24 am
by kaneod
Hi,

As noted in another thread (http://forum.abinit.org/viewtopic.php?f=17&t=1609), there is a build bug in all recent versions of Abinit. The m4 macro AX_PROG_MKDIR_P from util_fixes in both the fallbacks subtree and the tests subtree incorrectly tries to assign MKDIR_P a prefix of "fallbacks_srcdir", which isn't set anywhere. This is still a problem in 6.12.3.

The incorrect assignment leads to build failures if fallbacks are required and a fail during installation of the tests.

The quick workaround for users is simply to change fallbacks_srcdir to srcdir in every instance in the configure files in each subdirectory (it appears to be a relic variable).

The proper fix for developers is to update the AX_PROG_MKDIR_P macro. Just changing fallbacks_srcdir to srcdir might work here but I don't know if this breaks something on autoreconf (or whatever process is used by the abinit devs to generate the configure.ac files and so on).

Is there a higher purpose to the existence of the fallbacks_srcdir variable?

Kane

Re: Bug: Build on OSX (all recent version of Abinit)

Posted: Tue Apr 17, 2012 5:46 pm
by pouillon
Thanks for reporting this problem. I'll fix it ASAP.

Re: Bug: Build on OSX (all recent version of Abinit)

Posted: Tue Apr 24, 2012 10:22 am
by pouillon
Here is a patch against Abinit 6.12.3, for those who would need it.

Code: Select all

=== modified file 'fallbacks/config/m4/util-fixes.m4'
--- fallbacks/config/m4/util-fixes.m4   2011-02-05 14:31:22 +0000
+++ fallbacks/config/m4/util-fixes.m4   2012-04-24 08:14:41 +0000
@@ -19,7 +19,7 @@
   ax_tmp_mkdir_p=`echo "${MKDIR_P}" | awk '{print [$]1}'`
   if test "${ax_tmp_mkdir_p}" = "config/gnu/install-sh"; then
     AC_MSG_NOTICE([fixing wrong path to mkdir replacement])
-    MKDIR_P="${fallbacks_srcdir}/${MKDIR_P}"
+    MKDIR_P="${ac_abs_top_srcdir}/${MKDIR_P}"
   fi
   unset ax_tmp_mkdir_p
 ]) # AX_PROG_MKDIR_P


Re: Bug: Build on OSX (all recent version of Abinit)

Posted: Thu Apr 26, 2012 4:55 am
by kaneod
Hi Yann,

You'll need to apply that patch against tests/config/m4/util-fixes.m4 as well. It has the same problem.

Kane

Re: Bug: Build on OSX (all recent version of Abinit)

Posted: Thu Apr 26, 2012 12:29 pm
by pouillon
You're just plain right. Same in doc/ as well.

Here is the full patch:

Code: Select all

=== modified file 'doc/config/m4/util-fixes.m4'
--- doc/config/m4/util-fixes.m4   2011-08-02 17:01:38 +0000
+++ doc/config/m4/util-fixes.m4   2012-04-26 10:01:20 +0000
@@ -19,7 +19,7 @@
   ax_tmp_mkdir_p=`echo "${MKDIR_P}" | awk '{print [$]1}'`
   if test "${ax_tmp_mkdir_p}" = "config/gnu/install-sh"; then
     AC_MSG_NOTICE([fixing wrong path to mkdir replacement])
-    MKDIR_P="${fallbacks_srcdir}/${MKDIR_P}"
+    MKDIR_P="${ac_abs_top_srcdir}/${MKDIR_P}"
   fi
   unset ax_tmp_mkdir_p
 ]) # AX_PROG_MKDIR_P

=== modified file 'fallbacks/config/m4/util-fixes.m4'
--- fallbacks/config/m4/util-fixes.m4   2011-02-05 14:31:22 +0000
+++ fallbacks/config/m4/util-fixes.m4   2012-04-26 10:25:10 +0000
@@ -19,7 +19,7 @@
   ax_tmp_mkdir_p=`echo "${MKDIR_P}" | awk '{print [$]1}'`
   if test "${ax_tmp_mkdir_p}" = "config/gnu/install-sh"; then
     AC_MSG_NOTICE([fixing wrong path to mkdir replacement])
-    MKDIR_P="${fallbacks_srcdir}/${MKDIR_P}"
+    MKDIR_P="${ac_abs_top_srcdir}/${MKDIR_P}"
   fi
   unset ax_tmp_mkdir_p
 ]) # AX_PROG_MKDIR_P

=== modified file 'tests/config/m4/util-fixes.m4'
--- tests/config/m4/util-fixes.m4   2011-10-29 23:01:07 +0000
+++ tests/config/m4/util-fixes.m4   2012-04-26 10:01:37 +0000
@@ -19,7 +19,7 @@
   ax_tmp_mkdir_p=`echo "${MKDIR_P}" | awk '{print [$]1}'`
   if test "${ax_tmp_mkdir_p}" = "config/gnu/install-sh"; then
     AC_MSG_NOTICE([fixing wrong path to mkdir replacement])
-    MKDIR_P="${fallbacks_srcdir}/${MKDIR_P}"
+    MKDIR_P="${ac_abs_top_srcdir}/${MKDIR_P}"
   fi
   unset ax_tmp_mkdir_p
 ]) # AX_PROG_MKDIR_P


Re: [fixed] Bug: Build on OSX (all recent version of Abinit)

Posted: Tue May 01, 2012 1:40 am
by kaneod
Ah it's in ./tests as well.

Re: [fixed] Bug: Build on OSX (all recent version of Abinit)

Posted: Wed May 02, 2012 10:52 am
by pouillon
Yes, this is included in the full patch above. Just scroll down the text to see it.