Opened 3 years ago

Closed 2 years ago

#63453 closed defect (worksforme)

libffi @3.4.2_0 update caused some kind of mixup during rev-upgrade in Leopard PPC that results in a clear path not being followed NYD

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard Cc: kencu (Ken), cooljeanius (Eric Gallager), mascguy (Christopher Nielsen)
Port: libffi

Description

This is the (partially sorted by GNU Emacs) list of ports from port -vd rev-upgrade that need to be updated:

--->  Updating database of binaries
--->  Scanning binaries for linking errors
Could not open /opt/local/lib/libgcc/libgcc_s.1.dylib: Error opening or reading file (referenced from /opt/local/lib/libHalf.24.dylib)
Could not open /opt/local/lib/libgcc/libstdc++.6.dylib: Error opening or reading file (referenced from /opt/local/lib/libHalf.24.dylib)
Could not open /opt/local/lib/libffi.7.dylib: Error opening or reading file (referenced from /opt/local/bin/guile)
Could not open /opt/local/lib/gcc5/libgcc_s.1.dylib: Error opening or reading file (referenced from /opt/local/bin/gappletviewer-mp-5)
Could not open /opt/local/lib/gcc5/libgomp.1.dylib: Error opening or reading file (referenced from /opt/local/lib/gcc5/libgomp-plugin-host_nonshm.1.dylib)
Could not open /opt/local/lib/gcc47/libgcc_s.1.dylib: Error opening or reading file (referenced from /opt/local/bin/gappletviewer-mp-4.7)
Could not open /opt/local/lib/gcc49/libgcc_s.1.dylib: Error opening or reading file (referenced from /opt/local/bin/gappletviewer-mp-4.9)
Could not open /opt/local/lib/libgcc/libgfortran.4.dylib: Error opening or reading file (referenced from /opt/local/lib/libopenblas-r1.dylib)
Could not open /opt/local/lib/libgcc/libatomic.1.dylib: Error opening or reading file (referenced from /opt/local/bin/fix-qdf)
--->  Found 729 broken files, matching files to ports
--->  Found 46 broken ports, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:

 OpenBLAS @0.3.17+gcc7+lapack+native
 blackbox @0.76
 boost @1.71.0+cmake_scripts+no_single+no_static+python38+regex_match_extra
 boost171 @1.71.0+no_single+no_static+python38
 clamav @0.103.3
 clang-3.4 @3.4.2+analyzer
 cmake @3.20.5
 doxygen @1.9.2
 dvisvgm @2.12
 fftw-3 @3.3.9+gfortran
 gcc47 @4.7.4
 gcc49 @4.9.4
 gcc5 @5.5.0
 glib2 @2.62.6+x11
 gnutls @3.6.16+dane
 gobject-introspection @1.60.2
 gpgme @1.14.0
 graphite2 @1.3.13
 gtk3 @3.24.23+x11
 guile @2.2.7
 harfbuzz @2.8.2
 harfbuzz-icu @2.8.2
 icu @67.1
 ilmbase @2.3.0
 libde265 @1.0.8
 libgcc6 @6.5.0
 libheif @1.12.0
 libraw @0.20.2
 libsodium @1.0.18-20200728
 libssh2 @1.9.0
 libusb @1.0.24
 lighttpd @1.4.59+ssl
 llvm-3.3 @3.3
 nettle @3.7.3
 nghttp2 @1.44.0
 openexr @2.3.0
 p11-kit @0.24.0+doc
 pstoedit @3.75
 py38-cairo @1.20.1
 py38-kiwisolver @1.3.1
 py38-numpy @1.21.2+gfortran+openblas
 qhull @2020.2
 qpdf @10.3.2
 texlive-bin @2021.58693+x11
 uchardet @0.0.7
 woff2 @1.0.2

But when I try to rebuild my version of GNU Emacs with GCC7 I get in configure.log:

dyld: Library not loaded: /opt/local/lib/libffi.7.dylib
  Referenced from: /opt/local/lib/libgobject-2.0.0.dylib
  Reason: image not found

I've also seen ld-127 form port ld64-127 crashing, see attached screenshot.

port itself has no proper plan to rebuild these invalid packages, it starts with guile (possibly trying to upgrade to new version 2.2.7_1 and never manages to finish (with "never" I mean a time period of three hours CPU use in top).

Attachments (1)

LD-127 failing.png (19.7 KB) - added by ballapete (Peter "Pete" Dyballa) 3 years ago.
Sytem message in German about failing linker

Download all attachments as: .zip

Change History (14)

Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: LD-127 failing.png added

Sytem message in German about failing linker

comment:1 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Actual configure command from building GNU Emacs 25.4 again from sources:

/opt/local/bin/ld -dynamic -arch ppc7450 -bind_at_load -macosx_version_min 10.5.8 -weak_reference_mismatches non-weak -o conftest -lcrt1.10.5.o -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib/gcc7/gcc/ppc-apple-darwin9/7.5.0 -L/opt/local/lib/gcc7/gcc/ppc-apple-darwin9/7.5.0/../../.. -t -v /var/folders/PR/PR9ZvjydEAmPxO7U5PFnBk+++TI/-Tmp-//ccUEEWgd.o -lncurses -lxml2 -lMagickWand-6.Q16 -lMagickCore-6.Q16 -lrsvg-2 -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -lgcc_s.10.5 -lgcc_ext.10.5 -lgcc -lSystem -lef_ppc

comment:2 Changed 3 years ago by kencu (Ken)

rev-upgrade is meant to take care of all this, but it's possible something was missed for a revbump or otherwise things got confused.

First thing I would do is clean out all partially-built software. I often go into the main MacPorts build directory and see what's there, and clean it up manually, but sudo port -v reclaim has an option to do that as part of it's cleanup (be careful about deleting anything you want in your installed ports if you do that!).

libffi is very core, and as you have seen, lots of things break when it updates.

Looks to me like the first thing that needs to be working is llvm-3.4, so your linker works again. I would do that first, therefore:

sudo port -f uninstall llvm-3.4
sudo port -v install llvm-3.4

Then I would probably run sudo port -v rev-upgrade again, and let MacPorts sort the rest out. Looks like lots of things need to be rebuilt for the new libffi, no surprise as you have lots of things installed.

If you get the exact same error about libgobject-2.0.0.dylib being broken, and MacPorts has not sorted it out properly for some reason, then this is the port that would need to be uninstalled and reinstalled to fix that:

% port provides /opt/local/lib/libgobject-2.0.0.dylib
/opt/local/lib/libgobject-2.0.0.dylib is provided by: glib2

If you have a problem after doing the above, please post again.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:3 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

While building libgcc7:

Process:         xmlcatalog [56074]
Path:            xmlcatalog
Identifier:      xmlcatalog
Version:         ??? (???)
Code Type:       PPC (Native)
Parent Process:  sh [56073]

Interval Since Last Report:          138102 sec
Crashes Since Last Report:           74
Per-App Interval Since Last Report:  0 sec
Per-App Crashes Since Last Report:   1

Date/Time:       2021-09-05 14:25:20.511 +0200
OS Version:      Mac OS X 10.5.8 (9L31a)
Report Version:  6
Anonymous UUID:  B98EE308-F5B2-4632-9B82-ECEF2D42D0B9

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000008fe0105c
Crashed Thread:  0

Dyld Error Message:
  Symbol not found: ___once_proxy
  Referenced from: /opt/local/lib/libicuuc.67.dylib
  Expected in: /usr/lib/libstdc++.6.dylib

while Configuring stage 1 in ppc-apple-darwin9/libgomp. Presumingly.

comment:4 in reply to:  2 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

Looks to me like the first thing that needs to be working is llvm-3.4, so your linker works again. I would do that first, therefore:

sudo port -f uninstall llvm-3.4
sudo port -v install llvm-3.4

I want GNU Emacs to work again (building it with GCC7). In it port might compile for days and weeks…

comment:5 Changed 3 years ago by kencu (Ken)

Hah, new problem then.

Now how on earth does it happen that icu is trying to use /usr/lib/libstdc++.6.dylib on your system? I have no idea. That will never work.

So unless you know some secret thing you did, you will have to uninstall and reinstall icu.

This of course has nothing to do with libffi, so your rabbit hole just keeps getting deeper and deeper.

comment:6 Changed 3 years ago by kencu (Ken)

Summary: libffi @3.4.2_0 does not tell port gcc7 (and possibly libgcc7?) need to be rebuiltlibffi @3.4.2_0 update caused some kind of mixup during rev-upgrade in Leopard PPC that results in a clear path not being followed NYD

comment:7 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:8 Changed 3 years ago by cooljeanius (Eric Gallager)

my current list of breakages due to the libffi update:

You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:
 py27-pyobjc @5.3
 python34 @3.4.10
 python38 @3.8.11
 py38-gobject @2.28.7+x11
 py38-cffi @1.14.6
 py38-gobject3 @3.38.0
 py39-gobject @2.28.7+x11
 py39-cffi @1.14.6
 py39-gobject3 @3.38.0
 R @4.1.1+builtin_lapack+cairo+gcc10+java+openmp+quartz+recommended+tests
 python35 @3.5.10
 gjs @1.52.5
 newlisp @10.4.3
 p11-kit @0.24.0
 seed @4.0.0-20201009
 lua-lgi @0.9.0
 ocaml-ctypes @0.18.0
 p5.28-ffi-platypus @1.340.0
 p5.28-glib-object-introspection @0.48.0
 py35-pyobjc @5.3
 p5.30-ffi-platypus @1.340.0
 p5.32-ffi-platypus @1.340.0
 ruby19 @1.9.3-p551+c_api_docs+doc
 ruby23 @2.3.8+doc+gmp+relative
 ruby24 @2.4.10+doc+gmp+relative
 ruby25 @2.5.9+doc+gmp+relative
 ruby26 @2.6.8+doc+gmp+relative
 ruby27 @2.7.4+doc+gmp+relative
 ruby30 @3.0.2+doc+gmp+relative
 llvm-10 @10.0.1+debug+ocaml+polly
 llvm-12 @12.0.1+debug+tests
 llvm-3.3 @3.3+ocaml
 llvm-3.4 @3.4.2
 pure @0.68
 llvm-3.7 @3.7.1+polly
 llvm-5.0 @5.0.2+debug+ocaml+polly
 llvm-6.0 @6.0.1+debug+ocaml+polly
 llvm-7.0 @7.1.0+debug+ocaml+polly
 llvm-8.0 @8.0.1+debug+ocaml+polly
 python36 @3.6.14
 py36-gobject @2.28.7+x11
 py36-cffi @1.14.6
 py36-gobject3 @3.38.0
 python37 @3.7.11
 py37-cffi @1.14.6
 py37-gobject3 @3.38.0
 py37-gobject @2.28.7+x11
Continue? [Y/n]: 

(it's failing on py27-pyobjc for me currently)

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

Cc: mascguy added

comment:10 Changed 3 years ago by Christopher Nielsen <mascguy@…>

Owner: set to Christopher Nielsen <mascguy@…>
Resolution: fixed
Status: newclosed

In 6fb2ae6631b642ed4fcf13d0531348e51d29f36c/macports-ports (master):

libffi: symlink via prev major version

  • Absolutely critical, to avoid temporary toolchain breakage

Closes: #63443
Closes: #63453
See: #63378

comment:11 in reply to:  10 Changed 3 years ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: closedreopened

libffi: symlink via prev major version

  • Absolutely critical, to avoid temporary toolchain breakage

Hmmmn, rereading the comments on this ticket, this sounds like more of an issue with libc++. Reopening, as the libffi fix won't cure this one.

Version 0, edited 3 years ago by mascguy (Christopher Nielsen) (next)

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

Owner: changed from Christopher Nielsen <mascguy@…> to macports-tickets@…
Status: reopenedassigned

comment:13 Changed 2 years ago by kencu (Ken)

Resolution: worksforme
Status: assignedclosed

we won't be making any more progress here. Please reopen with new information if this is still an issue for youl

Note: See TracTickets for help on using tickets.