From owner-freebsd-openoffice@FreeBSD.ORG Tue Sep 19 18:54:48 2006 Return-Path: X-Original-To: freebsd-openoffice@FreeBSD.org Delivered-To: freebsd-openoffice@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC42316A412; Tue, 19 Sep 2006 18:54:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E38243D53; Tue, 19 Sep 2006 18:54:48 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id k8JIsSJv054515; Tue, 19 Sep 2006 14:54:28 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-openoffice@FreeBSD.org Date: Tue, 19 Sep 2006 14:54:14 -0400 User-Agent: KMail/1.6.2 References: <200609142219.19636.nb_root@videotron.ca> <200609151417.14241.jkim@FreeBSD.org> <20060918095851.GA90925@deviant.kiev.zoral.com.ua> In-Reply-To: <20060918095851.GA90925@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_YzDEFm9Yb0nK1OD" Message-Id: <200609191454.16076.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88/1900/Tue Sep 19 13:32:20 2006 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Kostik Belousov , kan@FreeBSD.org, h.blanke@chello.nl Subject: Re: [patch] Re: OpenOffice.org-2.0.4rc1 compile problems on -CURRENT X-BeenThere: freebsd-openoffice@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting OpenOffice to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2006 18:54:48 -0000 --Boundary-00=_YzDEFm9Yb0nK1OD Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Monday 18 September 2006 05:58 am, Kostik Belousov wrote: > On Fri, Sep 15, 2006 at 02:17:12PM -0400, Jung-uk Kim wrote: > > On Thursday 14 September 2006 10:19 pm, Nicolas Blais wrote: > > --- >8 --- SNIP!!! --- >8 --- > > > > > ============= > > > Building project udkapi > > > ============= > > > /usr/ports/editors/openoffice.org-2.0/work/OOD680_m3/udkapi/com > > >/sun /star/uno mkout -- version: 1.7 > > > idlc @/tmp/mkmJ4vAL > > > idlc: compile 'Exception.idl' ... > > > idlc: could not load registry dll. > > > idlc: detected 1 errors > > > Sun Microsystems (R) idlc Version 1.1 > > > > > > dmake: Error code 1, while > > > making '../../../../unxfbsdi.pro/misc/urd_cssuno.don' > > > '---* tg_merge.mk *---' > > > > > > ERROR: Error 65280 occurred while > > > making > > > /usr/ports/editors/openoffice.org-2.0/work/OOD680_m3/udkapi/com > > >/sun /star/uno dmake: Error code 1, while making > > > 'build_instsetoo_native' '---* *---' > > > *** Error code 255 > > > > > > Stop in /usr/ports/editors/openoffice.org-2.0. > > > > > > The port tree is up to date and so is -CURRENT. Any > > > suggestions? > > > > src/libexec/rtld-elf/rtld.c 1.117 has serious regression: > > > > http://docs.freebsd.org/cgi/mid.cgi?200609081459.k88ExtSR084500 > > > > You can revert to 1.116 and pass this but there is some other > > issues. :-( > > > > Jung-uk Kim > > Ok, below is the patch that shall fix the issue. It was tested by > Jung-uk Kim' regression test. Also, adopted patch (for STABLE) was > tested with KDE (opening https:// sites) and OpenOffice 2.0.3. > The latter was simply run and several documents of different > types where opended. I have no resources to rebuild the beast > myself. Konqueror issued a lot of warning for undefined symbols > (like kdecore (KLibLoader): WARNING: KLibrary: Undefined symbol > "OPENSSL_add_all_algorithms" ), but it does it with both patched > and non-patched rtld on 6-STABLE. In both cases it worked normally, > allowed to open the sites, and I see no excessive VM usage (I > assume 30-40Mb is normal for it). > > Original patch (committed as rev. 1.117) scanned objects from the > obj->dagmembers list for symbol retrieved by dlsym(). This appeared > to be wrong by two reasons: > > 1. dagmembers are initialized only when dlopen actually load the > dso. This caused the second test from Jung-uk Kim' regression set > to fail, because it dlopen() depended dso and tries to lookup > symbol from there. 2. In the case dso A depends on B and C, usage > of dagmembers would cause B to expose symbols from C, that is wrong > too. > > Attached patch uses obj->needed, that is filled for each dso, and > is a real DAG instead of list. Patch (hopefully) implements > SUSv3-required breadth-first lookup for dependent symbols. > > Please, give it a try. --- >8 --- SNIP!!! --- >8 --- Similar patch is committed to -CURRENT: http://docs.freebsd.org/cgi/mid.cgi?200609191247.k8JClDaT048713 If you have time and electrons to burn, please cvsup your system, rebuild/reinstall world, and test the attached patch. You will have to remove patch-i66667 from files directory and drop this patch in there instead. Thanks! Jung-uk Kim --Boundary-00=_YzDEFm9Yb0nK1OD Content-Type: text/x-diff; charset="iso-8859-1"; name="patch-bridge" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-bridge" --- bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx Tue May 2 08:01:08 2006 +++ bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx Fri Sep 8 17:25:05 2006 @@ -120,6 +120,9 @@ case typelib_TypeClass_UNSIGNED_HYPER: case typelib_TypeClass_DOUBLE: pCppStack += sizeof(sal_Int32); // extra long + break; + default: + break; } // no longer needed TYPELIB_DANGER_RELEASE( pParamTypeDescr ); @@ -436,7 +439,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( void ** slots, unsigned char * code, typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset, - sal_Int32 functionCount, sal_Int32 vtableOffset) + sal_Int32 /*functionCount*/, sal_Int32 vtableOffset) { for (sal_Int32 i = 0; i < type->nMembers; ++i) { typelib_TypeDescription * member = 0; --- bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx.orig Wed Sep 7 18:20:22 2005 +++ bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx Mon Sep 11 12:21:03 2006 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -122,7 +123,11 @@ }; //__________________________________________________________________________________________________ RTTI::RTTI() SAL_THROW( () ) +#if __FreeBSD_version < 700022 : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) ) +#else + : m_hApp( dlopen( 0, RTLD_LAZY ) ) +#endif { } //__________________________________________________________________________________________________ @@ -139,8 +144,8 @@ OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName; MutexGuard guard( m_mutex ); - t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) ); - if (iFind == m_rttis.end()) + t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) ); + if (iRttiFind == m_rttis.end()) { // RTTI symbol OStringBuffer buf( 64 ); @@ -157,8 +162,11 @@ buf.append( 'E' ); OString symName( buf.makeStringAndClear() ); -//#iZ 22253 +#if __FreeBSD_version < 700022 rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() ); +#else + rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); +#endif if (rtti) { @@ -205,7 +213,7 @@ } else { - rtti = iFind->second; + rtti = iRttiFind->second; } return rtti; --- bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx Mon Jun 19 19:43:09 2006 +++ bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx Fri Sep 8 17:25:05 2006 @@ -142,6 +142,8 @@ case typelib_TypeClass_DOUBLE: asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) ); break; + default: + break; } } @@ -217,6 +219,9 @@ case typelib_TypeClass_UNSIGNED_HYPER: case typelib_TypeClass_DOUBLE: pCppStack += sizeof(sal_Int32); // extra long + break; + default: + break; } // no longer needed TYPELIB_DANGER_RELEASE( pParamTypeDescr ); @@ -329,7 +334,6 @@ // is my surrogate bridges::cpp_uno::shared::UnoInterfaceProxy * pThis = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI); - typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr; switch (pMemberDescr->eTypeClass) { --- bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx.orig Wed Jul 19 05:30:01 2006 +++ bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx Mon Sep 11 12:21:25 2006 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -122,7 +123,11 @@ }; //__________________________________________________________________________________________________ RTTI::RTTI() SAL_THROW( () ) +#if __FreeBSD_version < 700022 : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) ) +#else + : m_hApp( dlopen( 0, RTLD_LAZY ) ) +#endif { } //__________________________________________________________________________________________________ @@ -157,7 +162,11 @@ buf.append( 'E' ); OString symName( buf.makeStringAndClear() ); +#if __FreeBSD_version < 700022 rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() ); +#else + rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); +#endif if (rtti) { --Boundary-00=_YzDEFm9Yb0nK1OD--