Skip to content

Fix install issue for kernels built with other gcc#129

Merged
jafingerhut merged 21 commits intop4lang:mainfrom
jafingerhut:fix-install-issue-for-kernels-built-with-other-gcc
Mar 7, 2026
Merged

Fix install issue for kernels built with other gcc#129
jafingerhut merged 21 commits intop4lang:mainfrom
jafingerhut:fix-install-issue-for-kernels-built-with-other-gcc

Conversation

@jafingerhut
Copy link
Contributor

No description provided.

Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
@jafingerhut
Copy link
Contributor Author

I am testing this on my personal Ubuntu 22.04 VM where I saw the failure earlier, and will add another comment here with the results when it is done.


cd "${KDIR}"
eval `make --dry-run --print-data-base 2>/dev/null | grep '^HOSTCC' | head -n 1 | sed 's/ //g'`
sudo apt-get install -y ${HOSTCC}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably check whether the compiler is actually available in the package list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, the worst that can happen is that the install will fail, and someone will open an issue, yes? On the Ubuntu LTS systems I have checked (20.04, 22.04, and 24.04), the value of HOSTCC is always gcc-<number> and the package is installable.

@jafingerhut jafingerhut merged commit 1f033e2 into p4lang:main Mar 7, 2026
3 checks passed
@jafingerhut
Copy link
Contributor Author

Oh, forgot my comment. On an Ubuntu 22.04 system where gcc version 11 was the version installed via the package named gcc, and the value of HOSTCC was gcc-12, with these changes the installation went smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants