Rust - Failed to Build

Ryan Schmidt ryandesign at macports.org
Wed Mar 6 06:35:39 UTC 2019



On Mar 5, 2019, at 16:50, Michael Newman wrote:

> I am aware that there is a bug report on this issue: https://trac.macports.org/ticket/57058
> 
> However, I have some different questions. This on a 2010 MBA running 10.9.5, Xcode 6.2
> 
> I first noticed this failure about six months ago. I chose to ignore it because:
> 
> 	• I saw the bug report and figured it would get fixed, eventually
> 	• The failure of Rust to build seemed to have no effect on my installed Ports
> 
> After six months:
> 
> 	• The bug has not been fixed
> 	• The failure of Rust to build still has no effect on my Ports
> 
> However, I’m concerned. If the bug is never fixed, will this cause problems in the future? 
> 
> For example, one of the commenters on the bug report states: "I don't care about rust per se, but it's a dependency for FFMPEG, which I *do* want." But, I run ffmpeg every four minutes, 24/7 on this machine and the lack of Rust seems to have had no effect at all on building or running ffmpeg.
> 
> Why do I even have Rust? I didn’t install it, so something I did install must have depended on it at some time. But, it seems that none of my currently installed Ports depend on it. Can I just get rid of it or is some other course of action warranted?

Rust is a programming language. The rust port provides a Rust compiler. You need a Rust compiler if you want to compile software written in the Rust language.

Notably, the librsvg port depends on rust. librsvg is a library for reading SVG files which has been in MacPorts for a long time, and dozens of other ports depend on it, including ffmpeg. Two years ago, a new developer took over maintenance of the librsvg project and converted its source code from C to Rust; as a result, you need a Rust compiler to build librsvg 2.42.0 and later. The MacPorts librsvg port was first updated to this new Rust-requiring series on Feb 3, 2018.

Unfortunately, the Rust compiler, like many compilers, is a complex software project to build, and it was quickly realized that it did not build on older systems. On Feb 6, 2018 the librsvg port was modified to revert to the older pre-Rust 2.40.20 version on OS X 10.7 and earlier. On Apr 5, 2018 librsvg was modified to revert to 2.40.20 on OS X 10.8 as well. When the rust port is updated to a new version, this sometimes reveals new problems building on older system, such that systems which were formerly able to build rust no longer are. When rust was updated to 1.25.0 on Apr 19, 2018 we found that it no longer built on OS X 10.9. Therefore, librsvg was modified on May 7, 2018 to use the older 2.40.20 on OS X 10.9 as well.

So the reason why you have rust installed is probably that you installed or upgraded librsvg or a port that uses it sometime between Feb 3, 2018 (when rust started being required to build librsvg) and May 7, 2018 (when rust stopped being required to build librsvg on OS X 10.9).

Now that the librsvg you use has been downgraded to a version that no longer requires rust, you can uninstall rust. You can safely try to uninstall any port anytime you like. If it is required by another port you have installed, MacPorts will let you know and will prevent the uninstallation.

MacPorts is a volunteer organization. The reason why nobody has fixed the bug you mentioned is that nobody has volunteered to do so. It looks like there is a suggestion in the bug report that raising the ulimit might help. If anybody would like to attempt to integrate a solution for this into the rust portfile and submit a pull request, that would be great.



More information about the macports-users mailing list