Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoreconf calls incorrect aclocal ? #1307

Closed
peterbecich opened this issue Dec 6, 2021 · 4 comments
Closed

autoreconf calls incorrect aclocal ? #1307

peterbecich opened this issue Dec 6, 2021 · 4 comments
Labels
bug Something isn't working wontfix

Comments

@peterbecich
Copy link
Contributor

peterbecich commented Dec 6, 2021

Edit: The real question is #1307 (comment)


I need both of these modules:

I am attempting to build the package network (https://hackage.haskell.org/package/network) with haskell.nix. So in this case the modules are named:

  • packages.network.components.library.preConfigure
  • packages.network.components.tests.spec.preConfigure

Each component of the network package requires autoreconf -i (#778). For the library component, I provide this module:

    {
      packages.network.components.library.preConfigure = ''
        ${pkgs.autoconf}/bin/autoreconf -i
      '';
    }

https://github.com/peterbecich/network/blob/40cd8979c4d9be3087331af18de0dce8aa8b69af/default.nix#L11-L15

With the test suites removed from network.cabal (https://github.com/peterbecich/network/blob/40cd8979c4d9be3087331af18de0dce8aa8b69af/network.cabal#L131) , nix build -f . succeeds:

% nix build -f . 
trace: No index state specified for haskell-project, using the latest index state that we know about (2021-12-06T00:00:00Z)!
trace: To make project.plan-nix for hoogle a fixed-output derivation but not materialized, set `plan-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'.
trace: To materialize project.plan-nix for hoogle entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.

%

However, the equivalent fix for the test suites does not work:

    {
      packages.network.components.tests.spec.preConfigure = ''
        ${pkgs.autoconf}/bin/autoreconf -i
      '';
    }

https://github.com/peterbecich/network/blob/40cd8979c4d9be3087331af18de0dce8aa8b69af/default.nix#L16-L20

nix build -f . fails with:

> Can't exec "aclocal": 
No such file or directory at 
/nix/store/8z4gik27qf799hvs5yimrv97didlw1an-autoconf-2.71/share/autoconf/Autom4te/FileUtils.pm line 274.
> autoreconf: error: aclocal failed with exit status: 2

Why does autoreconf -i succeed for the first module (operating on library), but fail for the second module (operating on test suite spec)?

Could it be that aclocal is not called by the library preconfiguration, and aclocal is non-existent for both modules?

Thank you

@peterbecich
Copy link
Contributor Author

peterbecich commented Dec 6, 2021

This has nothing to do with ..components.library.preConfigure versus ..components.tests..preConfigure.


autoreconf -i calls aclocal:

    {
      packages.network.components.tests.spec.preConfigure = ''
        ${pkgs.autoconf}/bin/autoreconf -i
      '';
    }

aclocal doesn't exist:

> Can't exec "aclocal": 
No such file or directory at 
/nix/store/8z4gik27qf799hvs5yimrv97didlw1an-autoconf-2.71/share/autoconf/Autom4te/FileUtils.pm line 274.

Improvement:

    {
     packages.network.components.library.preConfigure = ''
       ${pkgs.automake}/bin/aclocal
     '';
   }
> sh: autom4te: not found
> aclocal: error: autom4te failed with exit status: 127

Is this the solution:

  • patch autoreconf to point to ${pkgs.automake}/bin/aclocal
  • patch aclocal to point to ${pkgs.automake}/bin/autom4te

Thank you

@peterbecich peterbecich changed the title Difference between ..components.library.preConfigure and ..components.tests..preConfigure? autoreconf calls incorrect aclocal Dec 6, 2021
@peterbecich peterbecich changed the title autoreconf calls incorrect aclocal autoreconf calls incorrect aclocal ? Dec 6, 2021
@angerman
Copy link
Collaborator

I think the key here is pkgs.automake should be part of the buildInputs for the library?

@angerman
Copy link
Collaborator

A quickfix would likely be:

PATH=${pkgs.autoconf}/bin:$PATH autoreconf -i

for the preConfigure phase.

@yvan-sraka yvan-sraka added the bug Something isn't working label Sep 20, 2022
@stale
Copy link

stale bot commented Jan 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 18, 2023
@stale stale bot closed this as completed Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix
Projects
None yet
Development

No branches or pull requests

3 participants