Opened 12 years ago

Closed 12 years ago

#37213 closed defect (invalid)

pkgconfig - build fails

Reported by: jkorchok@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: pkgconfig

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

I ran into this while trying to install php5-gd. The build failed, so I tried:

sudo port clean pkgconfig

then

sudo port install pkgconfig

but got the same error.

The log is attached.

Attachments (3)

main.log (50.2 KB) - added by jkorchok@… 12 years ago.
main.2.log (5.9 KB) - added by jkorchok@… 12 years ago.
New Log
main3.log (6.9 KB) - added by jkorchok@… 12 years ago.
3rd log file

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by jkorchok@…

Attachment: main.log added

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

Owner: changed from macports-tickets@… to ryandesign@…
Port: pkgconfig added

Please remember to fill in the Port field and Cc the maintainer.

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

Description: modified (diff)

It builds fine for me; there must be something special about your system.

Comparing your log to mine, I see this in yours but not in mine:

:info:build gconvert.c: In function 'g_iconv':
:info:build gconvert.c:314: warning: passing argument 2 of 'libiconv' from incompatible pointer type

Perhaps there is a problem with your libiconv port.

I've committed a change to pkgconfig to make the log more verbose. Could you please:

sudo port selfupdate
sudo port clean pkgconfig
sudo port install pkgconfig

And attach the new main.log? Maybe that will help identify the problem better.

Changed 12 years ago by jkorchok@…

Attachment: main.2.log added

New Log

comment:3 Changed 12 years ago by jkorchok@…

I followed your steps and have attached the new log. Could the problem be that I'm building this on a G4 processor?

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

I should have mentioned when I said that it builds fine for me that I was testing on a Power Mac G4 with Leopard.

The new log shows a different error:

:debug:extract Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig/pkgconfig/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/pkgconfig/pkg-config-0.27.1.tar.gz' | /usr/bin/gnutar --no-same-owner -xf -
:info:extract /usr/bin/gnutar: pkg-config-0.27.1/glib/glib/gunicodeprivate.h: Cannot open: File exists
:info:extract /usr/bin/gnutar: pkg-config-0.27.1/glib/glib/gtree.c: Cannot open: File exists
:info:extract /usr/bin/gnutar: Error exit delayed from previous errors

I don't see how the files it's trying to extract could already exist if you cleaned the port before trying, which the log shows you did do, so I don't understand.

This page says the error "Cannot open: File exists" actually means permission denied. But I don't understand why permission would be denied for these two files only. You did use sudo when running the port command, right? (sudo port install pkgconfig) How was MacPorts itself installed—using the dmg you can download from our web site, or compiled manually from source? Have you been able to install any other ports?

According to tar -zf pkg-config-0.27.1.tar.gz the archive contains 327 items. gunicodeprivate.h is 138 and gtree.c is 185; not sure what's significant about those two files. Does the port work pkgconfig directory contain other files that were successfully extracted?

Could you sudo port clean pkgconfig again and then try again and see if you still get this same error?

comment:5 Changed 12 years ago by jkorchok@…

I entered

sudo port clean pkgconfig

and got "Error: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig/pkgconfig/work/pkg-config-0.27.1/glib/glib/gtree.c: no such file or directory". Then

sudo port install pkgconfig

and got "Error: org.macports.extract for port pkgconfig returned: command execution failed".

The log appears identical except for dates/times.

The pkgconfig work directory contains a file .macports.pkgconfig.state and a directory pkg-config-0.27.1 containing 29 files and 2 subdirectories "check" and "glib". Check contains 27 files and glib contains 24 files and 2 subdirectories "glib" and "m4macros". I can keep going if this is useful information.

This copy of MacPorts was originally from a .dmg installer, but has been updated several times since original installation. I have installed several other ports on the same machine: apache2, php5, mysql5, etc.

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

You shouldn't be getting an error when cleaning a port; cleaning a port is just supposed to remove its work directory, regardless what's in it. Try manually deleting the directory /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig, then cleaning and trying again.

comment:7 Changed 12 years ago by jkorchok@…

Manually deleting was a pain. Even

sudo rm -r -f /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig/*

would not remove the files. For all the files inside the glib/glib directory, I was getting error messages that they could not be deleted because they did not exist. I finally had to

chmod -r 777 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig/*

and drag it to the trash. Then:

sudo port clean pkgconfig
sudo port clean php5-gd
sudo port install php5-gd

and it stopped again with

--->  Extracting pkgconfig
Error: org.macports.extract for port pkgconfig returned: command execution failed
Please see the log file for port pkgconfig for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig/pkgconfig/main.log
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade php5 failed

I will attach the log file again.

Last edited 12 years ago by jkorchok@… (previous) (diff)

Changed 12 years ago by jkorchok@…

Attachment: main3.log added

3rd log file

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

This is all very strange. Could you verify your disk with Disk Utility to make sure there's not some larger problem?

comment:9 Changed 12 years ago by jkorchok@…

Well, that was the real problem: a zombie disk that looked like it was still good. Thank you very much for all the time you put into helping me, it is much appreciated.

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

Resolution: invalid
Status: newclosed

I'm glad we got to the bottom of it! I hope the misbehaving disk did not lose too much important information.

Note: See TracTickets for help on using tickets.