autoreconf phase

35 views
Skip to first unread message

Itaru Kitayama

unread,
May 23, 2021, 5:24:27 PM5/23/21
to Spack
Hi,
Am I correct that in autoreconf phase, if a package has configure file, there's
no autoreconf happens at all, but just prints out as every autoconf based package
is supposed to go through the phase?

Pariksheet Nanda

unread,
May 24, 2021, 8:39:23 AM5/24/21
to sp...@googlegroups.com

By default, yes, autoreconf is not run if configure is present, but if you're patching configure.ac / configure.in then you can set the force_autoreconf flag to True as a static variable of your package.py derived class: https://github.com/spack/spack/blob/d805be02eca72de2fd332392db97eda3b8dbd893/lib/spack/spack/build_systems/autotools.py#L78

from spack import *
...
class MySpackPackage(AutotoolsPackage):
    ...
    force_autoreconf = True
    ....

If you have some non-standard m4 macros, you can add them as a build dependency and autoreconf_search_path_args should pick up on those if you add those packages as a dependency and they install their m4 macros under ${prefix}/share/aclocal https://github.com/spack/spack/blob/d805be02eca72de2fd332392db97eda3b8dbd893/lib/spack/spack/build_systems/autotools.py#L284

from spack import *
...
class MySpackPackage(AutotoolsPackage):
    ...
    depends_on('autoconf-archive', type='build') # for various share/aclocal/ax_*.m4
    depends_on('pkgconf', type='build') # for share/aclocal/pkg.m4

    force_autoreconf = True
    ....

In case you need it, pass in any autoreconf flags other than -ivf (like, say, -Werror while you're playing with things) by setting the list autoreconf_extra_args: https://github.com/spack/spack/blob/d805be02eca72de2fd332392db97eda3b8dbd893/lib/spack/spack/build_systems/autotools.py#L80

Pariksheet


On 5/23/21 5:24 PM, Itaru Kitayama wrote:
*Message sent from a system outside of UConn.*

--
You received this message because you are subscribed to the Google Groups "Spack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spack/432c09ae-8cd7-4970-bf89-ea2314d654f0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages