Opened 10 years ago

Last modified 10 years ago

#44786 new defect

list of dependencies to be installed can be inaccurate

Reported by: larryv (Lawrence Velázquez) Owned by: shasha@…
Priority: Normal Milestone:
Component: base Version: 2.3.99
Keywords: Cc: raimue (Rainer Müller), jmroot (Joshua Root)
Port:

Description

The gsoc14-interactive dependency list may incorrectly include ports that are not actually built and installed.

% port -v installed rdepof:libgcrypt
The following ports are currently installed:
  expat @2.1.0_0 (active) platform='darwin 11' archs='x86_64'
  gettext @0.19.2_0 (active) platform='darwin 11' archs='x86_64'
  libiconv @1.14_0 (active) platform='darwin 11' archs='x86_64'
  ncurses @5.9_2 (active) platform='darwin 11' archs='x86_64'
% sudo port install libgcrypt
--->  Computing dependencies for libgcrypt
The following dependencies will be installed:  libgpg-error
Continue? [Y/n]: n
--->  Scanning binaries for linking errors
--->  No broken files found.
% sudo port install libgcrypt configure.build_arch=i386
Password:
--->  Computing dependencies for libgcrypt
The following dependencies will be installed: 
 expat
 gettext
 libgpg-error
 libiconv
 ncurses
Continue? [Y/n]: Y
--->  Fetching source for libgpg-error
--->  Verifying checksums for libgpg-error
--->  Extracting libgpg-error
--->  Applying patches to libgpg-error
--->  Configuring libgpg-error
--->  Building libgpg-error
--->  Staging libgpg-error into destroot
--->  Installing libgpg-error @1.13_0
--->  Activating libgpg-error @1.13_0
--->  Cleaning libgpg-error
--->  Fetching source for libgcrypt
--->  Verifying checksums for libgcrypt
--->  Extracting libgcrypt
--->  Applying patches to libgcrypt
--->  Configuring libgcrypt
--->  Building libgcrypt
--->  Staging libgcrypt into destroot
--->  Installing libgcrypt @1.6.1_0
--->  Activating libgcrypt @1.6.1_0
--->  Cleaning libgcrypt
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
sudo port install libgcrypt configure.build_arch=i386  20.57s user 12.60s system 117% cpu 28.283 total
%

This is admittedly a bit of an odd bug: The dependency list is simultaneously correct (the dependencies ought to be rebuilt as +universal) and incorrect (it does not reflect what will actually happen). Of course, the actual install behavior is incorrect and should be fixed, but the dependency list should not be making false promises.

Attachments (1)

main.log (172.8 KB) - added by larryv (Lawrence Velázquez) 10 years ago.
logfile from installing libgpg-error and libgcrypt

Download all attachments as: .zip

Change History (11)

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

The deps that are already installed should be universalised by upgrade_mport_deps before mportdepends is even called to generate the list that is printed. Can we have debug output please? Any difference if you override build_arch and not just configure.build_arch?

Changed 10 years ago by larryv (Lawrence Velázquez)

Attachment: main.log added

logfile from installing libgpg-error and libgcrypt

comment:2 in reply to:  1 Changed 10 years ago by larryv (Lawrence Velázquez)

Doesn’t seem to make a difference, unless I’m doing something wrong.

% sudo port -k install libgcrypt build_arch=i386
Password:
--->  Computing dependencies for libgcrypt
The following dependencies will be installed: 
 expat
 gettext
 libgpg-error
 libiconv
 ncurses
Continue? [Y/n]: Y
--->  Fetching source for libgpg-error
--->  Verifying checksums for libgpg-error
--->  Extracting libgpg-error
--->  Applying patches to libgpg-error
--->  Configuring libgpg-error
--->  Building libgpg-error
--->  Staging libgpg-error into destroot
--->  Installing libgpg-error @1.13_0
--->  Activating libgpg-error @1.13_0
--->  Fetching source for libgcrypt
--->  Verifying checksums for libgcrypt
--->  Extracting libgcrypt
--->  Applying patches to libgcrypt
--->  Configuring libgcrypt
--->  Building libgcrypt
--->  Staging libgcrypt into destroot
--->  Installing libgcrypt @1.6.1_0
--->  Activating libgcrypt @1.6.1_0
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
sudo port -k install libgcrypt build_arch=i386  20.13s user 22.26s system 139% cpu 30.472 total
%

I’ve attached the log file.

comment:3 Changed 10 years ago by jmroot (Joshua Root)

The disparity between the printed list and what’s actually installed is easy to explain at least: Nothing happens when you try to install a port that is already installed with the same name,version,variants. The question is why they’re not being upgraded with +universal before the “computing dependencies” message. Maybe add some more debug messages in and around upgrade_mport_deps?

comment:4 Changed 10 years ago by jmroot (Joshua Root)

Actually, I think I see the problem. I believe it would work if you installed libgpg-error first. I doubt this was introduced by the GSoC project.

In fact upgrade_mport_deps only operates on direct dependencies that are already installed. I think mportdepends is doing something a bit wrong in this case and building a dep tree with everything’s build_archs=i386, rather than realising it needs to add +universal to the ones that are already installed.

comment:5 in reply to:  4 Changed 10 years ago by larryv (Lawrence Velázquez)

Replying to jmr@…:

Actually, I think I see the problem. I believe it would work if you installed libgpg-error first.

This does seem to be the case.

% port -y install libgpg-error build_arch=i386
Error: Insufficient privileges to write to MacPorts install prefix.
Warning: MacPorts running without privileges. You may be unable to complete certain actions (e.g. install).
For gperf: skipping org.macports.main (dry run)
Skipping deactivate gperf @3.0.4_2 (dry run)
Skipping activate gperf @3.0.4_2+universal (dry run)
--->  Computing dependencies for libiconv
For libiconv: skipping org.macports.main (dry run)
Skipping deactivate libiconv @1.14_0 (dry run)
Skipping activate libiconv @1.14_0+universal (dry run)
For expat: skipping org.macports.main (dry run)
Skipping deactivate expat @2.1.0_0 (dry run)
Skipping activate expat @2.1.0_0+universal (dry run)
For ncurses: skipping org.macports.main (dry run)
Skipping deactivate ncurses @5.9_2 (dry run)
Skipping activate ncurses @5.9_2+universal (dry run)
--->  Computing dependencies for gettext
The following dependencies will be installed: 
 expat
 libiconv
 ncurses
Continue? [Y/n]: 
For expat: skipping org.macports.main (dry run)
For libiconv: skipping org.macports.main (dry run)
For ncurses: skipping org.macports.main (dry run)
For gettext: skipping org.macports.main (dry run)
Skipping deactivate gettext @0.19.2_0 (dry run)
Skipping activate gettext @0.19.2_0+universal (dry run)
--->  Computing dependencies for libgpg-error
The following dependencies will be installed: 
 expat
 gettext
 libiconv
 ncurses
Continue? [Y/n]: 
For libgpg-error: skipping org.macports.main (dry run)
%

comment:6 Changed 10 years ago by larryv (Lawrence Velázquez)

Keywords: gsoc14-interactive added

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

I think maybe this also would work correctly if you set configure.build_arch in the portfile rather than overriding it on the command line. (The override gets passed on to the dependencies, so they parse with build_arch=i386 rather than their actual installed arch.)

comment:8 Changed 10 years ago by jmroot (Joshua Root)

What’s with the keyword BTW? I’m almost certain that the same incorrect dependency list would have been displayed before gsoc14-interactive was merged.

comment:9 in reply to:  8 Changed 10 years ago by larryv (Lawrence Velázquez)

Keywords: gsoc14-interactive removed

Forgot that you already mentioned that; sorry.

comment:10 in reply to:  7 Changed 10 years ago by larryv (Lawrence Velázquez)

Replying to jmr@…:

I think maybe this also would work correctly if you set configure.build_arch in the portfile rather than overriding it on the command line. (The override gets passed on to the dependencies, so they parse with build_arch=i386 rather than their actual installed arch.)

This seems right. After adding “configure.build_arch i386” to libgcrypt’s Portfile:

% port edit libgcrypt
% sudo port -k install libgcrypt
Portfile changed since last build; discarding previous state.
--->  Computing dependencies for libgcrypt
The following dependencies will be installed: 
 expat
 gettext
 gperf
 libgpg-error
 libiconv
 ncurses
Continue? [Y/n]: 
--->  Fetching source for expat
--->  Verifying checksums for expat
--->  Extracting expat
--->  Configuring expat
--->  Building expat
--->  Staging expat into destroot
--->  Installing expat @2.1.0_0+universal
--->  Deactivating expat @2.1.0_0
--->  Cleaning expat
--->  Activating expat @2.1.0_0+universal
--->  Fetching source for gperf
--->  Verifying checksums for gperf
--->  Extracting gperf
--->  Applying patches to gperf
--->  Configuring gperf
--->  Building gperf
--->  Staging gperf into destroot
--->  Installing gperf @3.0.4_2+universal
--->  Activating gperf @3.0.4_2+universal
--->  Fetching source for libiconv
--->  Verifying checksums for libiconv
--->  Extracting libiconv
--->  Applying patches to libiconv
--->  Configuring libiconv
^CError: Failed to configure libiconv, consult /opt/local/var/macports/build/_Users_larryv_Projects_MacPorts_git-svn_trunk_dports_textproc_libiconv/libiconv/work/libiconv-1.14-x86_64/config.log
Error: Failed to configure libiconv: configure failure: checking for CFLocaleCopyCurrent... SIGINT signal received
Error: See /opt/local/var/macports/logs/_Users_larryv_Projects_MacPorts_git-svn_trunk_dports_textproc_libiconv/libiconv/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port libgcrypt failed
sudo port -k install libgcrypt  10.56s user 7.26s system 37% cpu 47.921 total
%
Note: See TracTickets for help on using tickets.