[WORKAROUND] www/seamonkey2 on CURRENT

From: Alexey Shuvaev <shuvaev_at_physik.uni-wuerzburg.de>
Date: Sat, 29 Jan 2011 00:58:51 +0100
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.o
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=www&portname=seamonkey2&wildcard=

[2]: c++ -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 -Woverloaded-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 -O -fPIC -shared -Wl,-z,defs -Wl,-h,libxpcom_core.so -o libxpcom_core.so  pldhash.o nsArrayEnumerator.o nsArrayUtils.o nsCategoryCache.o nsCOMPtr.o nsCOMArray.o nsCRTGlue.o nsComponentManagerUtils.o nsEnumeratorUtils.o nsID.o nsIInterfaceRequestorUtils.o nsINIParser.o nsISupportsImpl.o nsMemory.o nsWeakReference.o nsGREGlue.o nsVersionComparator.o nsTHashtable.o nsQuickSort.o nsVoidArray.o nsTArray.o nsThreadUtils.o nsTObserverArray.o nsCycleCollectionParticipant.o nsDeque.o nsAutoLock.o nsGenericFactory.o nsProxyRelease.o nsTextFormatter.o nsXPComInit.o nsXPCOMStrings.o     -pthread   -L/usr/local/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,/work/a/ports/www/seamonkey2/work/fake/lib  -Wl,--whole-archive ../ds/libxpcomds_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/libstring_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 -lXcomposite -lXdamage -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgio-2.0 -lXfixes -lgobject-2.0 -lgmodule-2.0 -lpng -lz -lm -lgthread-2.0 -lglib-2.0 -lcairo -lX11   -lm -pthread -lm -pthread -pthread -L/usr/local/lib -liconv    
../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=1 -DOSTYPE=\"FreeBSD9\" -DOSARCH=FreeBSD -D_IMPL_NS_COM -I.. -I. -I. -I../../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 -Woverloaded-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-strict-aliasing   -I/usr/local/include/nss -I/usr/local/include/nss/nss   -I/usr/local/include  -I/usr/local/include -DMOZILLA_CLIENT -include ../../mozilla-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(nsACString_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, unsigned int, char const*, unsigned int)'
nsNativeCharsetUtils.o(.gnu.linkonce.t._Z18EnsureStringLengthI18nsAString_internalEiRT_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+0x1): In function `nsAString_internal::Truncate(unsigned int)':
: undefined reference to `nsAString_internal::SetLength(unsigned int)'
nsNativeCharsetUtils.o(.gnu.linkonce.t._ZN18nsAString_internal12BeginWritingER17nsWritingIteratorItE+0x10): In function `nsAString_internal::BeginWriting(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._ZN24nsNativeCharsetConverter6UnlockEv+0xd): In function `nsNativeCharsetConverter::Unlock()':
: undefined reference to `PR_Unlock'
/usr/bin/ld: aaa: hidden symbol `libiconv_open' isn't defined

Received on Fri Jan 28 2011 - 23:21:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:11 UTC