From owner-freebsd-office@FreeBSD.ORG Sun Aug 24 18:40:05 2014 Return-Path: Delivered-To: office@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48B48C54; Sun, 24 Aug 2014 18:40:05 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0B6337F6; Sun, 24 Aug 2014 18:40:04 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s7OIdsd9055757; Sun, 24 Aug 2014 11:39:58 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201408241839.s7OIdsd9055757@gw.catspoiler.org> Date: Sun, 24 Aug 2014 11:39:54 -0700 (PDT) From: Don Lewis Subject: Re: OpenOffice 4.1 build persistently fails on my FreeBSD-10-stable/AMD64 To: pfg@FreeBSD.org In-Reply-To: <2366E5BA-9FD3-4243-9C47-F92B68F8C3A6@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=iso-2022-jp Cc: office@FreeBSD.org X-BeenThere: freebsd-office@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Office applications on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Aug 2014 18:40:05 -0000 On 23 Aug, Pedro Giffuni wrote: > > Il giorno 23/ago/2014, alle ore 20:32, Don Lewis > ha scritto: > >> On 23 Aug, Pedro Giffuni wrote: >>> >>> On 08/23/14 13:51, Don Lewis wrote: >>>> On 22 Aug, Pedro Giffuni wrote: >>>>> FWIW, >>>>> >>>>> AOO 4.1 is known to have bugs and AOO 4.1.1 will be released >>>>>really soon to address them. The patch in PR 192545 unbreaks the >>>>>AOO 4.1.0 build on FreeBSD 10 and >>>> 11: >>>> >>>> The patch in PR 192557 upgrades openoffice-devel to 4.1.1-RC3: >>>> >>>> >>> >>> The patch in PR 181044 fixes Boost so that it can be used as >>> an external dependency for OpenOffice: >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181044 >> >> Still no joy B-( >> >> When I was first working on 4.1.0, I ran into the #include_next >> problem and tried to work around it by adding >> -DBOOST_TR1_DISABLE_INCLUDE_NEXT to CFLAGS. The errors still >> occurred, but with different message text. >> >> With this patch applied, I see the same thing as in my earlier >> experiments: >> >> In file included from /usr/local/include/boost/tr1/tr1/vector:16:0, >> from >> /wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.1.1/main/solver/411/unxfbsdx.pro/inc/stl/vector:31, >> from >> /wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.1.1/main/xml2cmp/source/finder/dependy.hxx:28, >> from >> /wrkdirs/usr/ports/editors/openoffice-devel/work/aoo-4.1.1/main/xml2cmp/source/finder/dependy.cxx:25: >> /usr/local/include/boost/tr1/detail/config_all.hpp:163:41: fatal >> error: ../4.7/utility: No such file or directory compilation >> terminated. > > Ugh… this looks familiar :( > > The problem is really messy: the original OpenOffice was developed in > the dark ages of C++ libraries and used STLport as it’s STL > implementation. STLport doesn’t work with modern compilers (like in > MacOSX) so Boost is very handy because it has TR1 implementation which > can be very useful to complement older versions of libstdc++. With a > good native STL library, AOO makes very little use, if any, of boost. > > In order to be less disruptive, AOO has some wrappers for the STL > libraries in main/stlport/systemstl and for some reason this works > fine on for linux, Windows and MacOSX but it always gets those wrong > on FreeBSD. > > AOO appears to be the only package that exercises include_next because > the definition was wrong before my patch and no one had noticed. The > explanation is here: > > https://svn.boost.org/trac/boost/ticket/8944 > > Perhaps the path may need adjusting for gcc4.7. Extra eyes are > certainly welcome. main/solver/411/unxfbsdx.pro/inc/stl/vector contains this: #ifdef HAVE_STL_INCLUDE_PATH // TODO: use computed include file name #include_next #elif defined(_MSC_VER) #include <../../VC/include/vector> #else // fall back to boost/tr1 #include #endif which gets us into boost and it's emulation of #include_next. If we were using our old gcc 4.2 in base, then we'd want to pick up the second of these: %find /usr/include -name vector -print /usr/include/c++/4.2/debug/vector /usr/include/c++/4.2/vector so your patch would work. Using gcc 4.7, we want the last one of these: %find /usr/local/lib/gcc47/include -name vector -print /usr/local/lib/gcc47/include/c++/profile/vector /usr/local/lib/gcc47/include/c++/debug/vector /usr/local/lib/gcc47/include/c++/vector If I tweak the path in your patch to this: +# define BOOST_TR1_STD_HEADER(name) <../c++/name> I can successfully build OpenOffice with system boost. It looks like this should also work with the gcc 4.6 port. If you tweak your patch to distinguish between gcc 4.2 and later versions and select the path accordingly, it should work for all cases. Back to the original build failure ... for some reason unopkg.bin is segfaulting when linked with the system libgraphite. I noticed that the silgraphite port picked up one of the patches silgraphite patches from OpenOffice with some tweaks, but not the rest. GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... (gdb) run Starting program: /mnt2/tmp/mnt2/usr/ports/editors/openoffice-devel/work/aoo-4.1.1/main/instsetoo_native/unxfbsdi.pro/Apache_OpenOffice/archive/install/en-US_witherror/Apache_OpenOffice_4.1.1_FreeBSD_install-arc_en-US/openoffice4/program/unopkg.bin [New LWP 100780] [New Thread 8a803080 (LWP 100780/unopkg.bin)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 8a803080 (LWP 100780/unopkg.bin)] 0x00000000 in ?? () (gdb) tr trace command requires an argument (gdb) bt #0 0x00000000 in ?? () #1 0x88290bf4 in __dynamic_cast (src_ptr=0x8832fc40, src_type=0x88326684, dst_type=0x88326540, src2dst=0) at ../../.././../gcc-4.7.4/libstdc++-v3/libsupc++/dyncast.cc:61 #2 0x882bf021 in std::has_facet > (__loc=@0x8832f9b0) at locale_classes.tcc:257 #3 0x882b273a in std::basic_ios >::_M_cache_locale (this=0x8832f944, __loc=@0x8832f9b0) at basic_ios.tcc:160 #4 0x882b27e9 in std::basic_ios >::init ( this=0x8832f944, __sb=0x8832f540) at basic_ios.tcc:133 #5 0x882a42c3 in std::ios_base::Init::Init (this=0x8853264c) at ostream:83 #6 0x8832f944 in std::cout () from /usr/local/lib/gcc47/libstdc++.so.6 #7 0x8832f540 in __gnu_internal::buf_cin_sync () from /usr/local/lib/gcc47/libstdc++.so.6 Previous frame inner to this frame (corrupt stack?)