[MacPorts] #60438: ports that use rust no longer able to build universal with i386

MacPorts noreply at macports.org
Mon May 4 17:56:50 UTC 2020


#60438: ports that use rust no longer able to build universal with i386
-------------------------+-------------------------------------------------
 Reporter:  ryandesign   |      Owner:  (none)
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.6.2
 Keywords:               |       Port:  rust librsvg racer geckodriver
                         |  newsboat sequoia-pgp
-------------------------+-------------------------------------------------
 I had librsvg installed with the +universal variant on macOS High Sierra.
 After [changeset:8aa429ba73845ced50d6e629bdfc681f010bcfaf/macports-ports
 changes to the rust port] to remove i386 support, it is no longer possible
 to build librsvg with the universal variant when that includes the i386
 architecture:

 {{{
 --->  Computing dependencies for librsvg
 Error: Cannot install librsvg for the archs 'i386 x86_64' because
 Error: its dependency rust only supports the arch 'x86_64'.
 }}}

 If I modify the librsvg port to skip the architecture check for rust:

 {{{
 diff --git a/graphics/librsvg/Portfile b/graphics/librsvg/Portfile
 index aa2d199124d..546866e9fae 100644
 --- a/graphics/librsvg/Portfile
 +++ b/graphics/librsvg/Portfile
 @@ -89,6 +89,8 @@ variant viewer description "Build the rsvg-view-3 viewer
 utility." {
      depends_build-append \
                      port:rust

 +    depends_skip_archcheck rust
 +
      # when CARGO_BUILD_TARGET is set, directory structure changes
      patchfiles-append \
                      patch-configure-rust_target_subdir.diff
 }}}

 then the build fails later with:

 {{{
 error[E0463]: can't find crate for `core`
   |
   = note: the `i686-apple-darwin` target may not be installed
 error: aborting due to previous error
 For more information about this error, try `rustc --explain E0463`.
 error: could not compile `lazy_static`.
 Caused by:
   process didn't exit successfully: `rustc --crate-name lazy_static
 /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-
 ryandesign-
 fork_graphics_librsvg/librsvg/work/librsvg-2.48.4-i386/vendor/lazy_static/src/lib.rs
 --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type
 lib --emit=dep-info,metadata,link -C opt-level=3 -C debuginfo=2 -C
 metadata=29620eabd57d5eee -C extra-filename=-29620eabd57d5eee --out-dir
 /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-
 ryandesign-
 fork_graphics_librsvg/librsvg/work/librsvg-2.48.4-i386/target/i686-apple-
 darwin/release/deps --target i686-apple-darwin -L
 dependency=/opt/local/var/macports/build
 /_Users_rschmidt_macports_macports-ports-ryandesign-
 fork_graphics_librsvg/librsvg/work/librsvg-2.48.4-i386/target/i686-apple-
 darwin/release/deps -L dependency=/opt/local/var/macports/build
 /_Users_rschmidt_macports_macports-ports-ryandesign-
 fork_graphics_librsvg/librsvg/work/librsvg-2.48.4-i386/target/release/deps
 --cap-lints allow -C linker=/usr/bin/clang` (exit code: 1)
 warning: build failed, waiting for other jobs to finish...
 error: build failed
 make[2]: *** [librsvg_c_api.la] Error 101
 }}}

 I assume that other ports that use rust would experience the same
 problems, however I was not able to get to the point of observing this
 error with any of those other ports. newsboat seems to have a different
 problem when building universal. sequoia-pgp doesn't have a universal
 variant. racer and geckodriver fail to build for unrelated reasons with or
 without the universal variant; see other tickets.

 If we can fix it so that i386 builds of ports that use rust are once again
 possible, that would be great (e.g. is it possible to have rust install
 the latest i386-supporting version alongside the newer x86_64 version?).
 If not, then the affected ports (and any ports that depend on them, and
 any ports that depend on them, etc.) should be marked as not supporting
 the i386 architecture (e.g. `supported_archs x86_64`), except that for
 librsvg it's more complicated than that because librsvg installs an older
 pre-rust version that still supports i386 on older systems.

-- 
Ticket URL: <https://trac.macports.org/ticket/60438>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list