Opened 7 years ago

Closed 7 years ago

Last modified 3 years ago

#56192 closed defect (fixed)

librsvg @2.42.2_0: build fails

Reported by: mndavidoff (Monte Davidoff) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: Cc: pixilla (Bradley Giesbrecht), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), jeremyhu (Jeremy Huddleston Sequoia), mascguy (Christopher Nielsen)
Port: librsvg

Description

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.

Attachments (1)

main.log.gz (18.9 KB) - added by mndavidoff (Monte Davidoff) 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by mndavidoff (Monte Davidoff)

Attachment: main.log.gz added

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

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

comment:2 Changed 7 years ago by dbevans (David B. Evans)

Cc: MarcusCalhoun-Lopez added

Appears to be the result of recent universal build changes in bcd0bba54c18b9c504e185d9f3e168b1bb54e5b7/macports-ports that manipulate environment variable CARGO_BUILD_TARGET.

The non-universal build is attempying to link to static library

${worksrcpath}/rust/target/release/librsvg_internals.a

but the actual path to the built library is

${worksrcpath}/rust/target/x86_64-apple-darwin/release/librsvg_internals.a
Last edited 7 years ago by dbevans (David B. Evans) (previous) (diff)

comment:3 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Cc: jeremyhu added

comment:4 Changed 7 years ago by jeremyhu (Jeremy Huddleston Sequoia)

As a quick and dirty hack, you can setup a symlink and then re-trigger the build as a workaround:

    dports/graphics/librsvg/work/librsvg-2.42.2/rust/target/release $ sudo ln -s ../x86_64-apple-darwin/release/librsvg_internals.a

comment:6 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

In f31dfa307208536530722a4364bdc41983863837/macports-ports:

librsvg: patch configure.ac when using autoreconf

Using one patchfile for both configure and configure.ac yields:

WARNING: 'aclocal-1.15' is missing on your system.
make: * [aclocal.m4] Error 127

No revbump since port either builds correctly or not at all

Fixes #56192

comment:7 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Note: See TracTickets for help on using tickets.