Repository: spack/spack

Issue:
Installation issue: serf
### Steps to reproduce the issue

```console
$ spack install serf
...
```


### Error message

<details><summary>Error message</summary><pre>
==> Installing serf-1.3.9-47no22l5awkdaoejmalqfntb7y26lcwp
==> No binary for serf-1.3.9-47no22l5awkdaoejmalqfntb7y26lcwp found: installing from source
==> Using cached archive: /opt/packages/gpjohnsn/spack/var/spack/cache/_source-cache/archive/54/549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc.tar.bz2
==> Applied patch /opt/packages/gpjohnsn/spack/var/spack/repos/builtin/packages/serf/py3syntax.patch
==> Applied patch /opt/packages/gpjohnsn/spack/var/spack/repos/builtin/packages/serf/py3-hashbang.patch
==> serf: Executing phase: 'build'
==> Error: TypeError: build_args() missing 2 required positional arguments: 'spec' and 'prefix'

/opt/packages/gpjohnsn/spack/lib/spack/spack/builder.py:142, in __forward:
  >>    142        def __forward(self, *args, **kwargs):
        143            return self.__getattr__(fn_name)(*args, **kwargs)
</pre></details>
@cosmicexplorer 

This is strange because the file looks correct.
```
    def build_args(self, spec, prefix):
        args = {
            "PREFIX": prefix,
            "APR": spec["apr"].prefix,
            "APU": spec["apr-util"].prefix,
            "OPENSSL": spec["openssl"].prefix,
            "ZLIB": spec["zlib"].prefix,
            "DEBUG": "yes" if "+debug" in spec else "no",
        }
```

### Information on your system

* **Spack:** 0.19.0.dev0
* **Python:** 3.6.8
* **Platform:** linux-centos7-cascadelake
* **Concretizer:** clingo

### Additional information

_No response_

### General information

- [X] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [X] I have run `spack maintainers <name-of-the-package>` and **@mentioned** any maintainers
- [X] I have uploaded the build log and environment files
- [X] I have searched the issues of this repo and believe this is not a duplicate


Discussion:

Resolving patch:
diff --git a/lib/spack/spack/build_systems/scons.py b/lib/spack/spack/build_systems/scons.py
--- a/lib/spack/spack/build_systems/scons.py
+++ b/lib/spack/spack/build_systems/scons.py
@@ -21,8 +21,6 @@ class SConsPackage(spack.package_base.PackageBase):
     #: build-system class we are using
     build_system_class = "SConsPackage"
 
-    #: Callback names for build-time test
-    build_time_test_callbacks = ["build_test"]
     #: Legacy buildsystem attribute used to deserialize and install old specs
     legacy_buildsystem = "scons"
 
@@ -48,18 +46,24 @@ class SConsBuilder(BaseBuilder):
     phases = ("build", "install")
 
     #: Names associated with package methods in the old build-system format
-    legacy_methods = ("build_args", "install_args", "build_test")
+    legacy_methods = ("install_args", "build_test")
+
+    #: Same as legacy_methods, but the signature is different
+    legacy_long_methods = ("build_args",)
 
     #: Names associated with package attributes in the old build-system format
-    legacy_attributes = ()
+    legacy_attributes = ("build_time_test_callbacks",)
+
+    #: Callback names for build-time test
+    build_time_test_callbacks = ["build_test"]
 
-    def build_args(self):
+    def build_args(self, spec, prefix):
         """Arguments to pass to build."""
         return []
 
     def build(self, pkg, spec, prefix):
         """Build the package."""
-        args = self.build_args()
+        args = self.build_args(spec, prefix)
         inspect.getmodule(self.pkg).scons(*args)
 
     def install_args(self):


Test patch: