librsvg @2.42.2_0: build fails
I get the following error when I try to install librsvg:
sudo port -vs install librsvg
...
*** Warning: Linking the shared library librsvg-2.la against the
*** static library /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.42.2/rust/target/release/librsvg_internals.a is not portable!
...
libtool: link: /usr/bin/clang -dynamiclib -o .libs/librsvg-2.2.dylib .libs/librsvg_2_la-librsvg-enum-types.o .libs/librsvg_2_la-librsvg-features.o .libs/librsvg_2_la-rsvg-base-file-util.o .libs/librsvg_2_la-rsvg-base.o .libs/librsvg_2_la-rsvg-cairo-clip.o .libs/librsvg_2_la-rsvg-cairo-draw.o .libs/librsvg_2_la-rsvg-cairo-render.o .libs/librsvg_2_la-rsvg-cond.o .libs/librsvg_2_la-rsvg-css.o .libs/librsvg_2_la-rsvg-defs.o .libs/librsvg_2_la-rsvg-file-util.o .libs/librsvg_2_la-rsvg-filter.o .libs/librsvg_2_la-rsvg-handle.o .libs/librsvg_2_la-rsvg-io.o .libs/librsvg_2_la-rsvg-paint-server.o .libs/librsvg_2_la-rsvg-size-callback.o .libs/librsvg_2_la-rsvg-styles.o .libs/librsvg_2_la-rsvg-text.o .libs/librsvg_2_la-rsvg-xml.o -L/opt/local/lib -lgdk_pixbuf-2.0 -lgio-2.0 -lpangocairo-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lfontconfig -lfreetype -lcairo -lpng16 -lcroco-0.6 -lglib-2.0 -lintl -lxml2 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.42.2/rust/target/release/librsvg_internals.a -arch x86_64 -Os -arch x86_64 -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-framework -Wl,CoreFoundation -install_name /opt/local/lib/librsvg-2.2.dylib -compatibility_version 45 -current_version 45.2 -Wl,-single_module -Wl,-exported_symbols_list,.libs/librsvg-2-symbols.expsym
clang: error: no such file or directory: '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.42.2/rust/target/release/librsvg_internals.a'
make[2]: *** [librsvg-2.la] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.42.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.42.2'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.42.2'
Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.42.2" && /usr/bin/make -j8 -w all CC="/usr/bin/clang -arch x86_64"
Exit code: 2
Error: Failed to build librsvg: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_librsvg/librsvg/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port librsvg failed
I recently updated to macOS 10.13.4 and Xcode 9.3 in case the problem is related to that.
Appears to be the result of recent universal build changes that manipulate environment variable CARGO_BUILD_TARGET.
The non-universal build is attempying to link to static library
but the correct path to the built library is actually