Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#22493 closed defect (invalid)

Incompatible library version

Reported by: vash_the__typhoon@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc:
Port: libiconv

Description

I tried to upgrade my ports today only to have Macports fail and cause problems to my system.
I've searched the net and tickets for this, and although there are many tickets with a similar problem of incompatible library version, none that I found have a solution.

Here are the commands I ran:

sudo port selfupdate


which claimed that it updated to version 1.8.1 and I should upgrade the installed ports, so I run

sudo port upgrade installed
--->  Computing dependencies for gperf
--->  Fetching gperf
--->  Attempting to fetch gperf-3.0.4.tar.gz from http://mirror.internode.on.net/pub/gnu/gperf
--->  Attempting to fetch gperf-3.0.4.tar.gz from http://mirror.aarnet.edu.au/pub/GNU/gperf
--->  Attempting to fetch gperf-3.0.4.tar.gz from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/gperf
--->  Attempting to fetch gperf-3.0.4.tar.gz from http://distfiles.macports.org/gperf
--->  Attempting to fetch gperf-3.0.4.tar.gz from http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gperf
--->  Attempting to fetch gperf-3.0.4.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/gperf
--->  Verifying checksum(s) for gperf
--->  Extracting gperf
--->  Configuring gperf
--->  Building gperf
--->  Staging gperf into destroot
--->  Installing gperf @3.0.4_0
--->  Activating gperf @3.0.4_0
--->  Cleaning gperf
--->  Computing dependencies for libiconv
--->  Fetching libiconv
--->  Attempting to fetch libiconv-1.13.tar.gz from http://mirror.internode.on.net/pub/gnu/libiconv
--->  Attempting to fetch libiconv-1.13.tar.gz from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/libiconv
--->  Attempting to fetch libiconv-1.13.tar.gz from http://mirror.aarnet.edu.au/pub/GNU/libiconv
--->  Attempting to fetch libiconv-1.13.tar.gz from http://distfiles.macports.org/libiconv
--->  Attempting to fetch libiconv-1.13.tar.gz from http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/libiconv
--->  Attempting to fetch libiconv-1.13.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/libiconv
--->  Verifying checksum(s) for libiconv
--->  Extracting libiconv
--->  Applying patches to libiconv
--->  Configuring libiconv
--->  Building libiconv
--->  Staging libiconv into destroot
--->  Deactivating libiconv @1.12_0
--->  Computing dependencies for libiconv
--->  Installing libiconv @1.13_0
--->  Activating libiconv @1.13_0
--->  Cleaning libiconv
--->  Computing dependencies for ncursesw
--->  Fetching ncursesw
--->  Attempting to fetch ncurses-5.7.tar.gz from http://mirror.internode.on.net/pub/gnu/ncurses
--->  Attempting to fetch ncurses-5.7.tar.gz from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/ncurses
--->  Attempting to fetch ncurses-5.7.tar.gz from http://mirror.aarnet.edu.au/pub/GNU/ncurses
--->  Attempting to fetch ncurses-5.7.tar.gz from http://distfiles.macports.org/ncurses
--->  Attempting to fetch ncurses-5.7.tar.gz from http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/ncurses
--->  Attempting to fetch ncurses-5.7.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/ncurses
--->  Verifying checksum(s) for ncursesw
--->  Extracting ncursesw
--->  Configuring ncursesw
--->  Building ncursesw
--->  Staging ncursesw into destroot
--->  Deactivating ncursesw @5.6_1
--->  Computing dependencies for ncursesw
--->  Installing ncursesw @5.7_0
--->  Activating ncursesw @5.7_0
--->  Cleaning ncursesw
--->  Computing dependencies for ncurses
--->  Fetching ncurses
--->  Verifying checksum(s) for ncurses
--->  Extracting ncurses
--->  Configuring ncurses
--->  Building ncurses
--->  Staging ncurses into destroot
--->  Deactivating ncurses @5.6_0
--->  Computing dependencies for ncurses
--->  Installing ncurses @5.7_0
--->  Activating ncurses @5.7_0
--->  Cleaning ncurses
--->  Computing dependencies for gettext
--->  Fetching gettext
--->  Verifying checksum(s) for gettext
--->  Extracting gettext
--->  Applying patches to gettext
--->  Configuring gettext
--->  Building gettext
--->  Staging gettext into destroot
--->  Deactivating gettext @0.17_3
--->  Computing dependencies for gettext
--->  Installing gettext @0.17_4
--->  Activating gettext @0.17_4
--->  Cleaning gettext
--->  Computing dependencies for gmp
--->  Fetching gmp
--->  Attempting to fetch gmp-4.3.1.tar.bz2 from http://mirror.internode.on.net/pub/gnu/gmp
--->  Attempting to fetch gmp-4.3.1.tar.bz2 from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/gmp
--->  Attempting to fetch gmp-4.3.1.tar.bz2 from http://mirror.aarnet.edu.au/pub/GNU/gmp
--->  Attempting to fetch gmp-4.3.1.tar.bz2 from http://distfiles.macports.org/gmp
--->  Attempting to fetch gmp-4.3.1.tar.bz2 from http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gmp
--->  Attempting to fetch gmp-4.3.1.tar.bz2 from ftp://ftp.dti.ad.jp/pub/GNU/gmp
--->  Verifying checksum(s) for gmp
--->  Extracting gmp
--->  Applying patches to gmp
--->  Configuring gmp
--->  Building gmp
--->  Staging gmp into destroot
--->  Deactivating gmp @4.2.2_1
--->  Computing dependencies for gmp
--->  Installing gmp @4.3.1_1
--->  Activating gmp @4.3.1_1
--->  Cleaning gmp
--->  Computing dependencies for coreutils
--->  Fetching coreutils
--->  Attempting to fetch coreutils-7.6.tar.gz from http://mirror.internode.on.net/pub/gnu/coreutils
--->  Attempting to fetch coreutils-7.6.tar.gz from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/coreutils
--->  Attempting to fetch coreutils-7.6.tar.gz from http://mirror.aarnet.edu.au/pub/GNU/coreutils
--->  Attempting to fetch coreutils-7.6.tar.gz from http://distfiles.macports.org/coreutils
--->  Attempting to fetch coreutils-7.6.tar.gz from http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/coreutils
--->  Attempting to fetch coreutils-7.6.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/coreutils
--->  Verifying checksum(s) for coreutils
--->  Extracting coreutils
--->  Configuring coreutils
--->  Building coreutils
--->  Staging coreutils into destroot
--->  Deactivating coreutils @6.10_0+darwin_9+with_default_names
--->  Computing dependencies for coreutils
--->  Installing coreutils @7.6_0+with_default_names
--->  Activating coreutils @7.6_0+with_default_names
--->  Cleaning coreutils
--->  Computing dependencies for zlib
--->  Fetching zlib
--->  Verifying checksum(s) for zlib
--->  Extracting zlib
--->  Applying patches to zlib
--->  Configuring zlib
--->  Building zlib
--->  Staging zlib into destroot
--->  Deactivating zlib @1.2.3_1
--->  Computing dependencies for zlib
--->  Installing zlib @1.2.3_3
--->  Activating zlib @1.2.3_3
--->  Cleaning zlib
--->  Computing dependencies for freetype
--->  Fetching freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://internode.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://optusnet.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://transact.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://internap.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://distfiles.macports.org/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://easynews.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://voxel.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://superb-west.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://downloads.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://superb-east.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://download.savannah.gnu.org/releases/freetype/
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://kent.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://heanet.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://arn.se.distfiles.macports.org/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://mesh.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://surfnet.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://switch.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://garr.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://dfn.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://nchc.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://ufpr.dl.sourceforge.net/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://svn.macports.org/repository/macports/distfiles/freetype
--->  Attempting to fetch freetype-2.3.9.tar.bz2 from http://svn.macports.org/repository/macports/distfiles/general/
Error: Target org.macports.fetch returned: fetch failed
Error: Unable to upgrade port: 1

Everything seemed to be going OK until it gets to freetype.
Because I was doing this behind a proxy/firewall I thought it just timed out, but when I tried again at a non-firewalled / no proxy internet connection I get

sudo port -R upgrade installed
--->  Computing dependencies for freetype
--->  Configuring freetype
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_print_freetype/work/freetype-2.3.9" && ./configure --prefix=/opt/local " returned error 2
Command output: dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/rm
  Reason: Incompatible library version: rm requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
./configure: line 16: 15214 Trace/BPT trap          rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk
./configure: line 40: 15219 Trace/BPT trap          expr a : '\(a\)' > /dev/null 2>&1

FreeType build system -- automatic system detection

The following settings are used:

  platform                    unix
  compiler                    /usr/bin/gcc-4.0
  configuration directory     ./builds/unix
  configuration rules         ./builds/unix/unix.mk

If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.

Otherwise, simply type `make' again to build the library,
or `make refdoc' to build the API reference (the latter needs python).

dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/cp
  Reason: Incompatible library version: cp requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
make: *** [std_setup] Trace/BPT trap

Error: Unable to upgrade port: 1


I can't fix it, I've done

locate libiconf.2.dylib


and ran an otool -L on every occurrence of libiconf.2.dylb and they all say

compatibility version 7.0.0, current version 7.0.0


Where can I get the compatibility version 8.0.0 one from?

This has affected more than just my Macports install, I can also no longer use other programs which are not Macports related
so this is huge problem for me. Now every time I launch a terminal or re-source my ~/.profile I am faced with

running .profile ...
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/tr
  Reason: Incompatible library version: tr requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
WARNING: KARMA_VERSION environment variable could not be computed.
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/uname
  Reason: Incompatible library version: uname requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
### Unknown host architecture -- no Miriad executables.
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/dircolors
  Reason: Incompatible library version: dircolors requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/uname
  Reason: Incompatible library version: uname requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/uname
  Reason: Incompatible library version: uname requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0

Please help!

Change History (18)

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

Component: baseports
Keywords: Incompatible library version libiconv.2.dylib removed
Owner: changed from macports-tickets@… to ryandesign@…
Port: freetype removed
Priority: HighNormal

You'll notice that all your HTTP downloads are failing, so only ports that have at least one FTP mirror listed can be fetched. Check your proxy settings.

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Port: libiconv added

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

Also, you have the coreutils port installed with the +with_default_names variant. This port provides the utilities tr, uname, dircolors and others, which are now failing. The reason they are failing is that they can't find a compatible iconv library. (It can't find the version 8 library provided by MacPorts, and is only finding the version 7 library provided by Mac OS X.) You just upgraded libiconv, so one explanation is that your coreutils and libiconv are built for different architectures. This might happen if you had ports installed on Leopard (which builds for the architecture i386), upgraded to Snow Leopard (which builds for the architecture x86_64), and then tried to continue using your ports. What version of Mac OS X are you using, and did you recently upgrade? Or did you recently migrate your data (including your MacPorts install) from a different computer to this one? In either case, check the Migration page for the steps you need to take to uninstall and reinstall all ports.

Installing coreutils (or any of the ports that offer it) with the +with_default_names variant can cause problems which is why we plan to remove that variant from all ports. See #20748. So you may want to install coreutils without that variant -- if indeed you need to install that port at all.

One simple step you can take right now to get at least your ~/.profile working again is to simply uninstall (or deactivate) the coreutils port. This will remove the currently-broken tr, uname, dircolors, etc. scripts from your PATH so that Mac OS X's functional ones are used instead.

comment:4 in reply to:  3 ; Changed 14 years ago by vash_the__typhoon@…

First Thanks for the replies...

Replying to jmr@…:

You'll notice that all your HTTP downloads are failing, so only ports that have at least one FTP mirror listed can be fetched. Check your proxy settings.


Yeah I know these aren't working, but I don't know how to add an exception for Macports to get out.
From what I read it uses libcurl to 'fetch' these packages but I can't make it use a proxy with a username and password.
I've tried adding

http_proxy="http://<user>:<pass>@<my-proxy>:<proxy-port>/"
export http_proxy
HTTP_PROXY="http://<user>:<pass>@<my-proxy>:<proxy-port>/"
export HTTP_PROXY

to my ~/.profile but it still didn't work ... So I don't know what else to do ?

Replying to jmr@…:

port set to libiconv


Sorry I don't know what you mean by this?

Replying to ryandesign@…:

Also, you have the coreutils port installed with the +with_default_names variant. This port provides the utilities tr, uname, dircolors and others, which are now failing. The reason they are failing is that they can't find a compatible iconv library. (It can't find the version 8 library provided by MacPorts, and is only finding the version 7 library provided by Mac OS X.) You just upgraded libiconv, so one explanation is that your coreutils and libiconv are built for different architectures. This might happen if you had ports installed on Leopard (which builds for the architecture i386), upgraded to Snow Leopard (which builds for the architecture x86_64), and then tried to continue using your ports. What version of Mac OS X are you using, and did you recently upgrade? Or did you recently migrate your data (including your MacPorts install) from a different computer to this one? In either case, check the Migration page for the steps you need to take to uninstall and reinstall all ports.

Installing coreutils (or any of the ports that offer it) with the +with_default_names variant can cause problems which is why we plan to remove that variant from all ports. See #20748. So you may want to install coreutils without that variant -- if indeed you need to install that port at all.

One simple step you can take right now to get at least your ~/.profile working again is to simply uninstall (or deactivate) the coreutils port. This will remove the currently-broken tr, uname, dircolors, etc. scripts from your PATH so that Mac OS X's functional ones are used instead.


OK, I haven't upgraded or migrated my system, still running Leopard: 10.5.8.

I really don't know why I have (or need) half of the ports that I have installed, I think most of them came down as dependencies on the ones I actually wanted so I guess I need them???
The reason I installed coreutils was so I could get the GNU ls rather than the OSX ls so I can colour code the terminal. Deactivating coreutils did fix all the other programs so thank-you
...but I don't have my gls anymore .. which I would really like back. I tried to install the coreutils without the +with_default_names but it fails to install as

-->  Computing dependencies for coreutils
--->  Fetching coreutils
--->  Verifying checksum(s) for coreutils
--->  Extracting coreutils
--->  Configuring coreutils
--->  Building coreutils
--->  Staging coreutils into destroot
Error: Target org.macports.destroot returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/coreutils-7.6" && /usr/bin/make install DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot " returned error 2
Command output: 	  need_charset_alias=false ; \
	fi ; \
	if $need_charset_alias; then \
	  /bin/sh /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/coreutils-7.6/build-aux/install-sh -d /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib ; \
	fi ; \
	if test -f /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.alias; then \
	  sed -f ref-add.sed /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.alias > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.tmp ; \
	  /usr/bin/install -c -m 644 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.tmp /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.alias ; \
	  rm -f /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.tmp ; \
	else \
	  if $need_charset_alias; then \
	    sed -f ref-add.sed charset.alias > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.tmp ; \
	    /usr/bin/install -c -m 644 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.tmp /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.alias ; \
	    rm -f /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/lib/charset.tmp ; \
	  fi ; \
	fi
make[5]: Nothing to be done for `install-data-am'.
Making install in src
/usr/bin/make  install-am
test -z "/opt/local/bin" || ../build-aux/install-sh -c -d "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/bin"
  ./ginstall uname '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/bin/./guname'
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/lib/libintl.8.dylib
  Reason: Incompatible library version: libintl.8.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
/bin/sh: line 1: 36118 Trace/BPT trap          ./ginstall $files "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_coreutils/work/destroot/opt/local/bin$dir"
make[4]: *** [install-binPROGRAMS] Error 133
make[3]: *** [install-am] Error 2
make[2]: *** [install] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

Error: Status 1 encountered during processing.

It still can't find a proper version of libiconv.2.dylib

Is there some way I can force Macports to install the correct version of libiconv.2.dylb ?

B

comment:5 in reply to:  4 ; Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to vash_the__typhoon@…:

I've tried adding

http_proxy="http://<user>:<pass>@<my-proxy>:<proxy-port>/"
export http_proxy
HTTP_PROXY="http://<user>:<pass>@<my-proxy>:<proxy-port>/"
export HTTP_PROXY

to my ~/.profile but it still didn't work ... So I don't know what else to do ?

Hmm, looks like our how-to entry on this topic? hasn't been written yet. You should set the proxy options in /opt/local/etc/macports/macports.conf. MacPorts clears environment variables before running, so anything you set in ~/.profile will have no effect, by design.

port set to libiconv


Sorry I don't know what you mean by this?

Joshua was setting the "port" field in this ticket to the value "libiconv". However, it sounds to me like there may be something more general amiss in your MacPorts install. Hopefully we'll soon be able to identify what.

I really don't know why I have (or need) half of the ports that I have installed, I think most of them came down as dependencies on the ones I actually wanted so I guess I need them???

You can try to "sudo port uninstall" ports you don't think you need; if you need them, MacPorts will tell you and prevent the uninstall. You can also install and use the port-cutleaves port; port-cutleaves is an interactive program that helps you identify and uninstall ports that have no dependencies. If a port it lists is one you don't directly need, you can let it be uninstalled.

The reason I installed coreutils was so I could get the GNU ls rather than the OSX ls so I can colour code the terminal. Deactivating coreutils did fix all the other programs so thank-you
...but I don't have my gls anymore .. which I would really like back. I tried to install the coreutils without the +with_default_names

That would be the solution...

but it fails to install as
[snip]
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib

Referenced from: /opt/local/lib/libintl.8.dylib
Reason: Incompatible library version: libintl.8.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0

[snip]
It still can't find a proper version of libiconv.2.dylib

So here, it's not the parts of coreutils, but the internationalization library libintl (which is part of gettext) which can't find the libiconv it wants.

Is there some way I can force Macports to install the correct version of libiconv.2.dylb ?

Let's first try to find out whether it's libiconv that's installed incorrectly, or everything that's trying to use it. What is the architecture of libiconv.dylib and libintl.dylib? To find out:

lipo -info /opt/local/lib/{libiconv,libintl}.dylib

With what variants are the gettext and libiconv ports now installed? To find out:

port installed gettext libiconv

What computer is this? What are the values of build_arch and universal_archs in /opt/local/etc/macports/macports.conf? What's in /opt/local/etc/macports/variants.conf?

comment:6 in reply to:  5 Changed 14 years ago by blb@…

Replying to ryandesign@…:

You should set the proxy options in /opt/local/etc/macports/macports.conf. MacPorts clears environment variables before running, so anything you set in ~/.profile will have no effect, by design.

Note that the proxy env vars were one of the exceptions to what was cleared from the environment; however, that changed with 10.5's sudo (see ticket #13158) hence the new proxy stuff. The comments in macports.conf should cover most situations.

comment:7 Changed 14 years ago by vash_the__typhoon@…

OK, I've had a look at the lipo command:

lipo -info /opt/local/lib/{libiconv,libintl}.dylib
Non-fat file: /opt/local/lib/libiconv.dylib is architecture: i386
Non-fat file: /opt/local/lib/libintl.dylib is architecture: i386

and here is the port installed gettext libiconf:

port installed gettext libiconv
The following ports are currently installed:
  gettext @0.17_3
  gettext @0.17_4 (active)
  libiconv @1.12_0 (active)
  libiconv @1.13_0

Also, sorry I still don't get what to do with proxy in /opt/local/etc/macports/macports.conf ... I had a look and couldn't see anything about proxy in there.

Cheers,
B

comment:8 Changed 14 years ago by vash_the__typhoon@…

Oops, Sorry for got about the last little bit..

What computer is this?

Its a 13" 2.4GHz White Macbook

What are the values of build_arch and universal_archs in /opt/local/etc/macports/macports.conf?

I don't have either of these values in that file?

# MacPorts system wide configuration file
# $Id: macports.conf.in 31197 2007-11-18 06:06:14Z jmpp@macports.org $

# Set the directory in which to install ports
prefix			/opt/local

# Where to store MacPorts working data
portdbpath		/opt/local/var/macports

# Type of storage to use for the port registry information, "flat" or "sqlite"
# NOTE: sqlite not yet supported.
portdbformat		flat

# Type of installation to do for ports, "direct" or "image".  See macports.conf(5) and online documentation.
portinstalltype		image

# Directory containing the X11 installation.
x11prefix		/usr/X11R6

# Where to find the sources list.
sources_conf		/opt/local/etc/macports/sources.conf

# Where to find global variants definition file (optional)
variants_conf		/opt/local/etc/macports/variants.conf

# Create and use binary archive packages for installation/reinstallation ease
portarchivemode		no

# Where to store/retrieve ports binary archive files
portarchivepath		/opt/local/var/macports/packages

# Type of binary archive packages to create when using archive mode
#
# Note: Multiple types ARE allowed and must be a colon or comma
# separated list of choices (NO spaces). Use of multiple types will
# cause archive creation to build all the specified types in one step.
# Unarchive uses multiple types as a search list to locate the archive,
# first archive to match one of the specified types in order is used.
#
# Supported types: tgz (default), tar, tbz, tbz2, tlz, xar, zip, cpgz, cpio
portarchivetype		tgz

# Use ccache (C/C++ compiler cache) - see http://ccache.samba.org/
configureccache		no

# Use distcc (distributed compiler) - see http://distcc.samba.org/
configuredistcc		no

# Use pipes rather than intermediate files when compiling C/C++/etc
configurepipe		no

# Lowered scheduling priority (0-20) to use for make when building ports
buildnicevalue		0

# Number of simultaneous make jobs (commands) to use when building ports
buildmakejobs		1

# Set whether to automatically execute "clean" after "install" of ports
portautoclean		yes

# Rsync server to fetch MacPorts sources from
rsync_server		rsync.macports.org

# Rsync directory from which to pull the base/ component (infrastructure) of MacPorts
rsync_dir			release/base/

# Rsync options
rsync_options		-rtzv --delete-after

# Options for generated startup items
# startupitem_type may be "default", "systemstarter", "launchd", or "none";
# if the option is empty or "default" then a startupitem type appropriate
# to the platform will be chosen. Tiger will default to launchd, while
# older Mac OS X systems will default to systemstarter. If option "none"
# is chosen, port startupitems are ignored and no startupitems are installed.
startupitem_type	default

# Extra environment variables to keep. Any variables listed here are added
# to the list of variables that are not removed from the environment used
# while processing ports
# extra_env		KEEP_THIS THIS_TOO

What's in /opt/local/etc/macports/variants.conf?

Nothing, just the bolck header comments

# To specify global variants to use for all port builds,
# customize this file to list variant settings you want.
#
# Be sure to uncomment/define the variants_conf setting
# in the system wide ${prefix}/etc/macports/macports.conf
# file or in your personal ~/.macports/macports.conf to
# point to this file to enable this feature.
#
# Any variants specified here that are not supported by
# a port will just be ignored. Multiple variants can be
# specified per line, or one per line is also allowed.
#
# Example:
# +ipv6 +no_x11

Cheers,
B

comment:9 Changed 14 years ago by nerdling (Jeremy Lavergne)

Check out the macports.conf.default file sitting right next to those. It should have the present default values and the missing information about proxies.

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

Exactly. You must've originally installed MacPorts before those settings were available. MacPorts does not update your conf files for you.

Have you tried deactivating libiconv @1.12_0 and activating libiconv @1.13_0?

sudo port deactivate libiconv @1.12_0
sudo port activate libiconv @1.13_0

I'm not sure why 1.12 was active for you, when your initial output in the ticket description shows 1.12 being deactivated and 1.13 being activated.

From your initial report, I also see you were using "sudo port upgrade installed"; for future reference, you probably want "sudo port upgrade outdated" instead.

comment:11 in reply to:  10 ; Changed 14 years ago by vash_the__typhoon@…

Replying to ryandesign@…:

Exactly. You must've originally installed MacPorts before those settings were available. MacPorts does not update your conf files for you.

Have you tried deactivating libiconv @1.12_0 and activating libiconv @1.13_0?

sudo port deactivate libiconv @1.12_0
sudo port activate libiconv @1.13_0

Yeah I've tried that, still gives me the libiconv.2.dlyib doesn't supply the 8.0.0 version when I activate the coreutils again.

I'm not sure why 1.12 was active for you, when your initial output in the ticket description shows 1.12 being deactivated and 1.13 being activated.

Yeah this is probably because when I initially upgraded the ports and things failed I tried rolling back all upgrades to the previous working system, but I was still always getting the libiconv.2.dlyib doesn't supply the 8.0.0 version. Since then I've been playing around and trying different combinations of active ports to try and make things work again ... I wonder if the actual upgrade of the macports base is what failed? Ever since then I've been getting the libiconv.2.dlyib doesn't supply the 8.0.0 version problems

From your initial report, I also see you were using "sudo port upgrade installed"; for future reference, you probably want "sudo port upgrade outdated" instead.

OK, I'll remember that for next time ... once this libiconv.2.dlyib doesn't supply the 8.0.0 version problem gets fixed and I can actually update things again :)

Is there any other way to proceed in getting the correct libiconv.2.dlyib without having to wipe all traces of macports and trying it again?

Cheers,
B

comment:12 in reply to:  11 ; Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to vash_the__typhoon@…:

Is there any other way to proceed in getting the correct libiconv.2.dlyib without having to wipe all traces of macports and trying it again?

I'm afraid I'm no closer to understanding why you are experiencing this issue, therefore I still cannot suggest how to resolve it, short of reinstalling MacPorts and all ports, which is what I now recommend since that should definitely work. I suggest you follow the instructions on the Migration page.

comment:13 in reply to:  12 Changed 14 years ago by greenblat@…

Here what worked for me to fix libiconv.2.dyld 7.0.0 to 8.0.0 problem:

in /usr/lib/ there is already apple provided libiconv.2.dyld file. it is 7.0.0 so dyld loader takes it before /opt/local/lib version (even though it complains about /opt/local/lib)

to see where dyld takes libraries from, do "setenv DYLD_PRINT_LIBRARIES yes" in terminal before running any program.

i just replaced the one in /usr/lib with /usr/local/opt library and it seems to work. Cheers, Ilia

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

I cannot recommend replacing Apple software in /usr/lib with MacPorts software; that's usually a bad idea.

dyld does not arbitrarily decide to take libraries from /usr/lib instead of from /opt/local/lib, unless perhaps you've told it to do so by setting the LD_LIBRARY_PATH or DYLD_LIBRARY_PATH environment variables? If you have, that could certainly account for the behavior you see.

comment:15 in reply to:  14 ; Changed 14 years ago by vash_the__typhoon@…

Replying to ryandesign@…:

I cannot recommend replacing Apple software in /usr/lib with MacPorts software; that's usually a bad idea.

dyld does not arbitrarily decide to take libraries from /usr/lib instead of from /opt/local/lib, unless perhaps you've told it to do so by setting the LD_LIBRARY_PATH or DYLD_LIBRARY_PATH environment variables? If you have, that could certainly account for the behavior you see.

Hi, glad that people are still reading/thinking about this problem!

Yes, I do set the LD and DYLD Library paths in my .profile, I've needed to do so in the past for other programs etc..

In my .profile, I have the following lines (in this order)

#For Macports
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH
...
export LD_LIBRARY_PATH=./:/usr/lib:${HESSROOT}/lib:/usr/local/lib:${ROOTSYS}/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./:/usr/lib:${HESSROOT}/lib:/usr/local/lib:${ROOTSYS}/lib

If need be, I can try and re-order some of these and see if anything works. Could you give some suggestions?

Cheers,
B

comment:16 in reply to:  15 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

Replying to vash_the__typhoon@…:

export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH

Delete this line.

export LD_LIBRARY_PATH=./:/usr/lib:${HESSROOT}/lib:/usr/local/lib:${ROOTSYS}/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./:/usr/lib:${HESSROOT}/lib:/usr/local/lib:${ROOTSYS}/lib

Delete these lines, and delete files in /usr/local.

If you have found ports in MacPorts or software installed outside of MacPorts that fails when LD_LIBRARY_PATH or DYLD_LIBRARY_PATH is not set, that is a bug to be reported to the developers of that software.

comment:17 Changed 14 years ago by vash_the__typhoon@…

Ok
Just wanted to double check this (before I actually do it), removing those lines about the LD and DYLD library paths from my .profile will allow me to perform the command sudo port -d selfupdate which should complete with no errors now?

From there I should be able to do sudo port -R upgrade installed (without errors)
then sudo port activate coreutils @XXX+with_default_names (without errors)

Ultimately I'm trying to get my coreutils @XXX+with_default_names (where XXX is the current version) so I can get back my GNU terminal commands for example gls

Is that about correct?
Cheers
B

comment:18 in reply to:  17 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to vash_the__typhoon@…:

Just wanted to double check this (before I actually do it), removing those lines about the LD and DYLD library paths from my .profile will allow me to perform the command sudo port -d selfupdate which should complete with no errors now?

Unless there are other problems.

From there I should be able to do sudo port -R upgrade installed (without errors)

I can't guarantee there won't be other errors.

then sudo port activate coreutils @XXX+with_default_names (without errors)

Please consider not using the +with_default_names variant of any port. It is a bad option and we plan to remove it because it causes problems. Please see #20748.

Ultimately I'm trying to get my coreutils @XXX+with_default_names (where XXX is the current version) so I can get back my GNU terminal commands for example gls

Just install coreutils without the with_default_names variant and you'll get GNU ls as "gls". If you want it available as "ls", you could make shell aliases; I don't think that will cause the same problems that the +with_default_names variant currently causes.

Note: See TracTickets for help on using tickets.