during upgrade from urxvt8.7 to the current version I got the error message ===================================CUT======================================== Portfile changed since last build; discarding previous state. ---> Fetching libiconv ---> Verifying checksum(s) for libiconv ---> Extracting libiconv ---> Applying patches to libiconv ---> Configuring libiconv ---> Building libiconv with target all ---> Staging libiconv into destroot ---> Packaging tgz archive for libiconv 1.12_0+darwin_8 ---> Deactivating libiconv 1.11_0 Error: Deactivating libiconv 1.11_0 failed: Active version of libiconv is not 1.11_0 but 1.11_0+darwin_8. ===================================CUT======================================== after which install proceded (apparently successful). trying to start `urxvt' now throws the error: ===================================CUT======================================== dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib Referenced from: /opt/local/lib/libXft.2.dylib Reason: Incompatible library version: libXft.2.dylib requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Trace/BPT trap ===================================CUT======================================== trying a `sudo port deactivate libiconv@1.11_0+darwin_8' yielded ===================================CUT======================================== Error: port deactivate failed: Registry error: libiconv not registered as installed & active. ===================================CUT======================================== which seems inconsistent with the error message during urxvt install. after a `sudo port activate libiconv@1.12' now everything seems to work, but the above messages seems to hint at some grade of corruption of the internal state of port. is this the case? can I sanitize/check it somehow without purging everything? I also notice that many packages appear both with `port list active' _and_ `port list inactive'. how can this be? and a last question: the "active" ports are the only one in use or are "inactive" ones (especially libs) secretly used by other ports? I noted that a tentative `sudo port uninstall libiconv@1.11_0+darwin_8' showed me lots of ports depending on it which would need prior uninstall. I understand that different versions of libs are needed at the same time but why, then, is one declared "active" the others "inactive"? so in short what's the difference between "active" and "inactive", especially for libs? joerg
On Thu, Mar 13, 2008 at 12:11:27PM +0100, Joerg van den Hoff wrote:
during upgrade from urxvt8.7 to the current version I got the error message
===================================CUT======================================== Portfile changed since last build; discarding previous state. ---> Fetching libiconv ---> Verifying checksum(s) for libiconv ---> Extracting libiconv ---> Applying patches to libiconv ---> Configuring libiconv ---> Building libiconv with target all ---> Staging libiconv into destroot ---> Packaging tgz archive for libiconv 1.12_0+darwin_8 ---> Deactivating libiconv 1.11_0 Error: Deactivating libiconv 1.11_0 failed: Active version of libiconv is not 1.11_0 but 1.11_0+darwin_8. ===================================CUT======================================== after which install proceded (apparently successful).
trying to start `urxvt' now throws the error: ===================================CUT======================================== dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib Referenced from: /opt/local/lib/libXft.2.dylib Reason: Incompatible library version: libXft.2.dylib requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Trace/BPT trap ===================================CUT========================================
trying a
`sudo port deactivate libiconv@1.11_0+darwin_8'
yielded ===================================CUT======================================== Error: port deactivate failed: Registry error: libiconv not registered as installed & active. ===================================CUT======================================== which seems inconsistent with the error message during urxvt install.
after a `sudo port activate libiconv@1.12' now everything seems to work, but the above messages seems to hint at some grade of corruption of the internal state of port. is this the case? can I sanitize/check it somehow without purging everything?
I also notice that many packages appear both with `port list active' _and_ `port list inactive'. how can this be?
and a last question: the "active" ports are the only one in use or are "inactive" ones (especially libs) secretly used by other ports? I noted that a tentative
`sudo port uninstall libiconv@1.11_0+darwin_8'
showed me lots of ports depending on it which would need prior uninstall. I understand that different versions of libs are needed at the same time but why, then, is one declared "active" the others "inactive"?
so in short what's the difference between "active" and "inactive", especially for libs?
joerg
hi again, "answering" my own mail keeps it in this thread at least: in the meantime I had to realize that `w3m' (which was complaining just as `urxvt' before I manually activated libiconv1.12) contrary to `urxvt' is not happy again. even a `port uninstall w3m; port clean --all w3m; port install w3m' did not help: when starting `w3m' now. cpu time goes to 100% but w3m never pops up. here are the first (and last) few lines from `ktrace': ================================CUT================================================ 19806 ktrace RET ktrace 0 19806 ktrace CALL execve(0xbfffecfc,0xbffff2e8,0xbffff2f4) 19806 ktrace NAMI "/sw/bin/w3m" 19806 ktrace RET execve -1 errno 2 No such file or directory 19806 ktrace CALL execve(0xbfffecfc,0xbffff2e8,0xbffff2f4) 19806 ktrace NAMI "/sw/sbin/w3m" 19806 ktrace RET execve -1 errno 2 No such file or directory 19806 ktrace CALL execve(0xbfffecfc,0xbffff2e8,0xbffff2f4) 19806 ktrace NAMI "/opt/local/bin/w3m" 19806 ktrace NAMI "/usr/lib/dyld" 19806 w3m RET execve 0 19806 w3m CALL issetugid 19806 w3m RET issetugid 0 19806 w3m CALL __sysctl(0xbfffed8c,0x2,0xbfffed94,0xbfffed88,0x8fe45a90,0xa) 19806 w3m RET __sysctl 0 19806 w3m CALL __sysctl(0xbfffed94,0x2,0x8fe599bc,0xbfffee38,0,0) 19806 w3m RET __sysctl 0 19806 w3m CALL __sysctl(0xbfffed8c,0x2,0xbfffed94,0xbfffed88,0x8fe45abc,0xd) 19806 w3m RET __sysctl 0 19806 w3m CALL __sysctl(0xbfffed94,0x2,0x8fe599b8,0xbfffee38,0,0) 19806 w3m RET __sysctl 0 19806 w3m CALL getpid 19806 w3m RET getpid 19806/0x4d5e 19806 w3m CALL __sysctl(0xbfffee40,0x3,0xbfffee38,0xbfffee3c,0,0) 19806 w3m RET __sysctl 0 19806 w3m CALL open(0x1570,0,0) 19806 w3m NAMI "/opt/local/lib/libintl.8.dylib" 19806 w3m RET open 3 19806 w3m CALL fstat(0x3,0xbfffcd10) 19806 w3m RET fstat 0 19806 w3m CALL pread(0x3,0xbfffd170,0x1000,0) 19806 w3m GIO fd 3 read 4096 bytes ... ... ... 19806 w3m RET pread 4096/0x1000 19806 w3m CALL shared_region_map_file_np(0x3,0x4,0xbfffbe60,0) 19806 w3m RET shared_region_map_file_np 0 19806 w3m CALL close(0x3) 19806 w3m RET close 0 19806 w3m CALL __sysctl(0xbffff19c,0x2,0xbffff198,0xbffff190,0,0) 19806 w3m RET __sysctl 0 19806 w3m CALL __sysctl(0xbffff19c,0x2,0xbffff194,0xbffff190,0,0) 19806 w3m RET __sysctl 0 19806 w3m CALL getpid 19806 w3m RET getpid 19806/0x4d5e 19806 w3m CALL stat(0x600a90,0xbfffe560) 19806 w3m NAMI "/sw/bin/w3m" 19806 w3m RET stat -1 errno 2 No such file or directory 19806 w3m CALL stat(0x600a90,0xbfffe560) 19806 w3m NAMI "/sw/sbin/w3m" 19806 w3m RET stat -1 errno 2 No such file or directory 19806 w3m CALL stat(0x600a90,0xbfffe560) 19806 w3m NAMI "/opt/local/bin/w3m" 19806 w3m RET stat 0 19806 w3m CALL getuid 19806 w3m RET getuid 501/0x1f5 19806 w3m CALL __sysctl(0xbfffef4c,0x2,0xa000fc60,0xbfffef48,0,0) 19806 w3m RET __sysctl 0 19806 w3m CALL mmap(0,0x10000,0x3,0x1002,0xffffffff,0) 19806 w3m RET mmap 1961984/0x1df000 19806 w3m CALL mmap(0x1ef000,0x10000,0x3,0x1002,0xffffffff,0) 19806 w3m RET mmap 2027520/0x1ef000 19806 w3m CALL __sysctl(0xbfffef50,0x2,0xbfffef48,0xbfffef4c,0,0) 19806 w3m RET __sysctl 0 19806 w3m PSIG SIGINT SIG_DFL ================================CUT================================================ afaics `w3m' hangs with some kernel call(?) before I issued SIGINT so I have a _real_ problem now... it seems somehow related to the things going wrong first with respect to libiconv@1.11 vs. libiconv@1.12. but what exactly have I messed up and, more importantly, how can I repair it? all this is with 10.4.11 on a G5 (won't upgrade to 10.5 before X11 is fully functional again including fullscreen mode ...) thanks in advance joerg
On Mar 13, 2008, at 06:11, Joerg van den Hoff wrote:
during upgrade from urxvt8.7 to the current version I got the error message
===================================CUT================================ ======== Portfile changed since last build; discarding previous state. ---> Fetching libiconv ---> Verifying checksum(s) for libiconv ---> Extracting libiconv ---> Applying patches to libiconv ---> Configuring libiconv ---> Building libiconv with target all ---> Staging libiconv into destroot ---> Packaging tgz archive for libiconv 1.12_0+darwin_8 ---> Deactivating libiconv 1.11_0 Error: Deactivating libiconv 1.11_0 failed: Active version of libiconv is not 1.11_0 but 1.11_0+darwin_8. ===================================CUT================================ ========
Peculiar...
after which install proceded (apparently successful).
I don't know why MacPorts proceeds when it encounters an error activating a port. This only leads to further errors down the road, as you've seen:
trying to start `urxvt' now throws the error: ===================================CUT================================ ======== dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib Referenced from: /opt/local/lib/libXft.2.dylib Reason: Incompatible library version: libXft.2.dylib requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Trace/BPT trap ===================================CUT================================ ========
No libiconv is active, because of the earlier error, so ports that require libiconv now explode.
trying a
`sudo port deactivate libiconv@1.11_0+darwin_8'
yielded ===================================CUT================================ ======== Error: port deactivate failed: Registry error: libiconv not registered as installed & active. ===================================CUT================================ ======== which seems inconsistent with the error message during urxvt install.
Agreed. That seems inconsistent. Not sure how you got into this state.
after a `sudo port activate libiconv@1.12' now everything seems to work,
Great!
but the above messages seems to hint at some grade of corruption of the internal state of port. is this the case? can I sanitize/check it somehow without purging everything?
What does "port installed libiconv" show now?
I also notice that many packages appear both with `port list active' _and_ `port list inactive'. how can this be?
"port list" does not do what you think it does. "port list" does the following: for each port, display the current version (not the installed version). You probably would rather use "port installed active" and "port installed inactive".
and a last question: the "active" ports are the only one in use
Yes.
or are "inactive" ones (especially libs) secretly used by other ports?
No, inactive ports are not used at all.
I noted that a tentative
`sudo port uninstall libiconv@1.11_0+darwin_8'
showed me lots of ports depending on it which would need prior uninstall.
The message shown by MacPorts is misleading. The message says "Unable to uninstall libiconv 1.11_0+darwin_8, the following ports depend on it" but what the message should say is "Unable to uninstall libiconv, the following ports depend on it" (in other words it should not list the version or variants). Since you already have a newer version of libiconv installed, it's perfectly fine to remove the older version. MacPorts just doesn't know any better. Educate it by using "-f" when uninstalling ports in such situations: sudo port -f uninstall libiconv@1.11_0+darwin_8
I understand that different versions of libs are needed at the same time
That's not how MacPorts works. Only one version of a library can be used at a time. If multiple versions of a library are needed at the same time, multiple separate ports must be created. See for example apr and apr0, db41 thru db46, and many other examples.
but why, then, is one declared "active" the others "inactive"?
When you "sudo port upgrade foo", the old version is deactivated and the new version is activated. If you don't want the old version anymore, you can then uninstall the old version: sudo port uninstall foo @1.2.3 If you want MacPorts to automatically uninstall the old version during the upgrade, use the "-u" flag: sudo port -u upgrade foo This will fail if any port depends on foo. In that case you must also force it. But the force flag also causes MacPorts to rebuild all dependencies, possibly multiple times, which you don't want. So if you want to force an upgrade, you should also always use the nonrecursive flag: sudo port -nfu upgrade foo
so in short what's the difference between "active" and "inactive", especially for libs?
Inactive ports are not used. They're just there so that you can activate them again, should you choose to do so (after deactivating the version that you currently have active.) If you don't want to reactivate old versions, you can uninstall them to reclaim the disk space.
ryan, thanks a lot for bothering. I really appreciate this. On Fri, Mar 14, 2008 at 06:39:20AM -0500, Ryan Schmidt wrote:
On Mar 13, 2008, at 06:11, Joerg van den Hoff wrote:
during upgrade from urxvt8.7 to the current version I got the error message
===================================CUT================================ ======== Portfile changed since last build; discarding previous state. ---> Fetching libiconv ---> Verifying checksum(s) for libiconv ---> Extracting libiconv ---> Applying patches to libiconv ---> Configuring libiconv ---> Building libiconv with target all ---> Staging libiconv into destroot ---> Packaging tgz archive for libiconv 1.12_0+darwin_8 ---> Deactivating libiconv 1.11_0 Error: Deactivating libiconv 1.11_0 failed: Active version of libiconv is not 1.11_0 but 1.11_0+darwin_8. ===================================CUT================================ ========
Peculiar...
after which install proceded (apparently successful).
I don't know why MacPorts proceeds when it encounters an error activating a port. This only leads to further errors down the road, as you've seen:
deserves this an "official" bug report (I was hoping a bit the ml might suffice)?
trying to start `urxvt' now throws the error: ===================================CUT================================ ======== dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib Referenced from: /opt/local/lib/libXft.2.dylib Reason: Incompatible library version: libXft.2.dylib requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Trace/BPT trap ===================================CUT================================ ========
No libiconv is active, because of the earlier error, so ports that require libiconv now explode.
trying a
`sudo port deactivate libiconv@1.11_0+darwin_8'
yielded ===================================CUT================================ ======== Error: port deactivate failed: Registry error: libiconv not registered as installed & active. ===================================CUT================================ ======== which seems inconsistent with the error message during urxvt install.
Agreed. That seems inconsistent. Not sure how you got into this state.
neither am I. I'm definitely _not_ tinkering with the system. rather I try to upgrade by and then relevant packages and go on with my work.
after a `sudo port activate libiconv@1.12' now everything seems to work,
Great!
but the above messages seems to hint at some grade of corruption of the internal state of port. is this the case? can I sanitize/check it somehow without purging everything?
What does "port installed libiconv" show now?
this: The following ports are currently installed: libiconv @1.10_1+darwin_8 libiconv @1.11_0+darwin_8 libiconv @1.12_0+darwin_8 (active) libiconv @1.9.2_1
I also notice that many packages appear both with `port list active' _and_ `port list inactive'. how can this be?
"port list" does not do what you think it does. "port list" does the following: for each port, display the current version (not the installed version).
You probably would rather use "port installed active" and "port installed inactive".
thanks for this clarification. I read the manpage again: this behaviour is far from obvious from the manpage, since there "installed" and "active" are both listed as pseudo-portnames which should imply that 'port list active' should do what I expected. also "port installed" (or "port installed active") works while "port active" does not. should not the manpage be modified to make this point clear?
and a last question: the "active" ports are the only one in use
Yes.
or are "inactive" ones (especially libs) secretly used by other ports?
No, inactive ports are not used at all.
I noted that a tentative
`sudo port uninstall libiconv@1.11_0+darwin_8'
showed me lots of ports depending on it which would need prior uninstall.
The message shown by MacPorts is misleading. The message says "Unable to uninstall libiconv 1.11_0+darwin_8, the following ports depend on it" but what the message should say is "Unable to uninstall libiconv, the following ports depend on it" (in other words it should not list the version or variants). Since you already have a newer version of libiconv installed, it's perfectly fine to remove the older version. MacPorts just doesn't know any better. Educate it by using "-f" when uninstalling ports in such situations:
ah. maybe I manage to remember this in the future.
sudo port -f uninstall libiconv@1.11_0+darwin_8
I understand that different versions of libs are needed at the same time
That's not how MacPorts works. Only one version of a library can be used at a time. If multiple versions of a library are needed at the same time, multiple separate ports must be created. See for example apr and apr0, db41 thru db46, and many other examples.
please, could you clarify this a bit? does this not still mean that, e.g. apr requires/installs, say libtmp1.1, and apr0 libtmp1.2 so that both need to be there and are used "at the same time" (meaning when apr or apr0 are started)? whether this is necessitated by two variants of an application (say apr) or by uncorrelated apps seems not to make a difference. so, this is still not clear to me: I would expect that some ports rely on a certain version of a lib, others (e.g. more up-to-date ones) need different versions. surely not all available ports always are in a state that they use the same library versions? and even if so, would not otherwise a single upgrade of a single package (inclduing some lib update) lead to necessity of upgrading virtually _everything_ else which needs that library? (i'm not offended if I get the "read the manual" message :-))
but why, then, is one declared "active" the others "inactive"?
When you "sudo port upgrade foo", the old version is deactivated and the new version is activated. If you don't want the old version anymore, you can then uninstall the old version:
sudo port uninstall foo @1.2.3
If you want MacPorts to automatically uninstall the old version during the upgrade, use the "-u" flag:
sudo port -u upgrade foo
This will fail if any port depends on foo. In that case you must also force it. But the force flag also causes MacPorts to rebuild all dependencies, possibly multiple times, which you don't want. So if you want to force an upgrade, you should also always use the nonrecursive flag:
sudo port -nfu upgrade foo
so in short what's the difference between "active" and "inactive", especially for libs?
Inactive ports are not used. They're just there so that you can activate them again, should you choose to do so (after deactivating the version that you currently have active.) If you don't want to reactivate old versions, you can uninstall them to reclaim the disk space.
thanks a lot for getting most of my questions answered. joerg
On Mar 14, 2008, at 07:38, Joerg van den Hoff wrote:
ryan,
thanks a lot for bothering. I really appreciate this.
On Fri, Mar 14, 2008 at 06:39:20AM -0500, Ryan Schmidt wrote:
On Mar 13, 2008, at 06:11, Joerg van den Hoff wrote:
during upgrade from urxvt8.7 to the current version I got the error message
===================================CUT============================== == ======== Portfile changed since last build; discarding previous state. ---> Fetching libiconv ---> Verifying checksum(s) for libiconv ---> Extracting libiconv ---> Applying patches to libiconv ---> Configuring libiconv ---> Building libiconv with target all ---> Staging libiconv into destroot ---> Packaging tgz archive for libiconv 1.12_0+darwin_8 ---> Deactivating libiconv 1.11_0 Error: Deactivating libiconv 1.11_0 failed: Active version of libiconv is not 1.11_0 but 1.11_0+darwin_8. ===================================CUT============================== == ========
Peculiar...
after which install proceded (apparently successful).
I don't know why MacPorts proceeds when it encounters an error activating a port. This only leads to further errors down the road, as you've seen:
deserves this an "official" bug report (I was hoping a bit the ml might suffice)?
All bugs deserve a bug report in our issue tracker. :) I'm just not sure how to report this. I've seen it before, but I forget how it happened to be exactly. And you don't know how it happened to you either. Without a reproduction recipe, it'll be hard to fix. But it should still be filed. I tried to search just now (summary contains "activat", component = base) and didn't find it.
trying to start `urxvt' now throws the error: ===================================CUT============================== == ======== dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib Referenced from: /opt/local/lib/libXft.2.dylib Reason: Incompatible library version: libXft.2.dylib requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Trace/BPT trap ===================================CUT============================== == ========
No libiconv is active, because of the earlier error, so ports that require libiconv now explode.
trying a
`sudo port deactivate libiconv@1.11_0+darwin_8'
yielded ===================================CUT============================== == ======== Error: port deactivate failed: Registry error: libiconv not registered as installed & active. ===================================CUT============================== == ======== which seems inconsistent with the error message during urxvt install.
Agreed. That seems inconsistent. Not sure how you got into this state.
neither am I. I'm definitely _not_ tinkering with the system. rather I try to upgrade by and then relevant packages and go on with my work.
after a `sudo port activate libiconv@1.12' now everything seems to work,
Great!
but the above messages seems to hint at some grade of corruption of the internal state of port. is this the case? can I sanitize/check it somehow without purging everything?
What does "port installed libiconv" show now?
this:
The following ports are currently installed: libiconv @1.10_1+darwin_8 libiconv @1.11_0+darwin_8 libiconv @1.12_0+darwin_8 (active) libiconv @1.9.2_1
Looks ok to me. You can force-uninstall those older inactive versions if you want since nothing is using them.
I also notice that many packages appear both with `port list active' _and_ `port list inactive'. how can this be?
"port list" does not do what you think it does. "port list" does the following: for each port, display the current version (not the installed version).
You probably would rather use "port installed active" and "port installed inactive".
thanks for this clarification. I read the manpage again: this behaviour is far from obvious from the manpage, since there "installed" and "active" are both listed as pseudo-portnames which should imply that 'port list active' should do what I expected.
No... because "port list" does not do what you expected. Read the description of "port list" in the manpage: list If no argument is given, display a list of the the latest version of all available ports. If portname(s) are given as arguments, display a list of the latest version of each port. (I just noticed "the the" and fixed it in r35030.) So "port list active" lists the latest version of each active port, *not* the installed version of each active port. For example, if you deactivate libiconv @1.12_0+darwin_8 and then activate libiconv @1.11_0+darwin_8, "port list active" (or "port list libiconv") will still show "libiconv @1.12 textproc/ libiconv" because 1.12 is the latest version of that port.
also "port installed" (or "port installed active") works while "port active" does not. should not the manpage be modified to make this point clear?
"installed" is both a command (e.g. "port installed" -- show information about installed ports (by default, show information about all installed ports, but you can specify a subset if you want, e.g. "port installed libiconv")) and a pseudo-portname ("port info -- maintainer installed" -- show the maintainer of each installed port). "active" is only a pseudo-portname. It is not a command. Do you have a specific suggestion about what should be changed? A particular passage that is confusing, or a specific sentence you'd like to have added? Note that I believe the manpages have been rewritten since 1.6.0. That is, they used to be standalone manpages, but with the recent effort to write the web-based MacPorts guide, I believe the manpages have also been rewritten and reformatted in the same docbook style, though at the time MacPorts 1.6.0 was released there were some problems actually generating the manpages from the docbook sources so the old manpages were left in. I'm not sure if that situation has changed since then.
and a last question: the "active" ports are the only one in use
Yes.
or are "inactive" ones (especially libs) secretly used by other ports?
No, inactive ports are not used at all.
I noted that a tentative
`sudo port uninstall libiconv@1.11_0+darwin_8'
showed me lots of ports depending on it which would need prior uninstall.
The message shown by MacPorts is misleading. The message says "Unable to uninstall libiconv 1.11_0+darwin_8, the following ports depend on it" but what the message should say is "Unable to uninstall libiconv, the following ports depend on it" (in other words it should not list the version or variants). Since you already have a newer version of libiconv installed, it's perfectly fine to remove the older version. MacPorts just doesn't know any better. Educate it by using "-f" when uninstalling ports in such situations:
ah. maybe I manage to remember this in the future.
sudo port -f uninstall libiconv@1.11_0+darwin_8
I understand that different versions of libs are needed at the same time
That's not how MacPorts works. Only one version of a library can be used at a time. If multiple versions of a library are needed at the same time, multiple separate ports must be created. See for example apr and apr0, db41 thru db46, and many other examples.
please, could you clarify this a bit? does this not still mean that, e.g. apr requires/installs, say libtmp1.1, and apr0 libtmp1.2 so that both need to be there and are used "at the same time" (meaning when apr or apr0 are started)? whether this is necessitated by two variants of an application (say apr) or by uncorrelated apps seems not to make a difference.
I'll try to clarify, with the APR example. APR is the Apache Portable Runtime, a library used by the Apache web server, Subversion, and other software that wants to run on multiple operating systems without having to write lots of OS-specific code. OS-specific code is encapsulated inside APR. We have two ports for Apache 2: apache2, which installs Apache 2.2.x, and apache20, which installs Apache 2.0.x. Most people will want the latest version and so they will choose apache2. Some people may want to use pre-compiled modules designed for Apache 2.0.x which won't work with Apache 2.2.x, therefore they will choose apache20. Apache 2.2.x requires APR 1.2.x and does not work with earlier versions. Apache 2.0.x requires APR 0.9.x and does not work with later versions. Back in 2005, the apr port installed APR 0.9.x. But then in December 2005, APR 1.2.x was released and the apr port was updated to that version. You cannot ask MacPorts to install an older version of a port. You can only install the current version of a port. Therefore, we need separate ports apr (provides APR 1.2.x) and apr0 (provides APR 0.9.x) so that ports that want the latest version (like apache2) can use apr, and ports that want the older 0.9.x version (like apache20) can use that version. Back to libiconv: there is only one libiconv port, so your only option is to install the latest version of libiconv. If there were a port that required an older version of libiconv in order to run, we would have to make a second libiconv port for that older version of the libiconv software.
so, this is still not clear to me: I would expect that some ports rely on a certain version of a lib, others (e.g. more up-to-date ones) need different versions. surely not all available ports always are in a state that they use the same library versions?
In MacPorts, there is no way to specify that a port depends on a certain version of another port. It is only possible to specify that a port depends on another port.
and even if so, would not otherwise a single upgrade of a single package (inclduing some lib update) lead to necessity of upgrading virtually _everything_ else which needs that library? (i'm not offended if I get the "read the manual" message :-))
For most library updates, the library is a drop-in replacement for the old library. Software that linked with and worked with the old library will continue to work with the new library. But consider gettext, the GNU internationalization library used by many many other ports. When gettext was updated from 0.14.x to 0.15.x, the library changed in a binary-incompatible way so the library version was increased, which caused all other ports to break until they were rebuilt. See the problem hotlist: http://trac.macosforge.org/projects/macports/wiki/ ProblemHotlist#a2.Aportfailedtobuildupgradeorrunwithamessagereferringtol ibintl.3.dylib This may not be super, but it is the state of MacPorts at this time.
but why, then, is one declared "active" the others "inactive"?
When you "sudo port upgrade foo", the old version is deactivated and the new version is activated. If you don't want the old version anymore, you can then uninstall the old version:
sudo port uninstall foo @1.2.3
If you want MacPorts to automatically uninstall the old version during the upgrade, use the "-u" flag:
sudo port -u upgrade foo
This will fail if any port depends on foo. In that case you must also force it. But the force flag also causes MacPorts to rebuild all dependencies, possibly multiple times, which you don't want. So if you want to force an upgrade, you should also always use the nonrecursive flag:
sudo port -nfu upgrade foo
so in short what's the difference between "active" and "inactive", especially for libs?
Inactive ports are not used. They're just there so that you can activate them again, should you choose to do so (after deactivating the version that you currently have active.) If you don't want to reactivate old versions, you can uninstall them to reclaim the disk space.
thanks a lot for getting most of my questions answered.
On Fri, Mar 14, 2008 at 08:53:37PM -0500, Ryan Schmidt wrote:
On Mar 14, 2008, at 07:38, Joerg van den Hoff wrote:
ryan,
thanks a lot for bothering. I really appreciate this.
On Fri, Mar 14, 2008 at 06:39:20AM -0500, Ryan Schmidt wrote:
On Mar 13, 2008, at 06:11, Joerg van den Hoff wrote:
during upgrade from urxvt8.7 to the current version I got the error message
===================================CUT============================== == ======== Portfile changed since last build; discarding previous state. ---> Fetching libiconv ---> Verifying checksum(s) for libiconv ---> Extracting libiconv ---> Applying patches to libiconv ---> Configuring libiconv ---> Building libiconv with target all ---> Staging libiconv into destroot ---> Packaging tgz archive for libiconv 1.12_0+darwin_8 ---> Deactivating libiconv 1.11_0 Error: Deactivating libiconv 1.11_0 failed: Active version of libiconv is not 1.11_0 but 1.11_0+darwin_8. ===================================CUT============================== == ========
Peculiar...
after which install proceded (apparently successful).
I don't know why MacPorts proceeds when it encounters an error activating a port. This only leads to further errors down the road, as you've seen:
deserves this an "official" bug report (I was hoping a bit the ml might suffice)?
All bugs deserve a bug report in our issue tracker. :) I'm just not sure how to report this. I've seen it before, but I forget how it happened to be exactly. And you don't know how it happened to you either. Without a reproduction recipe, it'll be hard to fix. But it should still be filed. I tried to search just now (summary contains "activat", component = base) and didn't find it.
trying to start `urxvt' now throws the error: ===================================CUT============================== == ======== dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib Referenced from: /opt/local/lib/libXft.2.dylib Reason: Incompatible library version: libXft.2.dylib requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Trace/BPT trap ===================================CUT============================== == ========
No libiconv is active, because of the earlier error, so ports that require libiconv now explode.
trying a
`sudo port deactivate libiconv@1.11_0+darwin_8'
yielded ===================================CUT============================== == ======== Error: port deactivate failed: Registry error: libiconv not registered as installed & active. ===================================CUT============================== == ======== which seems inconsistent with the error message during urxvt install.
Agreed. That seems inconsistent. Not sure how you got into this state.
neither am I. I'm definitely _not_ tinkering with the system. rather I try to upgrade by and then relevant packages and go on with my work.
after a `sudo port activate libiconv@1.12' now everything seems to work,
Great!
but the above messages seems to hint at some grade of corruption of the internal state of port. is this the case? can I sanitize/check it somehow without purging everything?
What does "port installed libiconv" show now?
this:
The following ports are currently installed: libiconv @1.10_1+darwin_8 libiconv @1.11_0+darwin_8 libiconv @1.12_0+darwin_8 (active) libiconv @1.9.2_1
Looks ok to me. You can force-uninstall those older inactive versions if you want since nothing is using them.
I also notice that many packages appear both with `port list active' _and_ `port list inactive'. how can this be?
"port list" does not do what you think it does. "port list" does the following: for each port, display the current version (not the installed version).
You probably would rather use "port installed active" and "port installed inactive".
thanks for this clarification. I read the manpage again: this behaviour is far from obvious from the manpage, since there "installed" and "active" are both listed as pseudo-portnames which should imply that 'port list active' should do what I expected.
No... because "port list" does not do what you expected. Read the description of "port list" in the manpage:
list If no argument is given, display a list of the the latest version of all available ports. If portname(s) are given as arguments, display a list of the latest version of each port.
(I just noticed "the the" and fixed it in r35030.)
So "port list active" lists the latest version of each active port, *not* the installed version of each active port. For example, if you deactivate libiconv @1.12_0+darwin_8 and then activate libiconv @1.11_0+darwin_8, "port list active" (or "port list libiconv") will still show "libiconv @1.12 textproc/ libiconv" because 1.12 is the latest version of that port.
also "port installed" (or "port installed active") works while "port active" does not. should not the manpage be modified to make this point clear?
maybe a hint concerning the 'double nature' of `installed' (command _and_ pseudo-portname) at both places where `installed' is defined in the manpage would help. a few examples like yours (port list active vs. port installed active, e.g.) might be good, too. but of course you are right. it _is_ described correctly in the manpage, one only has to read it completetly...
"installed" is both a command (e.g. "port installed" -- show information about installed ports (by default, show information about all installed ports, but you can specify a subset if you want, e.g. "port installed libiconv")) and a pseudo-portname ("port info -- maintainer installed" -- show the maintainer of each installed port).
"active" is only a pseudo-portname. It is not a command.
Do you have a specific suggestion about what should be changed? A particular passage that is confusing, or a specific sentence you'd like to have added?
Note that I believe the manpages have been rewritten since 1.6.0. That is, they used to be standalone manpages, but with the recent effort to write the web-based MacPorts guide, I believe the manpages have also been rewritten and reformatted in the same docbook style, though at the time MacPorts 1.6.0 was released there were some problems actually generating the manpages from the docbook sources so the old manpages were left in. I'm not sure if that situation has changed since then.
and a last question: the "active" ports are the only one in use
Yes.
or are "inactive" ones (especially libs) secretly used by other ports?
No, inactive ports are not used at all.
I noted that a tentative
`sudo port uninstall libiconv@1.11_0+darwin_8'
showed me lots of ports depending on it which would need prior uninstall.
The message shown by MacPorts is misleading. The message says "Unable to uninstall libiconv 1.11_0+darwin_8, the following ports depend on it" but what the message should say is "Unable to uninstall libiconv, the following ports depend on it" (in other words it should not list the version or variants). Since you already have a newer version of
and could _this_ not be done in future releases?
libiconv installed, it's perfectly fine to remove the older version. MacPorts just doesn't know any better. Educate it by using "-f" when uninstalling ports in such situations:
ah. maybe I manage to remember this in the future.
sudo port -f uninstall libiconv@1.11_0+darwin_8
I understand that different versions of libs are needed at the same time
That's not how MacPorts works. Only one version of a library can be used at a time. If multiple versions of a library are needed at the same time, multiple separate ports must be created. See for example apr and apr0, db41 thru db46, and many other examples.
please, could you clarify this a bit? does this not still mean that, e.g. apr requires/installs, say libtmp1.1, and apr0 libtmp1.2 so that both need to be there and are used "at the same time" (meaning when apr or apr0 are started)? whether this is necessitated by two variants of an application (say apr) or by uncorrelated apps seems not to make a difference.
I'll try to clarify, with the APR example. APR is the Apache Portable Runtime, a library used by the Apache web server, Subversion, and other software that wants to run on multiple operating systems without having to write lots of OS-specific code. OS-specific code is encapsulated inside APR.
We have two ports for Apache 2: apache2, which installs Apache 2.2.x, and apache20, which installs Apache 2.0.x. Most people will want the latest version and so they will choose apache2. Some people may want to use pre-compiled modules designed for Apache 2.0.x which won't work with Apache 2.2.x, therefore they will choose apache20.
Apache 2.2.x requires APR 1.2.x and does not work with earlier versions. Apache 2.0.x requires APR 0.9.x and does not work with later versions.
Back in 2005, the apr port installed APR 0.9.x. But then in December 2005, APR 1.2.x was released and the apr port was updated to that version.
You cannot ask MacPorts to install an older version of a port. You can only install the current version of a port.
Therefore, we need separate ports apr (provides APR 1.2.x) and apr0 (provides APR 0.9.x) so that ports that want the latest version (like apache2) can use apr, and ports that want the older 0.9.x version (like apache20) can use that version.
Back to libiconv: there is only one libiconv port, so your only option is to install the latest version of libiconv. If there were a port that required an older version of libiconv in order to run, we would have to make a second libiconv port for that older version of the libiconv software.
so, this is still not clear to me: I would expect that some ports rely on a certain version of a lib, others (e.g. more up-to-date ones) need different versions. surely not all available ports always are in a state that they use the same library versions?
In MacPorts, there is no way to specify that a port depends on a certain version of another port. It is only possible to specify that a port depends on another port.
and even if so, would not otherwise a single upgrade of a single package (inclduing some lib update) lead to necessity of upgrading virtually _everything_ else which needs that library? (i'm not offended if I get the "read the manual" message :-))
For most library updates, the library is a drop-in replacement for the old library. Software that linked with and worked with the old library will continue to work with the new library. But consider gettext, the GNU internationalization library used by many many other ports. When gettext was updated from 0.14.x to 0.15.x, the library changed in a binary-incompatible way so the library version was increased, which caused all other ports to break until they were rebuilt. See the problem hotlist:
http://trac.macosforge.org/projects/macports/wiki/ ProblemHotlist#a2.Aportfailedtobuildupgradeorrunwithamessagereferringtol ibintl.3.dylib
This may not be super, but it is the state of MacPorts at this time.
ryan, thanks a lot for taking (again) the time to explain this so thoroughly. it really helped clarifying things up quite a bit for me. joerg
but why, then, is one declared "active" the others "inactive"?
When you "sudo port upgrade foo", the old version is deactivated and the new version is activated. If you don't want the old version anymore, you can then uninstall the old version:
sudo port uninstall foo @1.2.3
If you want MacPorts to automatically uninstall the old version during the upgrade, use the "-u" flag:
sudo port -u upgrade foo
This will fail if any port depends on foo. In that case you must also force it. But the force flag also causes MacPorts to rebuild all dependencies, possibly multiple times, which you don't want. So if you want to force an upgrade, you should also always use the nonrecursive flag:
sudo port -nfu upgrade foo
so in short what's the difference between "active" and "inactive", especially for libs?
Inactive ports are not used. They're just there so that you can activate them again, should you choose to do so (after deactivating the version that you currently have active.) If you don't want to reactivate old versions, you can uninstall them to reclaim the disk space.
thanks a lot for getting most of my questions answered.
participants (2)
-
Joerg van den Hoff
-
Ryan Schmidt