Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1482491 - clang: compliler doesn't compile: cannot find -lgcc_s
Summary: clang: compliler doesn't compile: cannot find -lgcc_s
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: clang
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Stellard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-17 12:17 UTC by Nikos Mavrogiannopoulos
Modified: 2018-04-05 14:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-05 14:35:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nikos Mavrogiannopoulos 2017-08-17 12:17:25 UTC
Description of problem:
Attempting to compile any program with the shipped clang in Fedora fails. The application is unusable as shipped.

How reproducible:
cat >c.c <<__EOF__
int main(){
printf("hello world");
}
__EOF__
[nmavrogi@dhcp-10-40-1-102 libidn2]$ clang c.c
[...]
/usr/bin/ld: cannot find -lgcc_s
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)

Comment 1 Nikos Mavrogiannopoulos 2017-08-17 12:18:29 UTC
$ rpm -q clang
clang-4.0.0-3.fc26.x86_64

Comment 2 Nikos Mavrogiannopoulos 2017-08-22 14:27:07 UTC
Going through strace it seems it is configured for x86_64-linux-gnu, while libgcc_s resides in x86_64-redhat-linux.


18277 open("/usr/bin/../lib/gcc/x86_64-linux-gnu/7/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/bin/../lib/gcc/x86_64-linux-gnu/7/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/bin/../lib/gcc/x86_64-linux-gnu/7/../../../../lib64/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/bin/../lib/gcc/x86_64-linux-gnu/7/../../../../lib64/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/bin/../lib64/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/bin/../lib64/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/lib/../lib64/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/lib/../lib64/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/lib/../lib64/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/lib/../lib64/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/bin/../lib/gcc/x86_64-linux-gnu/7/../../../libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/bin/../lib/gcc/x86_64-linux-gnu/7/../../../libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/bin/../lib/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/bin/../lib/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/lib/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/lib/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/lib/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("/usr/lib/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/x86_64-redhat-linux/lib64/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/x86_64-redhat-linux/lib64/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/lib64/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/lib64/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/local/lib64/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/local/lib64/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//lib64/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//lib64/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/x86_64-redhat-linux/lib/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/x86_64-redhat-linux/lib/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/local/lib/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/local/lib/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//lib/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//lib/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/lib/libgcc_s.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18277 open("//usr/lib/libgcc_s.a", O_RDONLY) = -1 ENOENT (No such file or directory)

Comment 3 Tom Stellard 2017-08-22 18:23:46 UTC
Which versions of gcc do you have installed?

Comment 4 Nikos Mavrogiannopoulos 2017-08-23 06:55:45 UTC
$ rpm -q gcc
gcc-7.1.1-3.fc26.x86_64

Comment 5 Tom Stellard 2017-08-23 07:01:59 UTC
It looks like you may have two versions of gcc installed, which version is installed in /usr/bin/../lib/gcc/x86_64-linux-gnu/7 ?

Comment 6 Nikos Mavrogiannopoulos 2017-08-23 07:38:19 UTC
$ rpm -qf /usr/bin/../lib/gcc/x86_64-linux-gnu/7
gcc-x86_64-linux-gnu-7.0.1-0.4.fc26.x86_64

No idea what was that, and removing it didn't pull out any other dependencies.
Removing it fixes the issue. Thank you.

Comment 7 Michael S. Tsirkin 2018-01-08 16:52:41 UTC
gcc-x86_64-linux-gnu-7.2.1-1.fc27.x86_64 is a cross gcc
that's handy for doing cross builds of a kernel.
it's not a complete gcc and clang seems to try to use that
which is probably the issue.

not a show stopper but would be nice to resolve

Comment 8 Fedora Update System 2018-02-12 15:28:53 UTC
clang-5.0.1-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-acf8a9ad84

Comment 9 Fedora Update System 2018-02-13 07:59:55 UTC
clang-5.0.1-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-acf8a9ad84

Comment 10 Fedora Update System 2018-02-20 17:14:41 UTC
clang-5.0.1-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Tom Stellard 2018-03-22 13:25:34 UTC
Fixed in rawhide:  clang-6.0.0-3.fc29

Comment 12 Fedora Update System 2018-04-02 14:21:14 UTC
pocl-1.1-2.fc28 lldb-6.0.0-3.fc28 clang-6.0.0-5.fc28 llvm-6.0.0-11.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-02c4091319

Comment 13 Fedora Update System 2018-04-03 15:57:06 UTC
clang-6.0.0-5.fc28, lldb-6.0.0-3.fc28, llvm-6.0.0-11.fc28, mesa-18.0.0-2.fc28.1, pocl-1.1-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-02c4091319

Comment 14 Fedora Update System 2018-04-03 23:25:03 UTC
clang-6.0.0-5.fc28 lldb-6.0.0-3.fc28 llvm-6.0.0-11.fc28 mesa-18.0.0-3.fc28 pocl-1.1-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-02c4091319

Comment 15 Fedora Update System 2018-04-04 18:34:59 UTC
clang-6.0.0-5.fc28, lldb-6.0.0-3.fc28, llvm-6.0.0-11.fc28, mesa-18.0.0-3.fc28, pocl-1.1-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-02c4091319

Comment 16 Fedora Update System 2018-04-05 11:47:43 UTC
clang-6.0.0-5.fc28, lldb-6.0.0-3.fc28, llvm-6.0.0-11.fc28, mesa-18.0.0-3.fc28, pocl-1.1-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.