building: iconv woes
Alexander Strange
astrange at apple.com
Wed Jan 12 07:51:12 PST 2011
On Jan 12, 2011, at 9:35 AM, Michael Haupt wrote:
> Dear all,
>
> on Mac OS X 10.6.6, I'm experiencing the following problem during build:
>
> -----
> ...
> Rebuilding /Users/haupt/OpenJDK/macosx-port/build/macosx-universal/lib/libnpt.dylib
> because of /Users/haupt/OpenJDK/macosx-port/build/macosx-universal/tmp/sun/npt/obj/.files_compiled
> mapfile-vers
> /Developer/usr/bin/llvm-gcc-4.2 -O2 -fno-strict-aliasing -fPIC -W
> -Wall -Wno-unused -Wno-parentheses -arch i386 -arch x86_64
> -D_LITTLE_ENDIAN
> -F/System/Library/Frameworks/JavaVM.framework/Frameworks -DNDEBUG
> -DARCH='"universal"' -D_ALLBSD_SOURCE -DRELEASE='"1.7.0-internal"'
> -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -DMACOSX -I.
> -I/Users/haupt/OpenJDK/macosx-port/build/macosx-universal/tmp/sun/npt/CClassHeaders
> -I../../../src/solaris/javavm/export
> -I../../../src/share/javavm/export -I../../../src/share/npt
> -I../../../src/solaris/npt -arch i386 -arch x86_64 -Xlinker -rpath
> -Xlinker @loader_path/. -Xlinker -install_name -Xlinker
> @rpath/libnpt.dylib
> -L/Users/haupt/OpenJDK/macosx-port/build/macosx-universal/lib
> -Wl,-install_name, at rpath/libnpt.dylib -dynamiclib
> -compatibility_version 1.0.0 -current_version 1.0.0 -o
> /Users/haupt/OpenJDK/macosx-port/build/macosx-universal/lib/libnpt.dylib
> /Users/haupt/OpenJDK/macosx-port/build/macosx-universal/tmp/sun/npt/obj/npt.o
> /Users/haupt/OpenJDK/macosx-port/build/macosx-universal/tmp/sun/npt/obj/utf.o
> /Users/haupt/OpenJDK/macosx-port/build/macosx-universal/tmp/sun/npt/obj/utf_md.o
> -liconv
> Undefined symbols:
> "_libiconv_open", referenced from:
> _utfInitialize in utf_md.o
> _utfInitialize in utf_md.o
> "_libiconv", referenced from:
> _iconvConvert in utf_md.o
> "_libiconv_close", referenced from:
> _utfTerminate in utf_md.o
> _utfTerminate in utf_md.o
> […]
>
> Is something wrong about my environment?
Do you have a /usr/local/lib/libiconv.dylib, or iconv.h in /usr/local?
Third party installations of iconv tend to have the symbols named different from the system (libiconv() instead of iconv()), and if the header gets found by the compiler and not the library it causes builds to fail later.
More information about the macosx-port-dev
mailing list