Opened 4 years ago

Closed 4 years ago

#59771 closed defect (worksforme)

rust 1.39.0 : Failed to build rust: command execution failed

Reported by: homer3018 Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: rust

Description

HI all. I've just upgraded to Catalina, and I've also upgraded MacPorts to 2.6.2 along with Xcode. I was previously on Mojave and I had no issue building what I need to build. At the moment I'm just trying to get my MacPorts configurations working nicely again so I've started with

$ sudo port selfupdate
$ sudo port upgrade outdated

The self update runs fine, and the upgrade outdated starts correctly until a dependency for rust (I think it's from cargo) is found and thus trying to build it. It fails every time and since I'm not that familiar with MacPorts I've no idea what's the issue. To ensure having a log as clean as possible I've done that before posting this ticket:

$ sudo port clean rust
$ sudo port -v install rust

Not too sure if it's useful but this is the very end of the output from the upgrade outdatedcommand :

--->  Cleaning gtk3
--->  Computing dependencies for rust
--->  Fetching distfiles for rust
--->  Attempting to fetch rustc-1.39.0-src.tar.gz from https://static.rust-lang.org/dist
--->  Attempting to fetch rust-std-1.38.0-x86_64-apple-darwin.tar.gz from https://static.rust-lang.org/dist
--->  Attempting to fetch rustc-1.38.0-x86_64-apple-darwin.tar.gz from https://static.rust-lang.org/dist
--->  Attempting to fetch cargo-0.39.0-x86_64-apple-darwin.tar.gz from https://static.rust-lang.org/dist
--->  Verifying checksums for rust
--->  Extracting rust
--->  Applying patches to rust
--->  Configuring rust
--->  Building rust
Error: Failed to build rust: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/main.log for details.
Error: Problem while installing rust
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
--->  Some of the ports you installed have notes:
  gindent has the following notes:
    This port installs 'gnuindent' and 'gnutexinfo2man' symlinks to maintain backwards compatibility with the previous 'indent' port. Please switch to 'gindent' and 'gtexinfo2man' at your convenience.

My apologies if this ticket does meet your standard, this is my first time (and I've read the guidelines). Attached is the log file.

Thanks ahead of time for your help.

Attachments (1)

main.log (143.7 KB) - added by homer3018 4 years ago.
log file

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by homer3018

Attachment: main.log added

log file

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Hi and welcome.

Rust is fairly inscrutable to me; I can never understand its build log.

But I'll just ask: since you upgraded to a new macOS version, did you follow the migration instructions?

Also, do you know why MacPorts is building rust from source for you? We have binaries available, but MacPorts doesn't seem to have attempted to use them in this case.

comment:2 Changed 4 years ago by mf2k (Frank Schima)

Cc: g5pw removed
Owner: set to g5pw
Status: newassigned

comment:3 Changed 4 years ago by homer3018

Hi, Sorry for the delayed response. I believe it was part of the cargodepedencies.

I'm building Darktable software which is open source and it needs some ports to be patched according to these instructions :

How to make disk image with darktable application bundle (64 bit Intel only):

1). Install MacPorts (instructions and prerequisites can be found on official website), please use default installation path (/opt/local).
    They will need some tuning, so before you build anything add these lines to /opt/local/etc/macports/macports.conf:
     buildfromsource always
     macosx_deployment_target 10.7
     cxx_stdlib libc++
    (practice showed that support for versions older than 10.7 isn't viable)
    and this line to /opt/local/etc/macports/variants.conf:
     +no_gnome +no_x11 +quartz -x11 -gnome
    You will also need to add patches for python (https://trac.macports.org/ticket/51736), GraphicsMagick, ImageMagick, libraw and pugixml
    (all fixes are required due to set deployment target):
     $ mkdir -p ~/ports/devel/gnutls/files ~/ports/lang/python36/files ~/ports/lang/python37/files ~/ports/lang/python38/files ~/ports/graphics/GraphicsMagick/files ~/ports/graphics/ImageMagick/files ~/ports/graphics/libraw/files ~/ports/textproc
     $ cp -R "$(port dir gnutls)" ~/ports/devel
     $ curl -Lo ~/ports/devel/gnutls/files/patch.diff https://raw.github.com/darktable-org/darktable/master/packaging/macosx/gnutls-disable-connectx.diff
     $ cp -R "$(port dir python36)" ~/ports/lang
     $ curl -Lo ~/ports/lang/python36/files/patch.diff https://raw.github.com/darktable-org/darktable/master/packaging/macosx/python36-stack_size.diff
     $ cp -R "$(port dir python37)" ~/ports/lang
     $ curl -Lo ~/ports/lang/python37/files/patch.diff https://raw.github.com/darktable-org/darktable/master/packaging/macosx/python36-stack_size.diff
     $ cp -R "$(port dir python38)" ~/ports/lang
     $ curl -Lo ~/ports/lang/python38/files/patch.diff https://raw.github.com/darktable-org/darktable/master/packaging/macosx/python38-stack_size.diff
     $ cp -R "$(port dir GraphicsMagick)" ~/ports/graphics
     $ curl -Lo ~/ports/graphics/GraphicsMagick/files/patch.diff https://raw.github.com/darktable-org/darktable/master/packaging/macosx/gm-deployment_target.diff
     $ cp -R "$(port dir ImageMagick)" ~/ports/graphics
     $ curl -Lo ~/ports/graphics/ImageMagick/files/patch.diff https://raw.github.com/darktable-org/darktable/master/packaging/macosx/im-stdlib.diff
     $ cp -R "$(port dir libraw)" ~/ports/graphics
     $ curl -Lo ~/ports/graphics/libraw/files/patch.diff https://raw.github.com/darktable-org/darktable/master/packaging/macosx/libraw-stdlib.diff
     $ cp -R "$(port dir pugixml)" ~/ports/textproc
     $ curl -L https://raw.github.com/darktable-org/darktable/master/packaging/macosx/pugixml-stdlib.patch | patch -d ~/ports -p0
     $ cp -R "$(port dir librsvg)" ~/ports/graphics
     $ curl -L https://raw.github.com/darktable-org/darktable/master/packaging/macosx/librsvg-nocargo.patch | patch -d ~/ports -p0
    then append this line:
     patchfiles-append patch.diff
    to ~/ports/*/*/Portfile files you just copied (except for pugixml and librsvg) and run:
     $ portindex ~/ports
    Add "file:///Users/<username>/ports" (change <username> to your actual login) to /opt/local/etc/macports/sources.conf before [default] line.
    Install required dependencies:
     $ sudo port install git exiv2 libgphoto2 gtk-osx-application-gtk3 lensfun librsvg libsoup openexr json-glib flickcurl GraphicsMagick openjpeg lua webp libsecret pugixml osm-gps-map adwaita-icon-theme tango-icon-theme intltool iso-codes libomp

Upon upgrading to Catalina, I followed most of the migration instructions and got quickly stuck upon cargo and rust being one of its dependency. I have honestly no idea if those two are necessary to build Darktable. All I know is that I was not able to add the patches. I tried a lot of cleaning, reinstalling manually as well as sudo port selfupdate and sudo port upgrade outdated and eventually I got the curlcommand to work from the Darktable building instructions. I am now able to build again, just like before (and it does not seem rust got installed). Im sorry I can't be more accurate and I'm not so familiar with MacPorts and the way it works.

Anyhow, thanks for helping out :)

comment:4 Changed 4 years ago by g5pw (Aljaž Srebrnič)

Resolution: worksforme
Status: assignedclosed

I'm guessing this was migration-related. I had no problems building rust on Catalina. Could you maybe try again and reopen if there is still an issue?

Note: See TracTickets for help on using tickets.