Fix MPFR build failure due to aclocal-1.17 not found#2834
Merged
mgehre-amd merged 1 commit intomainfrom Jan 9, 2026
Merged
Conversation
Issue: When building therock-mpfr, the build fails with: [therock-mpfr] aclocal-1.17: command not found This occurs because cmake -E copy_directory does not preserve file timestamps. When the MPFR source is copied to the build directory, autoconf-generated files (configure, aclocal.m4, Makefile.in) end up with newer timestamps than their source files (configure.ac, etc.), causing the autotools build system to attempt regeneration. This regeneration requires the exact automake version (1.17) that was used to generate the original files. How to reproduce: 1. Build TheRock with MPFR enabled on a system without automake 1.17 2. The build fails at the MPFR configure step with: /path/to/missing: line 85: aclocal-1.17: command not found Fix: Touch the critical autoconf-generated files after copying to ensure their timestamps are newer than the source files. This prevents the autotools build system from trying to regenerate them. This approach matches the existing workaround used in the GMP build (third-party/sysdeps/common/gmp/CMakeLists.txt). Testing: After applying this fix, clean the MPFR build directory and rebuild: rm -rf build/third-party/sysdeps/linux/mpfr ninja -C build therock-mpfr The MPFR build should complete successfully without requiring automake to be installed. Alternative fix: Instead of this patch, we could alternatively require developers to have automake 1.17 installed on their system.
Contributor
|
Thanks for the PR. I think this is OK as a workaround. But ultimately I think we'll need to switch to building straight from the extracted source directory since that has preserved timestamps. Edit: I have a plan to do that for gmp/mpfr/expat/ncurses. |
Contributor
|
CI looks OK. The failures seem unrelated to the changes in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When building therock-mpfr, the build fails with:
[therock-mpfr] aclocal-1.17: command not found
when automake 1.17 is not installed. In our README.md's
Setup - Ubuntu (24.04)section, we don't require to install it.This occurs because
cmake -E copy_directorydoes not preserve file timestamps. When the MPFR source is copied to the build directory, autoconf-generated files (aclocal.m4, Makefile.in) end up with newer timestamps than their source files (configure.ac, etc.), causing the autotools build system to attempt regeneration. This regeneration requires the exact automake version (1.17) that was used to generate the original files.Fix:
Touch the critical autoconf-generated files after copying to ensure their timestamps are newer than the source files. This prevents the autotools build system from trying to regenerate them. This approach matches the existing workaround used in the GMP build (third-party/sysdeps/common/gmp/CMakeLists.txt).
Test Plan
No aclocal-1.17 installed locally
Test Result
Succesful
Submission Checklist