Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Homebrew Libiconv error #29278

Closed
akkravikumar opened this issue May 15, 2014 · 15 comments
Closed

Homebrew Libiconv error #29278

akkravikumar opened this issue May 15, 2014 · 15 comments

Comments

@akkravikumar
Copy link

i ran this following code

$ brew doctor
Warning: /usr/local/include isn't writable.
This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a brew tries to write a file to this directory, the
install will fail during the link step.

You should probably chown /usr/local/include

Warning: /usr/local/lib/pkgconfig isn't writable.
This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a brew tries to write a file to this directory, the
install will fail during the link step.

You should probably chown /usr/local/lib/pkgconfig

Warning: Some directories in /usr/local/share/locale aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably chown them:

/usr/local/share/locale
/usr/local/share/locale/af
/usr/local/share/locale/af/LC_MESSAGES
/usr/local/share/locale/be
/usr/local/share/locale/be/LC_MESSAGES
/usr/local/share/locale/bg
/usr/local/share/locale/bg/LC_MESSAGES
/usr/local/share/locale/ca
/usr/local/share/locale/ca/LC_MESSAGES
/usr/local/share/locale/cs
/usr/local/share/locale/cs/LC_MESSAGES
/usr/local/share/locale/da
/usr/local/share/locale/da/LC_MESSAGES
/usr/local/share/locale/de
/usr/local/share/locale/de/LC_MESSAGES
/usr/local/share/locale/el
/usr/local/share/locale/el/LC_MESSAGES
/usr/local/share/locale/en@boldquot
/usr/local/share/locale/en@boldquot/LC_MESSAGES
/usr/local/share/locale/en@quot
/usr/local/share/locale/en@quot/LC_MESSAGES
/usr/local/share/locale/eo
/usr/local/share/locale/eo/LC_MESSAGES
/usr/local/share/locale/es
/usr/local/share/locale/es/LC_MESSAGES
/usr/local/share/locale/et
/usr/local/share/locale/et/LC_MESSAGES
/usr/local/share/locale/eu
/usr/local/share/locale/eu/LC_MESSAGES
/usr/local/share/locale/fi
/usr/local/share/locale/fi/LC_MESSAGES
/usr/local/share/locale/fr
/usr/local/share/locale/fr/LC_MESSAGES
/usr/local/share/locale/ga
/usr/local/share/locale/ga/LC_MESSAGES
/usr/local/share/locale/gl
/usr/local/share/locale/gl/LC_MESSAGES
/usr/local/share/locale/hr
/usr/local/share/locale/hr/LC_MESSAGES
/usr/local/share/locale/hu
/usr/local/share/locale/hu/LC_MESSAGES
/usr/local/share/locale/id
/usr/local/share/locale/id/LC_MESSAGES
/usr/local/share/locale/it
/usr/local/share/locale/it/LC_MESSAGES
/usr/local/share/locale/ja
/usr/local/share/locale/ja/LC_MESSAGES
/usr/local/share/locale/ko
/usr/local/share/locale/ko/LC_MESSAGES
/usr/local/share/locale/nb
/usr/local/share/locale/nb/LC_MESSAGES
/usr/local/share/locale/nl
/usr/local/share/locale/nl/LC_MESSAGES
/usr/local/share/locale/nn
/usr/local/share/locale/nn/LC_MESSAGES
/usr/local/share/locale/pa
/usr/local/share/locale/pa/LC_MESSAGES
/usr/local/share/locale/pl
/usr/local/share/locale/pl/LC_MESSAGES
/usr/local/share/locale/pt
/usr/local/share/locale/pt/LC_MESSAGES
/usr/local/share/locale/pt_BR
/usr/local/share/locale/pt_BR/LC_MESSAGES
/usr/local/share/locale/rm
/usr/local/share/locale/rm/LC_MESSAGES
/usr/local/share/locale/ro
/usr/local/share/locale/ro/LC_MESSAGES
/usr/local/share/locale/ru
/usr/local/share/locale/ru/LC_MESSAGES
/usr/local/share/locale/sk
/usr/local/share/locale/sk/LC_MESSAGES
/usr/local/share/locale/sl
/usr/local/share/locale/sl/LC_MESSAGES
/usr/local/share/locale/sq
/usr/local/share/locale/sq/LC_MESSAGES
/usr/local/share/locale/sr
/usr/local/share/locale/sr/LC_MESSAGES
/usr/local/share/locale/sv
/usr/local/share/locale/sv/LC_MESSAGES
/usr/local/share/locale/tr
/usr/local/share/locale/tr/LC_MESSAGES
/usr/local/share/locale/uk
/usr/local/share/locale/uk/LC_MESSAGES
/usr/local/share/locale/vi
/usr/local/share/locale/vi/LC_MESSAGES
/usr/local/share/locale/wa
/usr/local/share/locale/wa/LC_MESSAGES
/usr/local/share/locale/zh_CN
/usr/local/share/locale/zh_CN/LC_MESSAGES
/usr/local/share/locale/zh_HK
/usr/local/share/locale/zh_HK/LC_MESSAGES
/usr/local/share/locale/zh_TW
/usr/local/share/locale/zh_TW/LC_MESSAGES

Warning: gettext files detected at a system prefix
These files can cause compilation and link failures, especially if they
are compiled with improper architectures. Consider removing these files:
/usr/local/lib/libgettextlib.dylib
/usr/local/lib/libintl.dylib
/usr/local/include/libintl.h

Warning: libiconv files detected at a system prefix other than /usr
Homebrew doesn't provide a libiconv formula, and expects to link against
the system version in /usr. libiconv in other prefixes can cause
compile or link failure, especially if compiled with improper
architectures. OS X itself never installs anything to /usr/local so
it was either installed by a user or some other third party software.

tl;dr: delete these files:
/usr/local/lib/libiconv.dylib
/usr/local/include/iconv.h

Warning: You have MacPorts or Fink installed:
/opt/local/bin/port

This can cause trouble. You don't have to uninstall them, but you may want to
temporarily move them out of the way, e.g.

sudo mv /opt/local ~/macports

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libasprintf.0.dylib
/usr/local/lib/libcharset.1.dylib
/usr/local/lib/libcunit.1.dylib
/usr/local/lib/libgettextlib-0.18.3.dylib
/usr/local/lib/libgettextpo.0.dylib
/usr/local/lib/libgettextsrc-0.18.3.dylib
/usr/local/lib/libiconv.2.dylib
/usr/local/lib/libintl.8.dylib
/usr/local/lib/libjansson.4.dylib
/usr/local/lib/libltdl.7.dylib
/usr/local/lib/libsqlite3.0.dylib

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
/usr/local/lib/libasprintf.la
/usr/local/lib/libcharset.la
/usr/local/lib/libcunit.la
/usr/local/lib/libgettextlib.la
/usr/local/lib/libgettextpo.la
/usr/local/lib/libgettextsrc.la
/usr/local/lib/libiconv.la
/usr/local/lib/libintl.la
/usr/local/lib/libjansson.la
/usr/local/lib/libltdl.la
/usr/local/lib/libsqlite3.la

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
/usr/local/lib/pkgconfig/cunit.pc
/usr/local/lib/pkgconfig/jansson.pc
/usr/local/lib/pkgconfig/libiconv.pc
/usr/local/lib/pkgconfig/sqlite3.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/libasprintf.a
/usr/local/lib/libcharset.a
/usr/local/lib/libcunit.a
/usr/local/lib/libgettextpo.a
/usr/local/lib/libintl.a
/usr/local/lib/libjansson.a
/usr/local/lib/libltdl.a
/usr/local/lib/libsqlite3.a

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run brew link on these:

cunit

If i give "brew link libiconv" the following error is
Warning: libiconv is keg-only and must be linked with --force
Note that doing so can interfere with building software.

Can you tell me how to resolve the libiconv missing error. I installed both Manually and via brew. But still get same following error.

still i getting error when i configure the gcc compile codes

...........
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... no
checking for iconv_open in -liconv... no
configure: error: Could not find libiconv. Please install libiconv and libiconv-devel

Please help me to resolve this. i still break this error upto 2 days. I'm waiting your replies

@MikeMcQuaid
Copy link
Member

sudo chown -R $USER /usr/local

@akkravikumar
Copy link
Author

Can you describe this. what is the purpose of we use this code "sudo chown -R $USER /usr/local"

@akkravikumar
Copy link
Author

It shows same error when i ran ./configure

checking for JSON... no
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... no
checking for iconv_open in -liconv... no
configure: error: Could not find libiconv. Please install libiconv and libiconv-devel.

its shows libiconv not found.

if i ran "brew doctor" after ran the "sudo chown -R $USER /usr/local

this wil shows
Warning: gettext files detected at a system prefix
These files can cause compilation and link failures, especially if they
are compiled with improper architectures. Consider removing these files:
/usr/local/lib/libgettextlib.dylib
/usr/local/lib/libintl.dylib
/usr/local/include/libintl.h

Warning: libiconv files detected at a system prefix other than /usr
Homebrew doesn't provide a libiconv formula, and expects to link against
the system version in /usr. libiconv in other prefixes can cause
compile or link failure, especially if compiled with improper
architectures. OS X itself never installs anything to /usr/local so
it was either installed by a user or some other third party software.

tl;dr: delete these files:
/usr/local/lib/libiconv.dylib
/usr/local/include/iconv.h

Warning: You have MacPorts or Fink installed:
/opt/local/bin/port

This can cause trouble. You don't have to uninstall them, but you may want to
temporarily move them out of the way, e.g.

sudo mv /opt/local ~/macports

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libasprintf.0.dylib
/usr/local/lib/libcharset.1.dylib
/usr/local/lib/libcunit.1.dylib
/usr/local/lib/libgettextlib-0.18.3.dylib
/usr/local/lib/libgettextpo.0.dylib
/usr/local/lib/libgettextsrc-0.18.3.dylib
/usr/local/lib/libiconv.2.dylib
/usr/local/lib/libintl.8.dylib
/usr/local/lib/libjansson.4.dylib
/usr/local/lib/libltdl.7.dylib
/usr/local/lib/libsqlite3.0.dylib

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
/usr/local/lib/libasprintf.la
/usr/local/lib/libcharset.la
/usr/local/lib/libcunit.la
/usr/local/lib/libgettextlib.la
/usr/local/lib/libgettextpo.la
/usr/local/lib/libgettextsrc.la
/usr/local/lib/libiconv.la
/usr/local/lib/libintl.la
/usr/local/lib/libjansson.la
/usr/local/lib/libltdl.la
/usr/local/lib/libsqlite3.la

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
/usr/local/lib/pkgconfig/cunit.pc
/usr/local/lib/pkgconfig/jansson.pc
/usr/local/lib/pkgconfig/libiconv.pc
/usr/local/lib/pkgconfig/sqlite3.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/libasprintf.a
/usr/local/lib/libcharset.a
/usr/local/lib/libcunit.a
/usr/local/lib/libgettextpo.a
/usr/local/lib/libintl.a
/usr/local/lib/libjansson.a
/usr/local/lib/libltdl.a
/usr/local/lib/libsqlite3.a

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run brew link on these:

cunit

@MikeMcQuaid
Copy link
Member

You should consider removing those files and MacPorts until the brew doctor warnings are gone.

@akkravikumar
Copy link
Author

I uninstalled the libiconv. using this brew uninstall libiconv but it again shows libiconv same error. can you suggest me how to remove those files.

@akkravikumar
Copy link
Author

If i ran this
brew link libiconv
Warning: libiconv is keg-only and must be linked with --force
Note that doing so can interfere with building software.

shows this error

@MikeMcQuaid
Copy link
Member

You can remove those files with the rm command. You can't link libiconv; it will break things. What are you trying to do and why?

@akkravikumar
Copy link
Author

you mean these two files , is right?
/usr/local/lib/libiconv.dylib
/usr/local/include/iconv.h

@akkravikumar
Copy link
Author

i ran gcc compile source codes with autoconf, automake implement to xcode

@MikeMcQuaid
Copy link
Member

Sorry, I don't understand. Why are you trying to install libiconv?

@akkravikumar
Copy link
Author

while i compile gcc source like
$./configure
this will shows error

.........
........
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... no
checking for iconv_open in -liconv... no
configure: error: Could not find libiconv. Please install libiconv and libiconv-devel.

@MikeMcQuaid
Copy link
Member

Why don't you compile GCC with brew install gcc?

@adamv
Copy link
Contributor

adamv commented May 16, 2014

Homebrew has never had a great story about using libraries it installs, especially keg-only ones, to then build other software outside of Homebrew. See #21129 for another example of this.

@jacknagel
Copy link
Contributor

Friendly reminder that we don't package libiconv in core anymore, and the one provided by dupes is of dubious value.

@adamv
Copy link
Contributor

adamv commented May 20, 2014

Note, we can't really provide support for compiling GCC on OS X (outside of Homebrew). Suggest asking in a GCC specific forum.

@adamv adamv closed this as completed May 20, 2014
@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants