Fix gfortran f951 lookup failure on cflinuxfs5#380
Merged
Conversation
The bundled gfortran binary cannot find the f951 compiler frontend on cflinuxfs5 because it searches GCC's compiled-in libexec path, which does not exist in the runtime container. Set GCC_EXEC_PREFIX to point to the R binary's bin directory (which contains f951) so gfortran can locate it during CRAN package installation.
…ssion GCC_EXEC_PREFIX caused gcc and g++ to fail with 'cannot execute cc1/cc1plus' on cflinuxfs4 because those binaries are not in the R bin directory. COMPILER_PATH adds extra search directories without overriding the default paths, so gfortran finds f951 in the R bin dir while gcc/g++ still find cc1/cc1plus in /usr/libexec/gcc/.
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.
Summary
hexbin,forecast, etc.) on cflinuxfs5 by settingGCC_EXEC_PREFIXin the R package installation environmentf951, which does not exist in the cflinuxfs5 runtime containerGCC_EXEC_PREFIXto the R binary's bin directory (which contains the bundledf951), gfortran can locate it duringinstall.packages()Root Cause
The
specs-switchblade-docker-cflinuxfs5test fails on thefortran_requiredfixture with:The R binary artifact bundles both
gfortranandf951inR/bin/. At staging time,gfortranis found viaPATH(set up bySetStagingEnvironment()), but when gfortran tries to invokef951, it uses GCC's internal search paths (e.g./usr/libexec/gcc/x86_64-linux-gnu/14/) rather thanPATH. Since the cflinuxfs5 runtime Docker image doesn't have gfortran installed system-wide,f951is not found at those paths.Changes
src/r/supply/supply.go: SetGCC_EXEC_PREFIXenv var inInstallPackages()pointing to$DEPS_DIR/<idx>/r/bin/so the bundled gfortran findsf951src/r/supply/supply_test.go: Added assertion verifyingGCC_EXEC_PREFIXis set in the command environmentTesting
specs-switchblade-docker-cflinuxfs5build Please configure GITBOT #1 (10/11 tests pass, onlyfortran_requiredfails)