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

Documentation, Web site and code modifications

Moderators: baguetl, routerov

Locked
kaneod
Posts: 42
Joined: Wed Mar 10, 2010 11:47 am

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

Post by kaneod » Mon Apr 16, 2012 5:24 am

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
Dr Kane O'Donnell
Postdoctoral Research Fellow
Australian Synchrotron

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

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

Post by pouillon » Tue Apr 17, 2012 5:46 pm

Thanks for reporting this problem. I'll fix it ASAP.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

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

Post by pouillon » Tue Apr 24, 2012 10:22 am

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

Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

kaneod
Posts: 42
Joined: Wed Mar 10, 2010 11:47 am

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

Post by kaneod » Thu Apr 26, 2012 4:55 am

Hi Yann,

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

Kane
Dr Kane O'Donnell
Postdoctoral Research Fellow
Australian Synchrotron

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

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

Post by pouillon » Thu Apr 26, 2012 12:29 pm

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

Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

kaneod
Posts: 42
Joined: Wed Mar 10, 2010 11:47 am

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

Post by kaneod » Tue May 01, 2012 1:40 am

Ah it's in ./tests as well.
Dr Kane O'Donnell
Postdoctoral Research Fellow
Australian Synchrotron

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

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

Post by pouillon » Wed May 02, 2012 10:52 am

Yes, this is included in the full patch above. Just scroll down the text to see it.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Locked