-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
build(linux): explicitely set CC and CXX compilers #4325
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
build(linux): explicitely set CC and CXX compilers #4325
Conversation
In Fedora wget complains about -O relative path
Cmake complains about not finding compilers
This is copied from the rpm spec file.
ReenigneArcher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for another PR!
As a note: we don't use this script for Fedora or Arch internally, so it's likely those 2 will break from time to time. We used it for Fedora before we changed to the copr builds.
I know, I'm just saying you could ;). The logic in the script and the rpm spec is now basically the same. |
Simplify compiler version definitions
|
I've removed all the compiler version logic with alternative compilers and just set the compiler with version before cmake runs. It's much cleaner indeed. Tested all build again, no issues found. |
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4325 +/- ##
==========================================
- Coverage 12.01% 11.98% -0.03%
==========================================
Files 87 87
Lines 17572 17572
Branches 8076 8076
==========================================
- Hits 2111 2106 -5
- Misses 14743 14748 +5
Partials 718 718
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Just one thing to fix/tweak. This step (https://github.com/PVermeer/Sunshine/blob/699e8347da229243c190cea1fb8950a5b0f35ecd/.github/workflows/ci-linux.yml#L180) is failing because it's finding a different gcov version than what version of gcc the code was compiled with. I guess because the export variables are not getting picked up by this step. I think to solve it we can echo the variables to the GITHUB_ENV file, like so. Then they will picked up in later steps automatically. {
echo "CC=gcc-${gcc_version}"
echo "CXX=g++-${gcc_version}"
} >> "${GITHUB_ENV}"This assumes gcovr/gcov will use the CC/CXX variables. |
|
Setting the variables doesn't work. python3 -m gcovr --gcov-executable gcov-14 . -r ../src \
--exclude-noncode-lines \
--exclude-throw-branches \
--exclude-unreachable-branches \
--verbose \
--xml-pretty \
-o coverage.xmlI've implemented your suggestion with the info above (20cec98). |
|



Description
This is hopefully the last PR. This fixes the fedora package build via cmake. When I build sunshine locally I could never get cuda to work so I always build it without it since I don't need it.
However I looked into the rpm spec file and transferred those changes to the
linux_build.shscript and it now all seems to work.Issues & solutions
wgetComplained about the relative link in the -O argument when downloading cuda so I made it resolve to an an absolute path before it gets used (2beecac).cmakeComplained it could not find compilers so these are now explicitly set. This was already done in thecoprbuild (0279b20).cudaCould not build so I copied some config over from the rpm spec (16918a8):--overrideflag conditionallyCMAKE_CUDA_HOST_COMPILERflag to cmakeEvery docker (including my own Fedora) is now building and packaging correctly. I don't know anything about building cuda so please look carefully.
I also want to note that it should also be possible to use the
linux_build.shscript in thecoprbuild so you don't have to maintain two separate builds. Things like cuda, the build and install could be run from the script.Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage