Opened 2 years ago

Closed 2 years ago

#64433 closed defect (worksforme)

librsvg build failure: Symbol not found: __cg_jpeg_resync_to_restart

Reported by: linolinco Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: librsvg

Description

On macOS 10.14.6:

:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4" && /usr/bin/make -j4 -w all CFLAGS="-Os -pipe -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -lobjc -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64"
:info:build Exit code: 2
:error:build Failed to build librsvg: command execution failed
:debug:build Error code: CHILDSTATUS 11378 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"

Trying to sudo the failed make command from the shell gives:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /opt/local/lib/libJPEG.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Command '['/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/tmp-introspectuk0ipna5/Rsvg-2.0', '--introspect-dump=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/tmp-introspectuk0ipna5/functions.txt,/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/tmp-introspectuk0ipna5/dump.xml']' died with <Signals.SIGABRT: 6>.

I'm at a loss here - what port is supposed to supply /opt/local/lib/libJPEG.dylib?

Cheers

Attachments (1)

main.log (1.1 MB) - added by linolinco 2 years ago.
main.log

Download all attachments as: .zip

Change History (7)

comment:1 Changed 2 years ago by linolinco

UPDATE: uninstalling, then reinstalling libjpeg-turbo did not change anything.

ls -l /opt/local/lib/libjpeg* gives:

-rwxr-xr-x  1 root  admin  625212 Dec  4 19:17 libjpeg.8.2.2.dylib
lrwxr-xr-x  1 root  admin      19 Dec  4 19:17 libjpeg.8.dylib -> libjpeg.8.2.2.dylib
lrwxr-xr-x  1 root  admin      43 Jan 20  2021 libjpeg.9.dylib -> /opt/local/libexec/jpeg/lib/libjpeg.9.dylib
-rw-r--r--  1 root  admin  739064 Dec  4 19:17 libjpeg.a
lrwxr-xr-x  1 root  admin      15 Dec  4 19:17 libjpeg.dylib -> libjpeg.8.dylib

According to nm, none of these libs provides a symbol containing "cg_jpeg_resync_to_restart".

Last edited 2 years ago by linolinco (previous) (diff)

comment:2 in reply to:  description Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to mascguy
Status: newassigned

Replying to linolinco:

:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4" && /usr/bin/make -j4 -w all CFLAGS="-Os -pipe -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -lobjc -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64"

The actual relevant error message in the log is before this point, therefore, as always, please attach the main.log.

Trying to sudo the failed make command from the shell gives:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /opt/local/lib/libJPEG.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Command '['/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/tmp-introspectuk0ipna5/Rsvg-2.0', '--introspect-dump=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/tmp-introspectuk0ipna5/functions.txt,/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_librsvg/librsvg/work/librsvg-2.52.4/tmp-introspectuk0ipna5/dump.xml']' died with <Signals.SIGABRT: 6>.

I'm at a loss here - what port is supposed to supply /opt/local/lib/libJPEG.dylib?

The libjpeg-turbo port (or the jpeg port, if you prefer) provides /opt/local/lib/libjpeg.dylib. No port provides /opt/local/lib/libJPEG.dylib. macOS provides /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib and some things in the OS link with that. Apple's libJPEG.dylib and MacPorts' libjpeg.dylib are not the same and are not interchangeable. For one thing, Apple's has __cg_jpeg_resync_to_restart and MacPorts' doesn't.

An error message about /opt/local/lib/libJPEG.dylib can only arise on systems with case-insensitive filesystems (whch is the default) and when the environment variable DYLD_LIBRARY_PATH has been set to /opt/local/lib. If you have that set in your environment, unset it. If it is the build system that is setting this, it must be changed not to do that. Let us wait and see what your main.log contains before we do further analysis.

Changed 2 years ago by linolinco

Attachment: main.log added

main.log

comment:3 Changed 2 years ago by linolinco

So the actual cause appears to be:

:info:build dyld: Library not loaded: @rpath/libgobject-2.0.0.dylib
:info:build   Referenced from: /opt/local/lib/libcairo-gobject.2.dylib
:info:build   Reason: image not found

The relevant files in /opt/local/lib look okay:

-rwxr-xr-x  1 root  admin   382192 Jan  2 22:12 /opt/local/lib/libgobject-2.0.0.dylib
-rw-r--r--  1 root  admin  1226112 Jan  2 22:10 /opt/local/lib/libgobject-2.0.a
lrwxr-xr-x  1 root  admin       22 Jan  2 22:12 /opt/local/lib/libgobject-2.0.dylib -> libgobject-2.0.0.dylib

so the problem might be a misconfigured @rpath?

comment:4 Changed 2 years ago by mascguy (Christopher Nielsen)

Given that libcairo-gobject.2.dylib is being provided by cairo, I'd start by forcibly uninstalling the latter (via sudo port -f uninstall cairo). Then reinstall it.

Let us know whether that makes a difference. If not, we can investigate further.

comment:5 Changed 2 years ago by linolinco

Yes, reinstalling cairo solved the problem - thanks!

comment:6 Changed 2 years ago by mascguy (Christopher Nielsen)

Resolution: worksforme
Status: assignedclosed

Great, glad the issue is resolved!

Note: See TracTickets for help on using tickets.