Date: Sat, 29 Jan 2011 00:58:51 +0100 From: Alexey Shuvaev <shuvaev@physik.uni-wuerzburg.de> To: freebsd-ports@freebsd.org Cc: gecko@FreeBSD.org, freebsd-current@freebsd.org Subject: [WORKAROUND] www/seamonkey2 on CURRENT Message-ID: <20110128235851.GB95980@lexx.ifp.tuwien.ac.at>
next in thread | raw e-mail | index | archive | help
--h31gzZEtNLTqOjlF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello! It seems www/seamonkey2 is broken on CURRENT for at least 1 month now [1]. Examining build log and reproducing it locally, the problem is in the usage of libiconv in nsNativeCharsetUtils.cpp. The linker fails to produce libxpcom_core.so although -L/usr/local/lib and -liconv are specified [2]. Examining this further I found that nsNativeCharsetUtils= =2Eo produced with [3] fails to link with libiconv alone too [4] (note still unresolved libiconv references). I'm not a compiler/linker guru and do not understand what is happening here. As a workaroud I use the attached patch which disables the usage of libiconv in nsNativeCharsetUtils.cpp. My little more than 0.02$, Alexey. [1]: http://portsmon.freebsd.org/portoverview.py?category=3Dwww&portname=3D= seamonkey2&wildcard=3D [2]: c++ -I/usr/local/include/nss -I/usr/local/include/nss/nss -I/usr/loc= al/include -I/usr/local/include -fno-rtti -fno-exceptions -Wall -Wpointer-= arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-= dtor -Wcast-align -Wno-invalid-offsetof -Wno-long-long -O2 -pipe -fno-stric= t-aliasing -fno-strict-aliasing -fshort-wchar -pipe -DNDEBUG -DTRIMMED -O = -fPIC -shared -Wl,-z,defs -Wl,-h,libxpcom_core.so -o libxpcom_core.so pldh= ash.o nsArrayEnumerator.o nsArrayUtils.o nsCategoryCache.o nsCOMPtr.o nsCOM= Array.o nsCRTGlue.o nsComponentManagerUtils.o nsEnumeratorUtils.o nsID.o ns= IInterfaceRequestorUtils.o nsINIParser.o nsISupportsImpl.o nsMemory.o nsWea= kReference.o nsGREGlue.o nsVersionComparator.o nsTHashtable.o nsQuickSort.o= nsVoidArray.o nsTArray.o nsThreadUtils.o nsTObserverArray.o nsCycleCollect= ionParticipant.o nsDeque.o nsAutoLock.o nsGenericFactory.o nsProxyRelease.o= nsTextFormatter.o nsXPComInit.o nsXPCOMStrings.o -pthread -L/usr/loc= al/lib/nss -Wl,-rpath,/usr/local/lib/seamonkey -lc -Wl,-rpath-link,/work/= a/ports/www/seamonkey2/work/comm-1.9.1/mozilla/dist/bin -Wl,-rpath-link,/wo= rk/a/ports/www/seamonkey2/work/fake/lib -Wl,--whole-archive ../ds/libxpcom= ds_s.a ../io/libxpcomio_s.a ../components/libxpcomcomponents_s.a ../threads= /libxpcomthreads_s.a ../proxy/src/libxpcomproxy_s.a ../base/libxpcombase_s.= a ../reflect/xptcall/src/libxptcall.a ../reflect/xptcall/src/libxptcmd.a ..= /reflect/xptinfo/src/libxptinfo.a ../../dist/lib/libxpt.a ../string/src/lib= string_s.a -Wl,--no-whole-archive -L/usr/local/lib -lplds4 -lplc4 -lnspr4= -pthread -pthread -L/usr/local/lib -lgtk-x11-2.0 -latk-1.0 -lgdk-x11-2.0 -= lpangocairo-1.0 -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomp= osite -lXdamage -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfo= ntconfig -lgio-2.0 -lXfixes -lgobject-2.0 -lgmodule-2.0 -lpng -lz -lm -lgth= read-2.0 -lglib-2.0 -lcairo -lX11 -lm -pthread -lm -pthread -pthread -L/u= sr/local/lib -liconv =20 =2E./io/libxpcomio_s.a(nsNativeCharsetUtils.o)(.text+0x32): In function `xp= _iconv(void*, char const**, unsigned int*, char**, unsigned int*)': : undefined reference to `libiconv' [3]: c++ -o nsNativeCharsetUtils.o -c -I../../dist/include/system_wrappers = -include ../../config/gcc_hidden.h -DMOZILLA_INTERNAL_API -DMOZ_SUITE=3D1 -= DOSTYPE=3D\"FreeBSD9\" -DOSARCH=3DFreeBSD -D_IMPL_NS_COM -I.. -I. -I. -I../= =2E./dist/include/string -I../../dist/include -I../../dist/include/xpcom = -I/usr/local/include/nspr -I/usr/include -I/usr/local/include -fPIC -I= /usr/local/include/nss -I/usr/local/include/nss/nss -I/usr/local/include = -I/usr/local/include -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Wove= rloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast= -align -Wno-invalid-offsetof -Wno-long-long -O2 -pipe -fno-strict-aliasing = -fno-strict-aliasing -fshort-wchar -pipe -DNDEBUG -DTRIMMED -Os -fno-stric= t-aliasing -I/usr/local/include/nss -I/usr/local/include/nss/nss -I/usr= /local/include -I/usr/local/include -DMOZILLA_CLIENT -include ../../mozill= a-config.h nsNativeCharsetUtils.cpp [4]: c++ -o aaa nsNativeCharsetUtils.o -L/usr/local/lib -liconv /usr/lib/crt1.o(.text+0x8a): In function `_start': : undefined reference to `main' nsNativeCharsetUtils.o(.text+0x16): In function `xp_iconv(void*, char const= **, unsigned long*, char**, unsigned long*)': : undefined reference to `libiconv' nsNativeCharsetUtils.o(.text+0x571): In function `nsNativeCharsetConverter:= :GlobalShutdown()': : undefined reference to `PR_DestroyLock' nsNativeCharsetUtils.o(.text+0x58e): In function `nsNativeCharsetConverter:= :GlobalShutdown()': : undefined reference to `libiconv_close' nsNativeCharsetUtils.o(.text+0x5ab): In function `nsNativeCharsetConverter:= :GlobalShutdown()': : undefined reference to `libiconv_close' nsNativeCharsetUtils.o(.text+0x5c8): In function `nsNativeCharsetConverter:= :GlobalShutdown()': : undefined reference to `libiconv_close' nsNativeCharsetUtils.o(.text+0x5e5): In function `nsNativeCharsetConverter:= :GlobalShutdown()': : undefined reference to `libiconv_close' nsNativeCharsetUtils.o(.text+0x602): In function `nsNativeCharsetConverter:= :GlobalShutdown()': : undefined reference to `libiconv_close' nsNativeCharsetUtils.o(.text+0x61f): more undefined references to `libiconv= _close' follow nsNativeCharsetUtils.o(.text+0x647): In function `nsNativeCharsetConverter:= :GlobalInit()': : undefined reference to `PR_NewLock' nsNativeCharsetUtils.o(.text+0x692): In function `xp_iconv_open(char const*= *, char const**)': : undefined reference to `libiconv_open' nsNativeCharsetUtils.o(.text+0x6fc): In function `nsNativeCharsetConverter:= :LazyInit()': : undefined reference to `PL_strcasecmp' nsNativeCharsetUtils.o(.text+0x94d): In function `NS_CopyNativeToUnicode(ns= ACString_internal const&, nsAString_internal&)': : undefined reference to `nsAString_internal::SetLength(unsigned int)' nsNativeCharsetUtils.o(.gnu.linkonce.t._ZN19nsACString_internal8TruncateEj+= 0x1): In function `nsACString_internal::Truncate(unsigned int)': : undefined reference to `nsACString_internal::SetLength(unsigned int)' nsNativeCharsetUtils.o(.gnu.linkonce.t._ZN19nsACString_internal6AppendEPKcj= +0xf): In function `nsACString_internal::Append(char const*, unsigned int)': : undefined reference to `nsACString_internal::Replace(unsigned int, unsign= ed int, char const*, unsigned int)' nsNativeCharsetUtils.o(.gnu.linkonce.t._Z18EnsureStringLengthI18nsAString_i= nternalEiRT_j+0xd): In function `int EnsureStringLength<nsAString_internal>= (nsAString_internal&, unsigned int)': : undefined reference to `nsAString_internal::SetLength(unsigned int)' nsNativeCharsetUtils.o(.gnu.linkonce.t._ZN18nsAString_internal8TruncateEj+0= x1): In function `nsAString_internal::Truncate(unsigned int)': : undefined reference to `nsAString_internal::SetLength(unsigned int)' nsNativeCharsetUtils.o(.gnu.linkonce.t._ZN18nsAString_internal12BeginWritin= gER17nsWritingIteratorItE+0x10): In function `nsAString_internal::BeginWrit= ing(nsWritingIterator<unsigned short>&)': : undefined reference to `nsAString_internal::EnsureMutable(unsigned int)' nsNativeCharsetUtils.o(.gnu.linkonce.t._ZN24nsNativeCharsetConverter4LockEv= +0xd): In function `nsNativeCharsetConverter::Lock()': : undefined reference to `PR_Lock' nsNativeCharsetUtils.o(.gnu.linkonce.t._ZN24nsNativeCharsetConverter6Unlock= Ev+0xd): In function `nsNativeCharsetConverter::Unlock()': : undefined reference to `PR_Unlock' /usr/bin/ld: aaa: hidden symbol `libiconv_open' isn't defined --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-seamonkey --- mozilla/xpcom/io/nsNativeCharsetUtils.cpp.orig 2010-11-23 21:20:01.000000000 +0100 +++ mozilla/xpcom/io/nsNativeCharsetUtils.cpp 2011-01-27 17:24:37.000000000 +0100 @@ -96,11 +96,11 @@ // iconv for all platforms where nltypes.h and nllanginfo.h are present // along with iconv. // -#if defined(HAVE_ICONV) && defined(HAVE_NL_TYPES_H) && defined(HAVE_LANGINFO_CODESET) -#define USE_ICONV 1 -#else +//#if defined(HAVE_ICONV) && defined(HAVE_NL_TYPES_H) && defined(HAVE_LANGINFO_CODESET) +//#define USE_ICONV 1 +//#else #define USE_STDCONV 1 -#endif +//#endif static void isolatin1_to_utf16(const char **input, PRUint32 *inputLeft, PRUnichar **output, PRUint32 *outputLeft) --h31gzZEtNLTqOjlF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110128235851.GB95980>