FS#48606 - [cargo] Missing dependency clang

Attached to Project: Community Packages
Opened by Tuxle (dns2utf8) - Wednesday, 16 March 2016, 11:31 GMT
Last edited by Alexander F. Rødseth (xyproto) - Sunday, 11 December 2016, 18:13 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Cargo needs clang installed to be able to compile.

Additional info:
* package version: 0.9.0-3
* no config


Steps to reproduce:
0. Fresh Arch Installaiton with the 'cargo' Package.
1. $ cargo new --bin cargo_test
2. $ cd cargo_test
3. $ cargo run
error: could not exec the linker `cc`: No such file or directory (os error 2)
Could not compile `shotgun`.
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Sunday, 11 December 2016, 18:13 GMT
Reason for closing:  Fixed
Comment by Alexander F. Rødseth (xyproto) - Thursday, 17 March 2016, 23:23 GMT
Thanks for reporting! The updated package will appear in [community] shortly.
Comment by ollie27 (ollie27) - Thursday, 31 March 2016, 15:03 GMT
  • Field changed: Percent Complete (100% → 0%)
As far as I know cargo doesn't actually depend on clang however rustc does depend on gcc.
I think the clang dependency can be removed from cargo and a dependency on gcc added to the rust package instead.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 31 July 2016, 23:31 GMT
I agree, cargo does not seem to depend on clang.

rustc depends on /usr/lib/libgcc_s.so.1, owned by the gcc-libs package.

I'm building cargo without clang. If the steps to reproduce the issue are no longer a problem, I'll push a new cargo package soon.
Comment by Alexander F. Rødseth (xyproto) - Monday, 01 August 2016, 00:57 GMT
Works without clang here. Can't reproduce the steps above anymore. The updated package will appear in [community] shortly.
Comment by ollie27 (ollie27) - Tuesday, 02 August 2016, 12:31 GMT
  • Field changed: Percent Complete (100% → 0%)
Thanks for removing the clang dependency for cargo.

However I should have been more clear. The rust package should depend on gcc or at least if people want to create binaries out of the box it should. rustc calls gcc in order to link binaries. The error seen here is that it can't find the cc binary, part of the gcc package. The reason installing clang worked is because clang depends on gcc so it pulled in that dependency.
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 09 August 2016, 11:17 GMT
Agree. Adding dependency on gcc.
Comment by ollie27 (ollie27) - Saturday, 10 December 2016, 22:33 GMT
  • Field changed: Percent Complete (100% → 0%)
In rust 1:1.12.1-1 the gcc dependency was removed. I don't know if that was intentional but I think it should be readded for the reasons already mentioned.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 11 December 2016, 13:52 GMT
ollie27,

gcc is part of the base group and should not have to be included, neither in the rust nor the cargo package. The above steps to reproduce the issue works here.

What is the issue you are having, is it rust or cargo you are having problems with and what are the steps to reproduce the issue?
Comment by ollie27 (ollie27) - Sunday, 11 December 2016, 14:41 GMT
Unless I'm mistaken gcc is part of the base-devel group but not the base group.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 11 December 2016, 16:54 GMT
ollie27, You are right, gcc-libs is in base, but gcc is only in base-devel. Users could want to install either clang or gcc for use together with cargo and rust, though. I'll add them as optional dependencies.

Loading...