Opened 4 years ago

Closed 3 years ago

#61146 closed defect (fixed)

gobject-introspection does not build

Reported by: AgilentGCMS Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: iefdev (Eric F), snarkhunter (Steve Langer)
Port: gobject-introspection

Description

Hello,

I recently tried updating my ports with port selfupdate and port upgrade outdated. It bailed trying to build gobject-introspection.

--->  Building gobject-introspection
Error: Failed to build gobject-introspection: command execution failed
Error: See /Users/sbasu1/packages/macports/var/macports/logs/_Users_sbasu1_packages_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gobject-introspection/gobject-introspection/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

Log attached.

Attachments (2)

main.log (388.6 KB) - added by AgilentGCMS 4 years ago.
main.2.log (388.5 KB) - added by AgilentGCMS 4 years ago.

Download all attachments as: .zip

Change History (17)

Changed 4 years ago by AgilentGCMS

Attachment: main.log added

comment:1 in reply to:  description Changed 4 years ago by iefdev (Eric F)

Replying to AgilentGCMS:

Hello,

I recently tried updating my ports with port selfupdate and port upgrade outdated. It bailed trying to build gobject-introspection.

:info:build dyld: Library not loaded: /Users/sbasu1/packages/macports/lib/libffi.6.dylib
:info:build   Referenced from: /Users/sbasu1/packages/macports/libexec/llvm-9.0/lib/libLLVM.dylib

Yes, there was a big change the other day (see #61132) about with libffi. Try to make sure your clang-9.0 is updated/reinstalled. All have been rev-bumped so you should've recieved an update.

comment:2 Changed 4 years ago by AgilentGCMS

I have tried various combinations of port upgrade outdated, port rev-upgrade, and even explicitly rebuilding clang-9.0, but they all end with a failure to build gobject-introspection. See attached log.

Also, I should say that I do not know if the macports-installed clang is being used to compile the ports. I have two versions of clang, just because I am using ports on a machine without root access:

$ which clang
/usr/bin/clang
$ which clang-mp-9.0
/Users/sbasu1/packages/macports/bin/clang-mp-9.0

Is this important? Do I need to make sure that macport's own clang-9.0 is used to compile the ports?

Changed 4 years ago by AgilentGCMS

Attachment: main.2.log added

comment:3 Changed 4 years ago by mf2k (Frank Schima)

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

comment:4 Changed 4 years ago by mf2k (Frank Schima)

Owner: set to dbevans
Status: newassigned

comment:5 in reply to:  2 Changed 4 years ago by iefdev (Eric F)

Replying to AgilentGCMS:

I have tried various combinations of port upgrade outdated, port rev-upgrade, and even explicitly rebuilding clang-9.0, but they all end with a failure to build gobject-introspection. See attached log.

Also, I should say that I do not know if the macports-installed clang is being used to compile the ports. I have two versions of clang, just because I am using ports on a machine without root access:

$ which clang
/usr/bin/clang
$ which clang-mp-9.0
/Users/sbasu1/packages/macports/bin/clang-mp-9.0

Is this important? Do I need to make sure that macport's own clang-9.0 is used to compile the ports?

When all clangs broke I had the same issue. Quite frustrating. I don't remember exactly in which order I did things, but I upgraded all packages with the binary versions. You might have more clang versions than clang9:

$ port installed name:^clang

First make sure that libffi was updated. It should have already, and then causing the things to break. Then upgrade your clangs with -b (for binary). I have 3.4, 3.7. 5-10. So I updated all one-by-one, in that order.

$ sudo port -b upgrade clang-9.0

When upgraded, verify your version(s) with:

$ clang-mp-9.0 --version
clang version 9.0.1 
Target: x86_64-apple-darwin11.4.2
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-9.0/bin

After that you should be able to upgrade your gobject-introspection. You can always try o add the -b to that one as well.

I also had a few py*-gobject* that didn't upgrade first.

comment:6 Changed 4 years ago by iefdev (Eric F)

Cc: iefdev added

comment:7 Changed 4 years ago by AgilentGCMS

I checked that I only have one version of clang installed via macports. However, trying to install the binary version failed:

$ port -b upgrade clang-9.0
--->  Computing dependencies for llvm-9.0
Error: Failed to archivefetch llvm-9.0: Binary-only mode requested with no usable archive sites configured
Error: See /Users/sbasu1/packages/macports/var/macports/logs/_Users_sbasu1_packages_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/llvm-9.0/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

Trying to upgrade libffi again tried to build gobject-introspection, which fails :-(

comment:8 in reply to:  7 Changed 4 years ago by iefdev (Eric F)

Replying to AgilentGCMS:

Trying to upgrade libffi again tried to build gobject-introspection, which fails :-(

It shouldn't because it's not a dep:

$ port deps libffi
Full Name: libffi @3.3_1
Build Dependencies:   autoconf, automake, libtool

But, libffi is a dep of gobject-introspection - so if you try upgrade that one, it'll try build both.

Which version do you have installed now? If it's @3.3_1 you're already up2date. Perhaps try to deactivate gobject-introspection before you upgrade. Or upgrade that one to using -b

And when upgrading, before the clangs are in place - just say no to any rev-upgrades.


Error: Failed to archivefetch llvm-9.0: Binary-only mode requested with no usable archive sites configured

Perhaps it's not built yet… Should be, but give it a day or so and re-try. Check you config to, since it hints about that. Just in case…

comment:9 Changed 4 years ago by AgilentGCMS

I don't know how, but things are resolved now. I did a port uninstall libffi, followed by a port install libffi, then a port rev-upgrade, and things (including the pesky gobject-introspection) finally built without errors. This was pure luck and no strategy, though. I'm not looking forward to the next time clang breaks :-(

comment:10 Changed 4 years ago by kencu (Ken)

When libffi updated, llvm-9.0 broke, and so cctools broke:

1725	:info:build dyld: Library not loaded: /Users/sbasu1/packages/macports/lib/libffi.6.dylib
1726	:info:build   Referenced from: /Users/sbasu1/packages/macports/libexec/llvm-9.0/lib/libLLVM.dylib
1727	:info:build   Reason: image not found
1728	:info:build fatal error: otool: fatal error in /Users/sbasu1/packages/macports/bin/llvm-objdump-mp-9.0

and then clearly MacPorts couldn't figure out that it needed to first rebuild llvm-9.0 before doing anything else.

The same thing just happened to me on 10.13. I left gobject-introspection unfinished, and told MacPorts to update llvm-9.0 with sudo port -v upgrade llvm-9.0.

Once that rebuilt, gobject-introspection sucessfully finished it's build, and then the rest of the ports went on to rebuild as instructed.

comment:11 Changed 4 years ago by snarkhunter (Steve Langer)

Agreed. gobject-introspection is missing a build dependency on llvm-9.0. I encountered the same problem when running port upgrade outdated. gobject-introspection fails to build because it can't run llvm, which is looking for libffi.6, but libffi has already been upgraded to libffi.7. Forcing llvm-9.0 to upgrade before gobject-introspection fixes the broken link.

comment:12 Changed 4 years ago by snarkhunter (Steve Langer)

Cc: snarkhunter added

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

it's not exactly missing a build dep on llvm-9.0. it's missing a build dep on cctools, which can be built against any one of a number of different llvm versions, any of which might be broken.

But we don't (at present!) want to give everything a build dep on cctools, so we suck it up when once every few years we upgrade an llvm dep and all the llvms break.

comment:14 Changed 4 years ago by kencu (Ken)

there is another ticket somewhere where we discussed this in more detail.

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

Resolution: fixed
Status: assignedclosed

Let us know if this is still an issue, after updating to the latest version (1.70.0).

Note: See TracTickets for help on using tickets.