Opened 13 years ago

Closed 12 years ago

Last modified 7 years ago

#30809 closed defect (worksforme)

gtk2 fails to build on lion: `/opt/local/lib/libfreetype.la' is not a valid libtool archive

Reported by: hofione@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: lion Cc: drkp (Dan Ports), ryandesign (Ryan Carsten Schmidt), jmroot (Joshua Root), cdeil (Christoph Deil), qhuys@…, ak.ml@…, cooljeanius (Eric Gallager)
Port: gtk2

Description (last modified by ryandesign (Ryan Carsten Schmidt))

after

sudo port sync
sudo port selfupdate
sudo port upgrade outdated

gtk2 fails to build

Attachments (4)

main.log (118.9 KB) - added by hofione@… 13 years ago.
main.2.log (1.5 MB) - added by hofione@… 13 years ago.
libXau.la (940 bytes) - added by drkp (Dan Ports) 13 years ago.
libpangocairo-1.0.la (1.7 KB) - added by drkp (Dan Ports) 13 years ago.

Download all attachments as: .zip

Change History (32)

Changed 13 years ago by hofione@…

Attachment: main.log added

comment:1 Changed 13 years ago by hofione@…

Cc: hofione@… added

Cc Me!

comment:2 Changed 13 years ago by hofione@…

port info gtk2
gtk2 @2.24.5 (gnome, x11)
Variants:             no_x11, quartz, universal, [+]x11

Description:          GTK+ is a highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API. GTK+ it is written in C, but has bindings to many
                      other popular programming languages such as C++, Python and C# among others.
Homepage:             http://www.gtk.org/

Build Dependencies:   pkgconfig, perl5
Library Dependencies: atk, pango, gdk-pixbuf2, xorg-libXi, xorg-libXrandr, xorg-libXcursor, xorg-libXinerama, xorg-libXdamage, xorg-libXcomposite, xorg-libXfixes
Runtime Dependencies: shared-mime-info
Platforms:            darwin
License:              LGPL-2+
Maintainers:          nomaintainer@macports.org

comment:3 Changed 13 years ago by drkp (Dan Ports)

Cc: dports@… added; hofione@… removed

This isn't a complete log; can you run a sudo port clean gtk2 then retry upgrading, and post the resulting log if it fails?

(and the ticket reporter is automatically cc'd, you don't need to cc yourself)

Changed 13 years ago by hofione@…

Attachment: main.2.log added

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Description: modified (diff)

I see:

libtool: link: `/opt/local/lib/libfreetype.la' is not a valid libtool archive

So, why isn't it a valid libtool archive? What's in it? What happens if you rebuild the freetype port?

comment:5 Changed 13 years ago by drkp (Dan Ports)

Cc: jmr@… added
Summary: gtk2 fails to build on liongtk2 fails to build on lion: `/opt/local/lib/libfreetype.la' is not a valid libtool archive

jmr saw something similar today too, but with a different .la file.

comment:6 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

I've fielded at least one instance of this before too, in which the .la file and several other files were the right size but composed entirely of null bytes: #30136

comment:7 Changed 13 years ago by jmroot (Joshua Root)

And today it built fine. I have no explanation.

comment:8 Changed 13 years ago by hofione@…

Just like for me today Strange

comment:9 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: worksforme
Status: newclosed

comment:10 Changed 13 years ago by drkp (Dan Ports)

Resolution: worksforme
Status: closedreopened

I just hit this one myself, but I have no idea why. The .la files it's complaining about (two of them, this time) look perfectly fine, and the libtool command works when re-executed.

comment:11 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

If you are certain you are receiving the same error ('foo.la' is not a valid libtool archive), then can you please attach the libtool archive in question so I can take a look at it? I don't see how you could have gotten that message if retrying worked if and the libtool archive is fine.

comment:12 Changed 13 years ago by jmroot (Joshua Root)

Same way I did, of course. Which is a complete mystery. I checked the .la file when the build failed and it was fine.

comment:13 Changed 13 years ago by drkp (Dan Ports)

Sure, here are the libtool archives (I made a copy immediately after I saw the error, so they definitely haven't been modified in the interim). I don't have a build log handy, but the gtk build stopped when one libtool invocation errored out with not a valid libtool archive for both of these .la files, and the same command worked again when retried.

Changed 13 years ago by drkp (Dan Ports)

Attachment: libXau.la added

Changed 13 years ago by drkp (Dan Ports)

Attachment: libpangocairo-1.0.la added

comment:14 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Indeed. Your libXau.la is identical to mine, and your libpangocairo-1.0.la is practically identical (-lbz2 occurs at a slightly different position in yours but that wouldn't matter). I can only conclude that Lion and/or its Xcode are strange.

comment:15 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: Deil.Christoph@… added

Same problem was mentioned in #30322, in which ImageMagick couldn't be built because of allegedly invalid libICE.la and libXt.la archives, but which are identical to the ones on my system.

comment:16 Changed 13 years ago by drkp (Dan Ports)

Yes, I've noticed this when building gtk2 and ImageMagick. I haven't run into it for any other ports (though obviously that doesn't mean there aren't any). Still no idea what's going on, though.

comment:17 Changed 13 years ago by qhuys@…

So I had the same problem. The log file was:

:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gtk2/gtk2/work/gtk+-2.24.6" && /usr/bin/make -j4 -w all " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)

So being new and naive, I cd'd into /opt/local.../work/gtk+-2.24.6 and simply typed:

make -j4 -w all

which ran happily without errors.

Then, I ran

sudo port install gtk2

again, and this time it happily continued. Mind you... I'm not sure whether I might have broken something?

comment:18 Changed 13 years ago by qhuys@…

Cc: qhuys@… added

Cc Me!

comment:19 in reply to:  17 Changed 13 years ago by macports@…

I tried running the command:

sudo port upgrade outdated

again. Same error. Then I ran the command again, and it worked! I think we might be seeing a Makefile dependency issue, where "-j" is causing one process to start linking before another process has finished creating the link archive.

comment:20 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

But if it's saying /opt/local/lib/libfreetype.la is not a valid archive... that file has already been successfully built and installed by the freetype port. You're past that and on to another port.

comment:21 Changed 13 years ago by ak.ml@…

Cc: ak.ml@… added

Cc Me!

comment:22 Changed 12 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: reopenedclosed

I haven't seen this with any gtk2 update since. If someone else has, feel free to reopen.

comment:23 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #36078.

comment:24 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #38130.

comment:25 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:26 Changed 11 years ago by Ionic (Mihai Moldovan)

FYI: I just did. But it does really look like a race condition... Probably too complex to fix, when re-running the upgrade works fine.

comment:27 Changed 7 years ago by mojca (Mojca Miklavec)

Hit today by

libtool:   error: '/opt/local/lib/libxcb.la' is not a valid libtool archive

when upgrading gtk3. Reruning the build "fixed" the problem.

Last edited 7 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:28 Changed 7 years ago by kencu (Ken)

a different port, a different archive, same error, on 10.7, installing pulseaudio:

libtool:   error: '/opt/local/lib/libX11.la' is not a valid libtool archive

again, rerunning the build (without cleaning) "fixed" the problem as well. Race condition sounds likely to me as well.

Note: See TracTickets for help on using tickets.