Opened 5 years ago

Closed 5 years ago

#59244 closed defect (fixed)

librsvg fails to build on macOS 10.15 Catalina

Reported by: kotashiratsuka (Kota Shiratsuka) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.6.1
Keywords: Cc: thenickdude (Nicholas Sherlock), juandavm (Juan Daniel), m5comp
Port: librsvg

Description

:info:build      Running `rustc --crate-name cssparser /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/vendor/cssparser/src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C debuginfo=2 -C metadata=eb3966de069cf136 -C extra-filename=-eb3966de069cf136 --out-dir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -L dependency=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/x86_64-apple-darwin/release/deps -L dependency=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/release/deps --extern cssparser_macros=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/release/deps/libcssparser_macros-8af80573d96eb99e.dylib --extern dtoa_short=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/x86_64-apple-darwin/release/deps/libdtoa_short-7a1e9c5a75c55118.rlib --extern itoa=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/x86_64-apple-darwin/release/deps/libitoa-c439eb5e9843bb0e.rlib --extern matches=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/x86_64-apple-darwin/release/deps/libmatches-9a4b985fa287e421.rlib --extern phf=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/x86_64-apple-darwin/release/deps/libphf-699c46e1587ae37c.rlib --extern procedural_masquerade=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/x86_64-apple-darwin/release/deps/libprocedural_masquerade-6fdca77c73bc2d55.rlib --extern smallvec=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/target/x86_64-apple-darwin/release/deps/libsmallvec-d97d88c36742156d.rlib --cap-lints allow -C linker=/usr/bin/clang --cfg rustc_has_pr45225`
:info:build error[E0506]: cannot assign to `self.input.cached_token` because it is borrowed
:info:build    --> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.44.14/vendor/cssparser/src/parser.rs:572:17
:info:build     |
:info:build 547 |     pub fn next_including_whitespace_and_comments(&mut self) -> Result<&Token<'i>, BasicParseError<'i>> {
:info:build     |                                                   - let's call the lifetime of this reference `'1`
:info:build ...
:info:build 560 |             Some(ref cached_token)
:info:build     |                  ---------------- borrow of `self.input.cached_token` occurs here
:info:build ...
:info:build 572 |                 self.input.cached_token = Some(CachedToken {
:info:build     |                 ^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `self.input.cached_token` occurs here
:info:build ...
:info:build 584 |         Ok(token)
:info:build     |         --------- returning this value requires that `self.input.cached_token.0` is borrowed for `'1`
:info:build error: aborting due to previous error
:info:build For more information about this error, try `rustc --explain E0506`.
:info:build error: Could not compile `cssparser`.

Attachments (1)

main.log (225.0 KB) - added by kotashiratsuka (Kota Shiratsuka) 5 years ago.

Download all attachments as: .zip

Change History (18)

Changed 5 years ago by kotashiratsuka (Kota Shiratsuka)

Attachment: main.log added

comment:1 Changed 5 years ago by mf2k (Frank Schima)

In the future, please add the port maintainer(s) to Cc (port info --maintainers librsvg), if any.

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

Keywords: catalina 10.15 removed
Owner: set to dbevans
Status: newassigned

comment:3 Changed 5 years ago by dashmurphy

I just ran into this issue, I solved it by editing the parser.rs file found here https://github.com/servo/rust-cssparser/pull/245/commits/3c98d22c5de3b696bf1fde2b6c90069812312aa6#diff-2c09afcdc3c420ab0678ba9b5e83959c

Then modified the checksum value so it would compile

comment:4 Changed 5 years ago by kotashiratsuka (Kota Shiratsuka)

Cc: kotashiratsuka added

comment:5 Changed 5 years ago by kotashiratsuka (Kota Shiratsuka)

Cc: kotashiratsuka removed

comment:6 Changed 5 years ago by GreggGreen (Gregg Green)

Same here on 3 computers

sudo port upgrade outdated 
--->  Computing dependencies for librsvg
--->  Fetching archive for librsvg
--->  Attempting to fetch librsvg-2.44.14_0.darwin_19.x86_64.tbz2 from https://packages.macports.org/librsvg
--->  Attempting to fetch librsvg-2.44.14_0.darwin_19.x86_64.tbz2 from http://aus.us.packages.macports.org/macports/packages/librsvg
--->  Attempting to fetch librsvg-2.44.14_0.darwin_19.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/librsvg
--->  Building librsvg
Error: Failed to build librsvg: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_librsvg/librsvg/main.log for details.
Error: Problem while installing librsvg
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

comment:7 Changed 5 years ago by kotashiratsuka (Kota Shiratsuka)

#comment:3

port extract -> patch & json checksum update in workdir -> port build -> port install -> install success!!

I wanted to use imagemagick.

Great!!

comment:8 Changed 5 years ago by thenickdude (Nicholas Sherlock)

Cc: thenickdude added

comment:9 Changed 5 years ago by kontogar

Where is the checksum stored?

comment:10 in reply to:  9 Changed 5 years ago by dashmurphy

Replying to kontogar:

Where is the checksum stored?

It should be in a .json file one folder up from where you place the patch in the work directory

Last edited 5 years ago by dashmurphy (previous) (diff)

comment:11 Changed 5 years ago by mf2k (Frank Schima)

Cc: juandavm added

Has duplicate #59259.

comment:13 Changed 5 years ago by juandavm (Juan Daniel)

So.. it will be corrected... when? i do not know how to apply a patch to a macport

comment:14 Changed 5 years ago by m5comp

Cc: m5comp added

comment:15 Changed 5 years ago by thenickdude (Nicholas Sherlock)

Looks like the fix is live now https://github.com/macports/macports-ports/commit/63d36d5a9e97e47bda3e995934142dae3b95792d (I did a selfupdate and clean / install and the new version built fine for me).

comment:16 Changed 5 years ago by kotashiratsuka (Kota Shiratsuka)

LGTM

comment:17 Changed 5 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.