FS#64397 - [gcc8] Missing symlink to cc1 / cc1plus?

Attached to Project: Community Packages
Opened by Jonas Eschmann (jonas_eschmann) - Tuesday, 05 November 2019, 15:51 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 20 November 2019, 18:14 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
After building gcc-8 and invoking cmake by "CC=/usr/bin/gcc-8 CXX=/usr/bin/g++-8 cmake .." cmake complains that it is not able to compile a simple program.
I verified it with a simple hello-world program by calling gcc-8 directly:
"gcc-8 main_test.c". This effort is aborted with "Additional info:gcc-8: error trying to exec 'cc1': execvp: No such file or directory". After not finding any advice online, I dug deeper using strace. I singled out a missing file "/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/cc1".
Creating a symlink from "/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/cc1" to "/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/cc1-8" solved the issue for me.
I had to do the same for the "cc1plus-8" file linking to "cc1plus" for g++ to work.
I hope this might help someone encountering the same issue. For reference: I stumbled upon this problem because cuda needs gcc <= 8. I hope the strace does not leak meaningful information as I haven't used it before.



* package version(s): 8.3.0-1
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
Clone: gcc 8.3.0-1
Build package: makepkg -is (not quite sure about -is at this point)
Compile main_test: gcc-8 main_test.c

This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Wednesday, 20 November 2019, 18:14 GMT
Reason for closing:  No response
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 09 November 2019, 14:47 GMT
Can't reproduce with your provided test file and the exact command provided using the official gcc8 package. Can you post the output of:

- which gcc-8
- uname -a
- pacman -Qi gcc8

Loading...