Bug 121787 - when devel/icu is installed, openoffice fails to build
Summary: when devel/icu is installed, openoffice fails to build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-openoffice (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-17 14:30 UTC by Michael Moll
Modified: 2008-07-20 09:50 UTC (History)
0 users

See Also:


Attachments
ooo-vcl-ft2-icu.diff (443 bytes, patch)
2008-06-26 19:54 UTC, Jung-uk Kim
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Moll freebsd_committer freebsd_triage 2008-03-17 14:30:01 UTC
The Problem is already described here:
http://lists.freebsd.org/pipermail/freebsd-openoffice/2008-February/003590.html
http://lists.freebsd.org/pipermail/freebsd-openoffice/2008-February/003599.html

As GNOME 2.22 will soon be added to the portstree the problem will be more imminent, because GNOME depends on icu then.

Fix: Apply this patch to icu (this is needed by openoffice):
<snip>


Then add "--with-system-icu=yes" to the configure-options of the openoffice-port.

AFAIK most Linux distros use their icu-library from outside OOO, please think about this or make sure the OOO-port only uses his own icu-library.--uunzXb6YARMB6t7Xjm9aiXnf8F19hWQYW3MLZR3pmUTfEb7Q
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- icu/source/common/unicode/rbbi.h-old        2007-10-31 15:52:08.000000000 +0100
+++ icu/source/common/unicode/rbbi.h    2007-10-31 15:52:47.000000000 +0100
@@ -611,12 +611,14 @@
     virtual int32_t getBreakType() const;
 #endif
 
+public:
     /**
       * Set the type of the break iterator.
       * @internal
       */
     virtual void setBreakType(int32_t type);
 
+protected:
     /**
       * Common initialization function, used by constructors and bufferClone.
       *   (Also used by DictionaryBasedBreakIterator::createBufferClone().)
<snip>
How-To-Repeat: Install devel/icu and try to build openoffice.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-03-17 14:30:09 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 mi+mill 2008-03-17 16:17:39 UTC
According to the ICU project, OpenOffice is using ICU incorrectly. An issue is 
reported in:

 http://bugs.icu-project.org/trac/ticket/5498

and the proposed fix is in the OOO's database:

 http://www.openoffice.org/issues/show_bug.cgi?id=81519 (fixed on Feb 13)

Another issue is OOo flat-out refusal to use icu-3.8 -- it should be more 
accepting.

I do agree, that our OOo port must be fixed to use /ALL/ of the already 
installed components (--with-system-foo), instead of building its own 
versions. In addition to ICU, this list includes, but is not limited to the 
following (sorted by portname):

 * graphics/agg
 * shells/bash
 * x11-fonts/bitstream-vera
 * java/bsh
 * devel/bison
 * devel/boost
 * ftp/curl
 * databases/db42
 * devel/dmake
 * textproc/expat2
 * print/freetype (already an option -- should be default)
 * devel/icu
 * graphics/jpeg
 * www/firefox (or some other mozilla browser)
 * archives/libmspack
 * audio/libsndfile
 * textproc/libtextcat
 * textproc/libwpd
 * textproc/libxslt
 * www/neon
 * devel/nss and nspr
 * lang/python
 * graphics/sane-backends
 * databases/unixODBC
 * archivers/unzip
 * graphics/vigra
 * security/xmlsec1
 * textproc/xt
 * archivers/zip

I'm sure, I missed some... As things stand, OOo builds its own (outdated) 
versions of the above causing hugely inflated disk-space and build-time 
requirements. They also end up not using the patches and development/porting 
efforts of the maintainers of all those ports keeping the already fixed 
bugs... Heck -- the OOo ports will download/build an entire ancient 
Mozilla-1.7.5, if you aren't careful!

This is in dramatic contrast to what all the rest of the ports in the tree are 
doing and speaks poorly of the port's maintainership, frankly. They follow 
the "vendor's" broken model of bundling everything a bit too literally.

It used to be even worse -- OOo ports used to build THEIR OWN GCC (see the 
still-present lang/gcc-ooo), but that non-sense appears over...

OOo needs some serious patching to not even extract the "3rd party" 
components, and to force the OOo's build to use the already installed stuff.

This PR is about OOo, not ICU. I'll reassign it. Yours,

 -mi
Comment 3 Mikhail Teterin freebsd_committer freebsd_triage 2008-03-17 16:18:30 UTC
State Changed
From-To: feedback->open

An OOo problem. 


Comment 4 Mikhail Teterin freebsd_committer freebsd_triage 2008-03-17 16:18:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->openoffice

An OOo problem.
Comment 5 hashiz 2008-04-21 07:27:24 UTC
A direct cause is version mismatch with header and library.
  - At compile time, system(ports) icu was used.
  - At linkage time, OOo bundled icu was used.

In
/usr/ports/editors/openoffice.org-2/work/OOH680_m12/vcl/source/glyphs/makefile.mk
    .IF "$(SYSTEM_FREETYPE)" == "YES"
    CFLAGS+=-DSYSTEM_FREETYPE $(FREETYPE_CFLAGS)
    .IF "$(USE_FT_EMBOLDEN)" == "YES"
    CFLAGS+=-DUSE_FT_EMBOLDEN
    .ENDIF
    .ENDIF

CFLAGS set to '-I/usr/local/include' if 'SYSTEM_FREETYPE' is yes.

So, OOo bundled icu header was shadowed by system's one.

A system(ports) icu header (ver 3.8) located in
    /usr/local/include/unicode/*.h

OOo bundled icu header (ver 3.6) located in
    /usr/ports/editors/openoffice.org-2/work/OOH680_m12/solver/680/unxfbsdi.pro/inc/external/unicode/*.h

Following command line cause this mismatch.

Making: ../../unxfbsdi.pro/slo/gcach_layout.obj
c++ -fmessage-length=0 -c -Os -fno-strict-aliasing -fvisibility=hidden
-DSYSTEM_FREETYPE -I/usr/local/include/freetype2 -I/usr/local/include
-DUSE_FT_EMBOLDEN -I. -I../../unxfbsdi.pro/inc/glyphs -I../inc
-I../../inc/pch -I../../inc -I../../unx/inc -I../../unxfbsdi.pro/inc
-I. -I/usr/ports/editors/openoffice.org-2/work/OOH680_m12/solver/680/unxfbsdi.pro/inc/stl
-I/usr/ports/editors/openoffice.org-2/work/OOH680_m12/solver/680/unxfbsdi.pro/inc/external
-I/usr/ports/editors/openoffice.org-2/work/OOH680_m12/solver/680/unxfbsdi.pro/inc
-I/usr/ports/editors/openoffice.org-2/work/OOH680_m12/solenv/unxfbsdi/inc
-I/usr/ports/editors/openoffice.org-2/work/OOH680_m12/solenv/inc
-I/usr/ports/editors/openoffice.org-2/work/OOH680_m12/res
-I/usr/ports/editors/openoffice.org-2/work/OOH680_m12/solver/680/unxfbsdi.pro/inc/stl
-I/usr/ports/editors/openoffice.org-2/work/OOH680_m12/solenv/inc/Xp31
-I/usr/local/jdk1.5.0/include -I/usr/local/jdk1.5.0/include/freebsd
-I/usr/local/jdk1.5.0/include/bsd -I/usr/local/jdk1.5.0/include/linux
-I/usr/local/jdk1.5.0/include/native_threads/include
-I/usr/local/include
-I/usr/ports/editors/openoffice.org-2/work/OOH680_m12/solver/680/unxfbsdi.pro/inc/offuh
-I. -I../../res -I. -pipe -mtune=pentiumpro
-fvisibility-inlines-hidden -g -Wall -Wextra -Wendif-labels -Wshadow
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fpic -DFREEBSD -DUNX
-DVCL -DGCC -DC341 -DINTEL -DCVER=C341 -DX86 -D_PTHREADS -D_REENTRANT
-DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=450
-DHAVE_GCC_VISIBILITY_FEATURE -D__DMAKE -DUNIX -DCPPU_ENV=gcc3
-DGXX_INCLUDE_PATH=/usr/include/c++/4.2 -DSUPD=680 -DPRODUCT -DNDEBUG
-DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DCUI -DSOLAR_JAVA
-DOOH680=OOH680 -DUSE_BUILTIN_RASTERIZER -DVCL_DLLIMPLEMENTATION
-DSHAREDLIB -D_DLL_ -fexceptions -fno-enforce-eh-specs -DEXCEPTIONS_ON
-o ../../unxfbsdi.pro/slo/gcach_layout.o
/usr/ports/editors/openoffice.org-2/work/OOH680_m12/vcl/source/glyphs/gcach_layout.cxx
Comment 6 Marcin Cieślak 2008-04-23 10:44:01 UTC
This is the same bug as in

http://www.freebsd.org/cgi/query-pr.cgi?pr=123008

There is a patch to test already available. Please close this issue.
-- 
               << Marcin Cieslak // saper@saper.info >>
Comment 7 Marcin Cieslak 2008-04-23 10:50:55 UTC
This is a multi-part message in MIME format.
Comment 8 Marcin Cieślak 2008-04-23 10:52:52 UTC
Er, sorry.

Please close ports/123008 and keep ports/121787
-- 
               << Marcin Cieslak // saper@saper.info >>
Comment 9 NAKATA Maho 2008-04-25 01:46:42 UTC
Hi Marcin,

Many thanks for patch submission.
I'd like to commit 1st/2nd patch. Both are fine.

In any case, adding WITH_SYSTEM_ICU knob is
just only a workaround :)

Please wait a while.

From: Marcin Cieslak <saper@system.pl>
Subject: ports/121787: Patch for OpenOffice.org to fix icu-3.8 breakage, as well as -CURRENT diablo-jdk breakage
Date: Wed, 23 Apr 2008 11:50:55 +0200

> Can you try this patch?
> 
> -------- Original Message --------
> Subject: CFT: Patch for OpenOffice.org to fix icu-3.8 breakage, as 
> well as	-CURRENT diablo-jdk breakage
> Date: Wed, 16 Apr 2008 22:00:44 -0400
> From: Coleman Kane <cokane@FreeBSD.org>
> Organization: FreeBSD Project
> To: ports@FreeBSD.org
> Newsgroups: gmane.os.freebsd.devel.ports
> 
> Hello everyone,
> 
> I've got a two-in-one patch I'd like to know if any volunteers would
> like to test to get ports/editors/openoffice.org-2-RC built and
> installed under the following circumstances where it may be failing:
> 
>    1. You've installed the devel/icu 3.8+ port, and the build gives you
> an undefined symbol named
> "_ZN7icu_3_814LEFontInstance16getStaticClassIDEv" error
>    2. You're running 8.0-CURRENT and the KSE stuff has been removed and
> you installed diablo-jdk. This may be crashing when it tries to run the
> java stuff during the OO.o build, causing the build to fail with obscure
> error messages.
> 
> My fix for #1, above, is to provide a new knob WITH_SYSTEM_ICU that
> tells configure to use the local-system's installed icu library, rather
> than the one that was shipped with the OO.o tarball. It seems that
> during the build, the include path unwittingly brings in your system
> headers, but then attempts to link against the shipped library. Both of
> these are incompatible APIs, and the result is an inability to resolve a
> symbol that is public in the OO.o version, but protected in the ports
> version. I am also attaching a patch for devel/icu that applies this
> permission change.
> 
> My fix for #2, above, is to set the build jdk to "bsdjava" for FreeBSD
> 8.0+, which results in having Mk/bsd.java.mk look for the ports
> source-build rather than using the diablo-jdk for doing java compiles.
> For other versions of FreeBSD, the default is left at what it was before
> (diablo, then ports).
> 
> -- 
> Coleman Kane
>
Comment 10 olivier 2008-04-25 02:38:32 UTC
Hi there!

It did not work for me, even with the new knob - still complaining
about ICU. I just noticed that the missing symbol mentions icu_3_814
but I have icu-3.8.1.1 installed (I suspect that these are 2 different
version numbers...) Where does the patch (or the new knob) get its
version number from?

Cheers
Olivier


On 4/23/08, Marcin Cieslak <saper@system.pl> wrote:
> Can you try this patch?
>
> -------- Original Message --------
> Subject: CFT: Patch for OpenOffice.org to fix icu-3.8 breakage, as
> well as	-CURRENT diablo-jdk breakage
> Date: Wed, 16 Apr 2008 22:00:44 -0400
> From: Coleman Kane <cokane@FreeBSD.org>
> Organization: FreeBSD Project
> To: ports@FreeBSD.org
> Newsgroups: gmane.os.freebsd.devel.ports
>
> Hello everyone,
>
> I've got a two-in-one patch I'd like to know if any volunteers would
> like to test to get ports/editors/openoffice.org-2-RC built and
> installed under the following circumstances where it may be failing:
>
>    1. You've installed the devel/icu 3.8+ port, and the build gives you
> an undefined symbol named
> "_ZN7icu_3_814LEFontInstance16getStaticClassIDEv" error
>    2. You're running 8.0-CURRENT and the KSE stuff has been removed and
> you installed diablo-jdk. This may be crashing when it tries to run the
> java stuff during the OO.o build, causing the build to fail with obscure
> error messages.
>
> My fix for #1, above, is to provide a new knob WITH_SYSTEM_ICU that
> tells configure to use the local-system's installed icu library, rather
> than the one that was shipped with the OO.o tarball. It seems that
> during the build, the include path unwittingly brings in your system
> headers, but then attempts to link against the shipped library. Both of
> these are incompatible APIs, and the result is an inability to resolve a
> symbol that is public in the OO.o version, but protected in the ports
> version. I am also attaching a patch for devel/icu that applies this
> permission change.
>
> My fix for #2, above, is to set the build jdk to "bsdjava" for FreeBSD
> 8.0+, which results in having Mk/bsd.java.mk look for the ports
> source-build rather than using the diablo-jdk for doing java compiles.
> For other versions of FreeBSD, the default is left at what it was before
> (diablo, then ports).
>
> --
> Coleman Kane
>
>


-- 
Olivier Gautherot
olivier@gautherot.net
Cel:+56 98 730 9361
www.gautherot.net
http://www.linkedin.com/in/ogautherot
Comment 11 Michael Moll freebsd_committer freebsd_triage 2008-04-25 17:10:32 UTC
Hi,

On Wed, Apr 23, 2008 at 11:50:55AM +0200, Marcin Cieslak wrote:
> Can you try this patch?


I rebuilt icu and then openoffice with system-icu enabled, works fine.
I see the problem that users maybe don't know that they _must_ enable
system-icu when icu is installed. Otherwise everything is good.

cu
-- 
Kvedulv / Michael Moll
e-mail : kvedulv@kvedulv.de
  WWW  : http://www.kvedulv.de/
  GSM  : +49 175 606 7861
Comment 12 NAKATA Maho 2008-04-25 22:07:27 UTC
From: Kvedulv / Michael Moll <kvedulv@kvedulv.de>
Subject: Re: ports/121787: Patch for OpenOffice.org to fix icu-3.8 breakage, as well as -CURRENT diablo-jdk breakage
Date: Fri, 25 Apr 2008 18:10:32 +0200

> Hi,
> 
> On Wed, Apr 23, 2008 at 11:50:55AM +0200, Marcin Cieslak wrote:
> > Can you try this patch?
> 
> I rebuilt icu and then openoffice with system-icu enabled, works fine.

Great.
> I see the problem that users maybe don't know that they _must_ enable
> system-icu when icu is installed. Otherwise everything is good.

Right. This is the problem. This shuold be fixed in the future.

Thanks
-- Nakata Maho http://accc.riken.jp/maho/
Comment 13 dfilter service freebsd_committer freebsd_triage 2008-04-26 09:01:17 UTC
maho        2008-04-26 08:01:13 UTC

  FreeBSD ports repository

  Modified files:
    editors/openoffice.org-2 Makefile 
    editors/openoffice.org-2/files Makefile.knobs 
    editors/openoffice.org-2-RC Makefile 
    editors/openoffice.org-2-RC/files Makefile.knobs 
    editors/openoffice.org-2-devel Makefile 
    editors/openoffice.org-2-devel/files Makefile.knobs 
    editors/openoffice.org-3-devel Makefile 
    editors/openoffice.org-3-devel/files Makefile.knobs 
  Log:
  Add WITH_SYSTEM_ICU knob. Activate when devel/icu is installed.
  Fix build -CURRENT diablo-jdk breakage
  
  PR:             121787
  Submitted by:   Michael Moll
  Patch submitted by: Marcin Cieslak <saper@system.pl>
  
  Revision  Changes    Path
  1.334     +4 -0      ports/editors/openoffice.org-2-RC/Makefile
  1.53      +13 -1     ports/editors/openoffice.org-2-RC/files/Makefile.knobs
  1.362     +4 -0      ports/editors/openoffice.org-2-devel/Makefile
  1.53      +13 -1     ports/editors/openoffice.org-2-devel/files/Makefile.knobs
  1.302     +4 -0      ports/editors/openoffice.org-2/Makefile
  1.53      +13 -1     ports/editors/openoffice.org-2/files/Makefile.knobs
  1.374     +4 -0      ports/editors/openoffice.org-3-devel/Makefile
  1.53      +14 -2     ports/editors/openoffice.org-3-devel/files/Makefile.knobs
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 14 Guido Falsi freebsd_committer freebsd_triage 2008-04-30 16:28:11 UTC
I have tried compiling openoffice after cvsupping, but it looks like it
will not compile, because icu needs to be patched too, to make
setBreakType() public as in the patch posted by saper@system.pl.

Openoffice bails out of configure stating just that.

Was that part of the patch ignored because it was creating problems
with other ports?

-- 
Guido Falsi <mad@madpilot.net>
Comment 15 Marcin Cieslak 2008-04-30 18:19:36 UTC
This is a multi-part message in MIME format.
Comment 16 mi+mill 2008-04-30 18:24:41 UTC
George, would you, please, comment for the record?

 http://www.freebsd.org/cgi/query-pr.cgi?pr=3D121787

Thanks!

 -mi

=D3=C5=D2=C5=C4=C1 30 =CB=D7=A6=D4=C5=CE=D8 2008 01:19 =D0=CF, Marcin Ciesl=
ak =F7=C9 =CE=C1=D0=C9=D3=C1=CC=C9:
> Hello,
>
> Is it possible to include this patch in the devel/icu port (and maybe
> check if it has been submitted upstream?)
>
> This patch allows OpenOffice.org to use icu from ports.
>
> This patch has been proposed by Coleman Kane <cokane@FreeBSD.org>.
>
> http://thread.gmane.org/gmane.os.freebsd.devel.ports/75072
>
> --Marcin
Comment 17 Coleman Kane freebsd_committer freebsd_triage 2008-04-30 18:28:54 UTC
I have posted the proper fix for the root cause of this in the OO.o
system. It is slated for 2.4.1, and will stop using an included version
of ICU (and instead use the system's version). I have ICU 3.8 installed,
and I am using the WITH_SYSTEM_ICU, so far it runs great.

When this fix hits the upstream tree, we should be able to remove the
extra WITH_SYSTEM_ICU knob and the patches to the code. It is issue
#88411.

OOo Issue Link: http://www.openoffice.org/issues/show_bug.cgi?id=88411

-- 
Coleman Kane
Comment 18 mi+icu 2008-04-30 23:25:09 UTC
Dear ICU-developers!

I maintain FreeBSD port of ICU and am under pressure to commit a patch, tha=
t=20
would allow OpenOffice.org to use the already installed ICU instead of=20
building its own modified version:

 http://www.freebsd.org/cgi/query-pr.cgi?pr=3D121787

In the past, George Rhoten advised me, that it is ICU's position, that the =
bug=20
is in OOo, and that "better" patches exist -- for the OOo.

Could you, please, elaborate? We -- the FreeBSD porters -- would really lik=
e=20
to avoid duplication...

George just notified us, that he no longer participates in ICU.

Thanks! Yours,

 -mi

=D3=C5=D2=C5=C4=C1 30 =CB=D7=A6=D4=C5=CE=D8 2008 01:19 =D0=CF, Marcin Ciesl=
ak =F7=C9 =CE=C1=D0=C9=D3=C1=CC=C9:
> Hello,
>
> Is it possible to include this patch in the devel/icu port (and maybe
> check if it has been submitted upstream?)
>
> This patch allows OpenOffice.org to use icu from ports.
>
> This patch has been proposed by Coleman Kane <cokane@FreeBSD.org>.
>
> http://thread.gmane.org/gmane.os.freebsd.devel.ports/75072
>
> --Marcin
Comment 19 srl 2008-04-30 23:55:09 UTC
Hello,
 Indeed, George is not working on ICU anymore. 
 I will take a look at the bug. We definitely would NOT like to see 
"special" versions of ICU out there if it can be avoided.

-s

Mikhail T. wrote:
> Dear ICU-developers!
>
> I maintain FreeBSD port of ICU and am under pressure to commit a patch, that 
> would allow OpenOffice.org to use the already installed ICU instead of 
> building its own modified version:
>
>  http://www.freebsd.org/cgi/query-pr.cgi?pr=121787
>
> In the past, George Rhoten advised me, that it is ICU's position, that the bug 
> is in OOo, and that "better" patches exist -- for the OOo.
>
> Could you, please, elaborate? We -- the FreeBSD porters -- would really like 
> to avoid duplication...
>
> George just notified us, that he no longer participates in ICU.
>
> Thanks! Yours,
>
>  -mi
>
> ÓÅÒÅÄÁ 30 ËצÔÅÎØ 2008 01:19 ÐÏ, Marcin Cieslak ?ÎÁÐÉÓÁÌÉ:
>   
>> Hello,
>>
>> Is it possible to include this patch in the devel/icu port (and maybe
>> check if it has been submitted upstream?)
>>
>> This patch allows OpenOffice.org to use icu from ports.
>>
>> This patch has been proposed by Coleman Kane <cokane@FreeBSD.org>.
>>
>> http://thread.gmane.org/gmane.os.freebsd.devel.ports/75072
>>
>> --Marcin
>>     
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> icu-support mailing list - icu-support@lists.sourceforge.net
> To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support
>
Comment 20 srl 2008-05-01 00:06:39 UTC
setBreakType() SHOULD NOT be called by a parent class or a subclass.

Instead, use

BreakIterator::create*Instance() 
http://www.icu-project.org/apiref/icu4c/classBreakIterator.html

You could call it from within a switch statement.

or the parameterized (in C)

ubrk_open( UBreakIteratorType  ) 
http://www.icu-project.org/apiref/icu4c/ubrk_8h.html

ICU does not need to be modified.

-s
Comment 21 srl 2008-05-01 00:09:25 UTC
There is a temporary patch at

http://bugs.icu-project.org/trac/ticket/5498

, but longer term, setBreakType() should not be called from a parent 
class or a subclass.

Instead, use

BreakIterator::create*Instance(â¦) 
http://www.icu-project.org/apiref/icu4c/classBreakIterator.html

You could call it from within a switch statement.

or the parameterized (in C)

ubrk_open( UBreakIteratorType ⦠) 
http://www.icu-project.org/apiref/icu4c/ubrk_8h.html

ICU does not need to be modified for this case.

-s

Mikhail T. wrote:
> Dear ICU-developers!
>
> I maintain FreeBSD port of ICU and am under pressure to commit a patch, that 
> would allow OpenOffice.org to use the already installed ICU instead of 
> building its own modified version:
>
>  http://www.freebsd.org/cgi/query-pr.cgi?pr=121787
>
> In the past, George Rhoten advised me, that it is ICU's position, that the bug 
> is in OOo, and that "better" patches exist -- for the OOo.
>
> Could you, please, elaborate? We -- the FreeBSD porters -- would really like 
> to avoid duplication...
>
> George just notified us, that he no longer participates in ICU.
>
> Thanks! Yours,
>
>  -mi
>
> ÑеÑеда 30 квÑÑÐµÐ½Ñ 2008 01:19 по, Marcin Cieslak Ðи напиÑали:
>   
>> Hello,
>>
>> Is it possible to include this patch in the devel/icu port (and maybe
>> check if it has been submitted upstream?)
>>
>> This patch allows OpenOffice.org to use icu from ports.
>>
>> This patch has been proposed by Coleman Kane <cokane@FreeBSD.org>.
>>
>> http://thread.gmane.org/gmane.os.freebsd.devel.ports/75072
>>
>> --Marcin
>>     
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> icu-support mailing list - icu-support@lists.sourceforge.net
> To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support
>
Comment 22 Marcin Cieslak 2008-05-01 02:45:56 UTC
Steven R. Loomis wrote:
> There is a temporary patch at
> 
> http://bugs.icu-project.org/trac/ticket/5498
> 
> , but longer term, setBreakType() should not be called from a parent 
> class or a subclass.
> 
> Instead, use
> 
> BreakIterator::create*Instance(â¦) 
> http://www.icu-project.org/apiref/icu4c/classBreakIterator.html
> 
> You could call it from within a switch statement.
> 
> or the parameterized (in C)
> 
> ubrk_open( UBreakIteratorType ⦠) 
> http://www.icu-project.org/apiref/icu4c/ubrk_8h.html
> 
> ICU does not need to be modified for this case.


In some cases, OpenOffice.org loads pre-compiled rules (for example, 
there are three different word iteration modes, with exceptions for some 
languages). Source for those custom rules is here:

http://l10n.openoffice.org/source/browse/l10n/i18npool/source/breakiterator/data/

(dict_word_xxx, edit_word_xxx, count_word_xxx indicate different word 
iteration modes).

OOo function loads binary images on demand in a similar way as this is 
done in BreakIterator::buildInstance:

     UDataMemory* file = udata_open(U_ICUDATA_BRKITR, ext, fnbuff, &status);
     if (U_FAILURE(status)) {
         ures_close(b);
         return NULL;
     }

     // Create a RuleBasedBreakIterator
     result = new RuleBasedBreakIterator(file, status);

     // If there is a result, set the valid locale and actual locale, 
and the kind
     if (U_SUCCESS(status) && result != NULL) {
         U_LOCALE_BASED(locBased, *(BreakIterator*)result);
         locBased.setLocaleIDs(ures_getLocaleByType(b, 
ULOC_VALID_LOCALE, &status), actualLocale);
         result->setBreakType(kind);
     }

OOO.org bundles a version of ICU 3.6.

I think that similar problem was already discussed there:

http://www.nabble.com/Minor-changes-needed-to-ICULanguageBreakFactory-(ICU4C)-td10069414.html

Can we achieve loading custom rules and have them still bound with 
locale and break type information in some elegant way?

Is there any way we can use "ICULanguageBreakFactory" for this? Or maybe 
the above-quoted interface from BreakIterator::buildInstance() could be 
somehow exposed (we supply complete UDataMemory* structure)?

The code doing this is here:

http://l10n.openoffice.org/source/browse/l10n/i18npool/source/breakiterator/breakiterator_unicode.cxx?rev=1.34&view=markup

I have started scribbling some notes on this:

http://wiki.services.openoffice.org/wiki/LoadICUBreakIterator

I might have missed something obvious, though.

--Marcin












-- 
               << Marcin Cieslak // saper@system.pl >>
Comment 23 Coleman Kane freebsd_committer freebsd_triage 2008-05-01 18:03:26 UTC
The following OOo Bug (#88411) should be linked here. It is a fix to
what OOo does now:
http://www.openoffice.org/issues/show_bug.cgi?id=88411

I also linked it in the wiki page that was posted here.

-- 
Coleman Kane
Comment 24 Jung-uk Kim freebsd_committer freebsd_triage 2008-06-26 19:54:26 UTC
I think the attached patch should fix build with system Freetype2 and 
internal ICU 3.6 build problem.  Please test.

Thanks,

Jung-uk Kim
Comment 25 dfilter service freebsd_committer freebsd_triage 2008-07-20 07:31:38 UTC
maho        2008-07-20 06:31:25 UTC

  FreeBSD ports repository

  Added files:
    editors/openoffice.org-3/files patch-i91861 
    editors/openoffice.org-3-RC/files patch-i91861 
    editors/openoffice.org-3-devel/files patch-i91861 
  Log:
  Fix build with SYSTEM_FREETYPE when devel/icu is
  installed.
  
  PR:             121787
  Submitted by:   jkim
  
  Revision  Changes    Path
  1.1       +26 -0     ports/editors/openoffice.org-3-RC/files/patch-i91861 (new)
  1.1       +26 -0     ports/editors/openoffice.org-3-devel/files/patch-i91861 (new)
  1.1       +26 -0     ports/editors/openoffice.org-3/files/patch-i91861 (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 26 dfilter service freebsd_committer freebsd_triage 2008-07-20 09:49:49 UTC
maho        2008-07-20 08:49:35 UTC

  FreeBSD ports repository

  Added files:
    editors/openoffice.org-2/files patch-i91861 
    editors/openoffice.org-2-RC/files patch-i91861 
  Log:
  Fix build with SYSTEM_FREETYPE when devel/icu is
  installed.
  
  PR:             121787
  Submitted by:   jkim
  
  Revision  Changes    Path
  1.1       +26 -0     ports/editors/openoffice.org-2-RC/files/patch-i91861 (new)
  1.1       +26 -0     ports/editors/openoffice.org-2/files/patch-i91861 (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 27 Maho Nakata freebsd_committer freebsd_triage 2008-07-20 09:50:19 UTC
State Changed
From-To: open->closed

Now it has been fixed, thanks for your submission.