You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Pedro Giffuni <pf...@apache.org> on 2011/11/06 23:48:26 UTC

Module VCL doesn't link external ICU

Ugh.. I'm still struggling with the BSD build, and
apparently it should be simple but perhaps someone
that knows well the build structure can give me a good hint:

=============
Building module vcl
=============

Entering /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/vcl/prj

cd .. && gmake -s -r -j1 
[ build LNK ] Library/libvcl.so
/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o: In function `IcuLayoutEngine::operator()(ServerFontLayout&, ImplLayoutArgs&)':
gcach_layout.cxx:(.text+0x7f4): undefined reference to `uscript_getScript_48'
gcach_layout.cxx:(.text+0x853): undefined reference to `icu_48::LayoutEngine::layoutEngineFactory(icu_48::LEFontInstance const*, int, int, LEErrorCode&)'
gcach_layout.cxx:(.text+0x8f4): undefined reference to `icu_48::LayoutEngine::ge 
tGlyphs(unsigned int*, LEErrorCode&) const

...
/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/gdi/sallayout.o: In function `ImplLayoutArgs::ImplLayoutArgs(unsigned short const*, int, int, int, int)':
sallayout.cxx:(.text+0x153e): undefined reference to `ubidi_openSized_48'
sallayout.cxx:(.text+0x1563): undefined reference to `ubidi_setPara_48'
sallayout.cxx:(.text+0x157b): undefined reference to `ubidi_openSized_48'
sallayout.cxx:(.text+0x1592): undefined reference to `ubidi_setLine_48'
sallayout.cxx:(.text+0x159f): undefined reference to `ubidi_countRuns_48'
sallayout.cxx:(.text+0x15c7): undefined reference to `ubidi_getVisualRun_48'
sallayout.cxx:(.text+0x15f9): undefined reference to `ubidi_close_48'
sallayout.cxx:(.text+0x1601): undefined reference to `ubidi_close_48'
/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/gdi/sallayout.o: In function `GetMirroredChar(unsigned int)':
sallayout.cxx:(.text+0xc51): undefined reference to `u_charMirror_48'
gmake: *** [/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/LinkTarget/Library/libvcl.so] Error 1
dmake:  Error code 2, while making 'all'
____

Going verbose just shows a lot of objects being linked
but not ICU which is the missing piece.

Part of the problem is that I have to use some external
libraries and this ends up catching the external ICU,
but in any case there is --with-system-icu so this
should be OK.

So ... how can I fix this?

Thanks in advance,

Pedro.


Re: Module VCL doesn't link external ICU

Posted by Pedro Giffuni <pf...@apache.org>.
Hi;

After reviewing again the linking I arrived to the
conclusion the problem is not in the linking
command.

I think the problem is some incompatibility between
icu 4.8.1 (which is used by the system) and the
very outdated version expected by OOo:

http://linuxtesting.org/upstream-tracker/compat_reports/icu4c/4.6.1_to_4.8/abi_compat_report.html

For the time being I am building the internal ICU
and crossing fingers so that it doesn't cause trouble
with some other external libraries :(.

cheers,

Pedro. 

--- On Thu, 11/10/11, Ariel Constenla-Haile wrote:

> Hello Pedro,
> 
> On Thu, Nov 10, 2011 at 04:34:13PM -0800, Pedro Giffuni
> wrote:
> > Hi Ariel;
> > 
> > Unfortunately I still have problems building vcl with
> > the external ICU:
> > 
> > [ build DEP ] LNK:StaticLibrary/libvclmain.a
> > R=/usr/ports/editors/openoffice.org-3-devel/work/ooo
> && S=$R/main && O=$S/solver/340/unxfbsdx.pro
> && W=$O/workdir &&  mkdir -p
> $W/Dep/LinkTarget/StaticLibrary/ &&
> RESPONSEFILE=/tmp/gbuild.uNSUdc && cat
> ${RESPONSEFILE} /dev/null | xargs -n 200 cat >
> $W/Dep/LinkTarget/StaticLibrary/libvclmain.a.d && rm
> -f ${RESPONSEFILE}
> > [ build DEP ] LNK:Library/libvcl.so
> > R=/usr/ports/editors/openoffice.org-3-devel/work/ooo
> && S=$R/main && O=$S/solver/340/unxfbsdx.pro
> && W=$O/workdir &&  mkdir -p
> $W/Dep/LinkTarget/Library/ &&
> RESPONSEFILE=/tmp/gbuild.MjHeWC && cat
> ${RESPONSEFILE} /dev/null | xargs -n 200 cat >
> $W/Dep/LinkTarget/Library/libvcl.so.d && rm -f
> ${RESPONSEFILE}
> > [ build LNK ] Library/libvcl.so
> R=/usr/ports/editors/openoffice.org-3-devel/work/ooo
> && 
> S=$R/main && 
> O=$S/solver/340/unxfbsdx.pro && 
> W=$O/workdir &&  
> mkdir -p $W/LinkTarget/Library/ && 
> c++ -shared 
> -Wl,-z,noexecstack 
> -Wl,-z,origin 
> -Wl,-rpath,'$ORIGIN:$ORIGIN/../ure-link/lib' 
> -Wl,-rpath-link,'$O/lib' 
> 
> -Wl,-rpath-link=:/lib:/usr/lib:/usr/local/lib  <---
> ok
> 
> -Wl,-z,combreloc 
> -Wl,-z,defs   
> -L$S/solenv/unxfbsdx/lib 
> -L$O/lib 
> -L$S/solenv/unxfbsdx/lib 
> -L/usr/local/openjdk6/lib 
> -L/usr/local/openjdk6/jre/lib/amd64 
> -L/usr/local/openjdk6/jre/lib/amd64/server 
> -L/usr/local/openjdk6/jre/lib/amd64/native_threads 
> 
> -L/usr/local/lib    <--- ok
> 
> -Wl,--hash-style=both  
> -Wl,--dynamic-list-cpp-new 
> -Wl,--dynamic-list-cpp-typeinfo 
> -Wl,-Bsymbolic-functions  
> -ltl -lutl -lsot -lucbhelper4gcc3 -lbasegfx -lcomphelpgcc3
> -luno_cppuhelpergcc3 
> 
> -licuuc -licule  <--- ok
> 
> -li18nisolang1gcc3 -li18npaper -li18nutilgcc3 
> -ljvmaccessgcc3 -lstdc++ -luno_cppu -luno_sal -lvos3gcc3
> -lfreetype  
> ....
> -Wl,--start-group  -Wl,--end-group -o
> $W/LinkTarget/Library/libvcl.so
> 
> the command looks ok
> 
> 
> >
> /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o:
> In function
> `IcuLayoutEngine::operator()(ServerFontLayout&,
> ImplLayoutArgs&)':
> > gcach_layout.cxx:(.text+0x7f4): undefined reference to
> `uscript_getScript_48'
> > gcach_layout.cxx:(.text+0x853): undefined reference to
> `icu_48::LayoutEngine::layoutEngineFactory(icu_48::LEFontInstance
> const*, int, int, LEErrorCode&)'
> > gcach_layout.cxx:(.text+0x8f4): undefined reference to
> `icu_48::LayoutEngine::getGlyphs(unsigned int*,
> LEErrorCode&) const'
> > gcach_layout.cxx:(.text+0x90e): undefined reference to
> `icu_48::LayoutEngine::getCharIndices(int*,
> LEErrorCode&) const'
> > gcach_layout.cxx:(.text+0x92c): undefined reference to
> `icu_48::LayoutEngine::getGlyphPositions(float*,
> LEErrorCode&) const'
> >
> /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o:
> In function
> `IcuFontFromServerFont::~IcuFontFromServerFont()':
> >
> gcach_layout.cxx:(.text._ZN21IcuFontFromServerFontD0Ev[_ZN21IcuFontFromServerFontD0Ev]+0x13):
> undefined reference to
> `icu_48::LEFontInstance::~LEFontInstance()'
> >
> gcach_layout.cxx:(.text._ZN21IcuFontFromServerFontD0Ev[_ZN21IcuFontFromServerFontD0Ev]+0x1c):
> undefined reference to `icu_48::UMemory::operator
> delete(void*)'
> 
> I thought you already solved this. Didn't you finish
> building vcl the
> other time? Is your solver clean? or is there a chance that
> you tried to
> build with the packaged icu and so you have these libs in
> solver? Now
> looks like it can't find icu 4.8 libs, this may be the case
> if the linker
> finds first an older icu (like the one in OOo)... 
> Do you have another icu version in the linker search path?
> I can't imagine other root cause :/
> 
> Regards
> -- 
> Ariel Constenla-Haile
> La Plata, Argentina
> 

Re: Module VCL doesn't link external ICU

Posted by Pedro Giffuni <pf...@apache.org>.

--- On Thu, 11/10/11, Ariel Constenla-Haile wrote:
...

> 
> I thought you already solved this. Didn't you finish
> building vcl the other time?

No, it's a little complex but I use a clean source
tarball to try different type of builds. For a while
I couldn't test the build with external dependencies
which has these specific issues.

> you tried to
> build with the packaged icu and so you have these libs in
> solver? Now
> looks like it can't find icu 4.8 libs, this may be the case
> if the linker
> finds first an older icu (like the one in OOo)... 

OOo icu is not built.

> Do you have another icu version in the linker search path?

No. I verified my environment is sane :(

> I can't imagine other root cause :/
>

I have tried testing other differences between the linux
gbuild and the freebsd gbuild but I still can't find what
is wrong. The updates I did before did clean other issues,
and Maho@ has been able to build OOo-3.4 with some ugly
hacks so.. I guess we can solve this with some brute force
linking :(.

Thanks anyways,

Pedro.

Re: Module VCL doesn't link external ICU

Posted by Ariel Constenla-Haile <ar...@gmail.com>.
Hello Pedro,

On Thu, Nov 10, 2011 at 04:34:13PM -0800, Pedro Giffuni wrote:
> Hi Ariel;
> 
> Unfortunately I still have problems building vcl with
> the external ICU:
> 
> [ build DEP ] LNK:StaticLibrary/libvclmain.a
> R=/usr/ports/editors/openoffice.org-3-devel/work/ooo && S=$R/main && O=$S/solver/340/unxfbsdx.pro && W=$O/workdir &&  mkdir -p $W/Dep/LinkTarget/StaticLibrary/ && RESPONSEFILE=/tmp/gbuild.uNSUdc && cat ${RESPONSEFILE} /dev/null | xargs -n 200 cat > $W/Dep/LinkTarget/StaticLibrary/libvclmain.a.d && rm -f ${RESPONSEFILE}
> [ build DEP ] LNK:Library/libvcl.so
> R=/usr/ports/editors/openoffice.org-3-devel/work/ooo && S=$R/main && O=$S/solver/340/unxfbsdx.pro && W=$O/workdir &&  mkdir -p $W/Dep/LinkTarget/Library/ && RESPONSEFILE=/tmp/gbuild.MjHeWC && cat ${RESPONSEFILE} /dev/null | xargs -n 200 cat > $W/Dep/LinkTarget/Library/libvcl.so.d && rm -f ${RESPONSEFILE}
> [ build LNK ] Library/libvcl.so
R=/usr/ports/editors/openoffice.org-3-devel/work/ooo && 
S=$R/main && 
O=$S/solver/340/unxfbsdx.pro && 
W=$O/workdir &&  
mkdir -p $W/LinkTarget/Library/ && 
c++ -shared 
-Wl,-z,noexecstack 
-Wl,-z,origin 
-Wl,-rpath,'$ORIGIN:$ORIGIN/../ure-link/lib' 
-Wl,-rpath-link,'$O/lib' 

-Wl,-rpath-link=:/lib:/usr/lib:/usr/local/lib  <--- ok

-Wl,-z,combreloc 
-Wl,-z,defs   
-L$S/solenv/unxfbsdx/lib 
-L$O/lib 
-L$S/solenv/unxfbsdx/lib 
-L/usr/local/openjdk6/lib 
-L/usr/local/openjdk6/jre/lib/amd64 
-L/usr/local/openjdk6/jre/lib/amd64/server 
-L/usr/local/openjdk6/jre/lib/amd64/native_threads 

-L/usr/local/lib    <--- ok

-Wl,--hash-style=both  
-Wl,--dynamic-list-cpp-new 
-Wl,--dynamic-list-cpp-typeinfo 
-Wl,-Bsymbolic-functions  
-ltl -lutl -lsot -lucbhelper4gcc3 -lbasegfx -lcomphelpgcc3 -luno_cppuhelpergcc3 

-licuuc -licule  <--- ok

-li18nisolang1gcc3 -li18npaper -li18nutilgcc3 
-ljvmaccessgcc3 -lstdc++ -luno_cppu -luno_sal -lvos3gcc3 -lfreetype  
....
-Wl,--start-group  -Wl,--end-group -o $W/LinkTarget/Library/libvcl.so

the command looks ok


> /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o: In function `IcuLayoutEngine::operator()(ServerFontLayout&, ImplLayoutArgs&)':
> gcach_layout.cxx:(.text+0x7f4): undefined reference to `uscript_getScript_48'
> gcach_layout.cxx:(.text+0x853): undefined reference to `icu_48::LayoutEngine::layoutEngineFactory(icu_48::LEFontInstance const*, int, int, LEErrorCode&)'
> gcach_layout.cxx:(.text+0x8f4): undefined reference to `icu_48::LayoutEngine::getGlyphs(unsigned int*, LEErrorCode&) const'
> gcach_layout.cxx:(.text+0x90e): undefined reference to `icu_48::LayoutEngine::getCharIndices(int*, LEErrorCode&) const'
> gcach_layout.cxx:(.text+0x92c): undefined reference to `icu_48::LayoutEngine::getGlyphPositions(float*, LEErrorCode&) const'
> /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o: In function `IcuFontFromServerFont::~IcuFontFromServerFont()':
> gcach_layout.cxx:(.text._ZN21IcuFontFromServerFontD0Ev[_ZN21IcuFontFromServerFontD0Ev]+0x13): undefined reference to `icu_48::LEFontInstance::~LEFontInstance()'
> gcach_layout.cxx:(.text._ZN21IcuFontFromServerFontD0Ev[_ZN21IcuFontFromServerFontD0Ev]+0x1c): undefined reference to `icu_48::UMemory::operator delete(void*)'

I thought you already solved this. Didn't you finish building vcl the
other time? Is your solver clean? or is there a chance that you tried to
build with the packaged icu and so you have these libs in solver? Now
looks like it can't find icu 4.8 libs, this may be the case if the linker
finds first an older icu (like the one in OOo)... 
Do you have another icu version in the linker search path?
I can't imagine other root cause :/

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: Module VCL doesn't link external ICU

Posted by Pedro Giffuni <pf...@apache.org>.
Hi Ariel;

Unfortunately I still have problems building vcl with
the external ICU:

[ build DEP ] LNK:StaticLibrary/libvclmain.a
R=/usr/ports/editors/openoffice.org-3-devel/work/ooo && S=$R/main && O=$S/solver/340/unxfbsdx.pro && W=$O/workdir &&  mkdir -p $W/Dep/LinkTarget/StaticLibrary/ && RESPONSEFILE=/tmp/gbuild.uNSUdc && cat ${RESPONSEFILE} /dev/null | xargs -n 200 cat > $W/Dep/LinkTarget/StaticLibrary/libvclmain.a.d && rm -f ${RESPONSEFILE}
[ build DEP ] LNK:Library/libvcl.so
R=/usr/ports/editors/openoffice.org-3-devel/work/ooo && S=$R/main && O=$S/solver/340/unxfbsdx.pro && W=$O/workdir &&  mkdir -p $W/Dep/LinkTarget/Library/ && RESPONSEFILE=/tmp/gbuild.MjHeWC && cat ${RESPONSEFILE} /dev/null | xargs -n 200 cat > $W/Dep/LinkTarget/Library/libvcl.so.d && rm -f ${RESPONSEFILE}
[ build LNK ] Library/libvcl.so
R=/usr/ports/editors/openoffice.org-3-devel/work/ooo && S=$R/main && O=$S/solver/340/unxfbsdx.pro && W=$O/workdir &&  mkdir -p $W/LinkTarget/Library/ && c++ -shared -Wl,-z,noexecstack -Wl,-z,origin -Wl,-rpath,'$ORIGIN:$ORIGIN/../ure-link/lib' -Wl,-rpath-link,'$O/lib' -Wl,-rpath-link=:/lib:/usr/lib:/usr/local/lib -Wl,-z,combreloc -Wl,-z,defs   -L$S/solenv/unxfbsdx/lib -L$O/lib -L$S/solenv/unxfbsdx/lib -L/usr/local/openjdk6/lib -L/usr/local/openjdk6/jre/lib/amd64 -L/usr/local/openjdk6/jre/lib/amd64/server -L/usr/local/openjdk6/jre/lib/amd64/native_threads -L/usr/local/lib  -Wl,--hash-style=both  -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions  -ltl -lutl -lsot -lucbhelper4gcc3 -lbasegfx -lcomphelpgcc3 -luno_cppuhelpergcc3 -licuuc -licule -li18nisolang1gcc3 -li18npaper -li18nutilgcc3 -ljvmaccessgcc3 -lstdc++ -luno_cppu -luno_sal -lvos3gcc3 -lfreetype  $W/CxxObject/vcl/source/glyphs/gcach_ftyp.o
 $W/CxxObject/vcl/source/glyphs/gcach_layout.o $W/CxxObject/vcl/source/glyphs/gcach_rbmp.o $W/CxxObject/vcl/source/glyphs/glyphcache.o $W/CxxObject/vcl/unx/generic/fontmanager/fontcache.o $W/CxxObject/vcl/unx/generic/fontmanager/fontconfig.o $W/CxxObject/vcl/unx/generic/fontmanager/fontmanager.o $W/CxxObject/vcl/unx/generic/fontmanager/helper.o $W/CxxObject/vcl/unx/generic/fontmanager/parseAFM.o $W/CxxObject/vcl/unx/generic/plugadapt/salplug.o $W/CxxObject/vcl/unx/generic/printer/cupsmgr.o $W/CxxObject/vcl/unx/generic/printer/jobdata.o $W/CxxObject/vcl/unx/generic/printer/ppdparser.o $W/CxxObject/vcl/unx/generic/printer/printerinfomanager.o $W/CxxObject/vcl/source/app/dbggui.o $W/CxxObject/vcl/source/app/dndhelp.o $W/CxxObject/vcl/source/app/help.o $W/CxxObject/vcl/source/app/i18nhelp.o $W/CxxObject/vcl/source/app/idlemgr.o $W/CxxObject/vcl/source/app/salvtables.o $W/CxxObject/vcl/source/app/session.o $W/CxxObject/vcl/source/app/settings.o
 $W/CxxObject/vcl/source/app/sound.o $W/CxxObject/vcl/source/app/stdtext.o $W/CxxObject/vcl/source/app/svapp.o $W/CxxObject/vcl/source/app/svdata.o $W/CxxObject/vcl/source/app/svmain.o $W/CxxObject/vcl/source/app/svmainhook.o $W/CxxObject/vcl/source/app/timer.o $W/CxxObject/vcl/source/app/unohelp2.o $W/CxxObject/vcl/source/app/unohelp.o $W/CxxObject/vcl/source/app/vclevent.o $W/CxxObject/vcl/source/components/display.o $W/CxxObject/vcl/source/components/dtranscomp.o $W/CxxObject/vcl/source/components/factory.o $W/CxxObject/vcl/source/components/fontident.o $W/CxxObject/vcl/source/components/rasterizer_rsvg.o $W/CxxObject/vcl/source/components/stringmirror.o $W/CxxObject/vcl/source/control/button.o $W/CxxObject/vcl/source/control/combobox.o $W/CxxObject/vcl/source/control/ctrl.o $W/CxxObject/vcl/source/control/edit.o $W/CxxObject/vcl/source/control/field2.o $W/CxxObject/vcl/source/control/field.o $W/CxxObject/vcl/source/control/fixbrd.o
 $W/CxxObject/vcl/source/control/fixed.o $W/CxxObject/vcl/source/control/group.o $W/CxxObject/vcl/source/control/ilstbox.o $W/CxxObject/vcl/source/control/imgctrl.o $W/CxxObject/vcl/source/control/longcurr.o $W/CxxObject/vcl/source/control/lstbox.o $W/CxxObject/vcl/source/control/menubtn.o $W/CxxObject/vcl/source/control/morebtn.o $W/CxxObject/vcl/source/control/quickselectionengine.o $W/CxxObject/vcl/source/control/scrbar.o $W/CxxObject/vcl/source/control/slider.o $W/CxxObject/vcl/source/control/spinbtn.o $W/CxxObject/vcl/source/control/spinfld.o $W/CxxObject/vcl/source/control/tabctrl.o $W/CxxObject/vcl/source/control/throbber.o $W/CxxObject/vcl/source/fontsubset/cff.o $W/CxxObject/vcl/source/fontsubset/fontsubset.o $W/CxxObject/vcl/source/fontsubset/gsub.o $W/CxxObject/vcl/source/fontsubset/list.o $W/CxxObject/vcl/source/fontsubset/sft.o $W/CxxObject/vcl/source/fontsubset/ttcr.o $W/CxxObject/vcl/source/fontsubset/xlat.o
 $W/CxxObject/vcl/source/gdi/alpha.o $W/CxxObject/vcl/source/gdi/animate.o $W/CxxObject/vcl/source/gdi/base14.o $W/CxxObject/vcl/source/gdi/bitmap2.o $W/CxxObject/vcl/source/gdi/bitmap3.o $W/CxxObject/vcl/source/gdi/bitmap4.o $W/CxxObject/vcl/source/gdi/bitmap.o $W/CxxObject/vcl/source/gdi/bitmapex.o $W/CxxObject/vcl/source/gdi/bmpacc2.o $W/CxxObject/vcl/source/gdi/bmpacc3.o $W/CxxObject/vcl/source/gdi/bmpacc.o $W/CxxObject/vcl/source/gdi/bmpconv.o $W/CxxObject/vcl/source/gdi/bmpfast.o $W/CxxObject/vcl/source/gdi/configsettings.o $W/CxxObject/vcl/source/gdi/cvtgrf.o $W/CxxObject/vcl/source/gdi/cvtsvm.o $W/CxxObject/vcl/source/gdi/extoutdevdata.o $W/CxxObject/vcl/source/gdi/font.o $W/CxxObject/vcl/source/gdi/gdimtf.o $W/CxxObject/vcl/source/gdi/gfxlink.o $W/CxxObject/vcl/source/gdi/gradient.o $W/CxxObject/vcl/source/gdi/graph.o $W/CxxObject/vcl/source/gdi/graphictools.o $W/CxxObject/vcl/source/gdi/hatch.o $W/CxxObject/vcl/source/gdi/image.o
 $W/CxxObject/vcl/source/gdi/imagerepository.o $W/CxxObject/vcl/source/gdi/impanmvw.o $W/CxxObject/vcl/source/gdi/impbmp.o $W/CxxObject/vcl/source/gdi/impgraph.o $W/CxxObject/vcl/source/gdi/impimage.o $W/CxxObject/vcl/source/gdi/impimagetree.o $W/CxxObject/vcl/source/gdi/impvect.o $W/CxxObject/vcl/source/gdi/jobset.o $W/CxxObject/vcl/source/gdi/lineinfo.o $W/CxxObject/vcl/source/gdi/mapmod.o $W/CxxObject/vcl/source/gdi/metaact.o $W/CxxObject/vcl/source/gdi/metric.o $W/CxxObject/vcl/source/gdi/octree.o $W/CxxObject/vcl/source/gdi/oldprintadaptor.o $W/CxxObject/vcl/source/gdi/outdev2.o $W/CxxObject/vcl/source/gdi/outdev3.o $W/CxxObject/vcl/source/gdi/outdev4.o $W/CxxObject/vcl/source/gdi/outdev5.o $W/CxxObject/vcl/source/gdi/outdev6.o $W/CxxObject/vcl/source/gdi/outdev.o $W/CxxObject/vcl/source/gdi/outdevnative.o $W/CxxObject/vcl/source/gdi/outmap.o $W/CxxObject/vcl/source/gdi/pdfextoutdevdata.o $W/CxxObject/vcl/source/gdi/pdffontcache.o
 $W/CxxObject/vcl/source/gdi/pdfwriter.o $W/CxxObject/vcl/source/gdi/pdfwriter_impl2.o $W/CxxObject/vcl/source/gdi/pdfwriter_impl.o $W/CxxObject/vcl/source/gdi/pngread.o $W/CxxObject/vcl/source/gdi/pngwrite.o $W/CxxObject/vcl/source/gdi/print2.o $W/CxxObject/vcl/source/gdi/print3.o $W/CxxObject/vcl/source/gdi/print.o $W/CxxObject/vcl/source/gdi/regband.o $W/CxxObject/vcl/source/gdi/region.o $W/CxxObject/vcl/source/gdi/rendergraphic.o $W/CxxObject/vcl/source/gdi/rendergraphicrasterizer.o $W/CxxObject/vcl/source/gdi/salgdilayout.o $W/CxxObject/vcl/source/gdi/sallayout.o $W/CxxObject/vcl/source/gdi/salmisc.o $W/CxxObject/vcl/source/gdi/salnativewidgets-none.o $W/CxxObject/vcl/source/gdi/svgread.o $W/CxxObject/vcl/source/gdi/textlayout.o $W/CxxObject/vcl/source/gdi/virdev.o $W/CxxObject/vcl/source/gdi/wall.o $W/CxxObject/vcl/source/helper/canvasbitmap.o $W/CxxObject/vcl/source/helper/canvastools.o $W/CxxObject/vcl/source/helper/evntpost.o
 $W/CxxObject/vcl/source/helper/lazydelete.o $W/CxxObject/vcl/source/helper/strhelper.o $W/CxxObject/vcl/source/helper/threadex.o $W/CxxObject/vcl/source/helper/xconnection.o $W/CxxObject/vcl/source/salmain/salmain.o $W/CxxObject/vcl/source/window/abstdlg.o $W/CxxObject/vcl/source/window/accel.o $W/CxxObject/vcl/source/window/accmgr.o $W/CxxObject/vcl/source/window/arrange.o $W/CxxObject/vcl/source/window/brdwin.o $W/CxxObject/vcl/source/window/btndlg.o $W/CxxObject/vcl/source/window/cmdevt.o $W/CxxObject/vcl/source/window/cursor.o $W/CxxObject/vcl/source/window/decoview.o $W/CxxObject/vcl/source/window/dialog.o $W/CxxObject/vcl/source/window/dlgctrl.o $W/CxxObject/vcl/source/window/dndevdis.o $W/CxxObject/vcl/source/window/dndlcon.o $W/CxxObject/vcl/source/window/dockingarea.o $W/CxxObject/vcl/source/window/dockmgr.o $W/CxxObject/vcl/source/window/dockwin.o $W/CxxObject/vcl/source/window/floatwin.o $W/CxxObject/vcl/source/window/introwin.o
 $W/CxxObject/vcl/source/window/javachild.o $W/CxxObject/vcl/source/window/keycod.o $W/CxxObject/vcl/source/window/keyevent.o $W/CxxObject/vcl/source/window/menu.o $W/CxxObject/vcl/source/window/mnemonic.o $W/CxxObject/vcl/source/window/mnemonicengine.o $W/CxxObject/vcl/source/window/mouseevent.o $W/CxxObject/vcl/source/window/msgbox.o $W/CxxObject/vcl/source/window/popupmenuwindow.o $W/CxxObject/vcl/source/window/printdlg.o $W/CxxObject/vcl/source/window/scrwnd.o $W/CxxObject/vcl/source/window/seleng.o $W/CxxObject/vcl/source/window/split.o $W/CxxObject/vcl/source/window/splitwin.o $W/CxxObject/vcl/source/window/status.o $W/CxxObject/vcl/source/window/syschild.o $W/CxxObject/vcl/source/window/syswin.o $W/CxxObject/vcl/source/window/tabdlg.o $W/CxxObject/vcl/source/window/tabpage.o $W/CxxObject/vcl/source/window/taskpanelist.o $W/CxxObject/vcl/source/window/toolbox2.o $W/CxxObject/vcl/source/window/toolbox.o $W/CxxObject/vcl/source/window/window2.o
 $W/CxxObject/vcl/source/window/window3.o $W/CxxObject/vcl/source/window/window4.o $W/CxxObject/vcl/source/window/window.o $W/CxxObject/vcl/source/window/winproc.o $W/CxxObject/vcl/source/window/wpropset.o $W/CxxObject/vcl/source/window/wrkwin.o  -Wl,--start-group  -Wl,--end-group -o $W/LinkTarget/Library/libvcl.so
/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o: In function `IcuLayoutEngine::operator()(ServerFontLayout&, ImplLayoutArgs&)':
gcach_layout.cxx:(.text+0x7f4): undefined reference to `uscript_getScript_48'
gcach_layout.cxx:(.text+0x853): undefined reference to `icu_48::LayoutEngine::layoutEngineFactory(icu_48::LEFontInstance const*, int, int, LEErrorCode&)'
gcach_layout.cxx:(.text+0x8f4): undefined reference to `icu_48::LayoutEngine::getGlyphs(unsigned int*, LEErrorCode&) const'
gcach_layout.cxx:(.text+0x90e): undefined reference to `icu_48::LayoutEngine::getCharIndices(int*, LEErrorCode&) const'
gcach_layout.cxx:(.text+0x92c): undefined reference to `icu_48::LayoutEngine::getGlyphPositions(float*, LEErrorCode&) const'
/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o: In function `IcuFontFromServerFont::~IcuFontFromServerFont()':
gcach_layout.cxx:(.text._ZN21IcuFontFromServerFontD0Ev[_ZN21IcuFontFromServerFontD0Ev]+0x13): undefined reference to `icu_48::LEFontInstance::~LEFontInstance()'
gcach_layout.cxx:(.text._ZN21IcuFontFromServerFontD0Ev[_ZN21IcuFontFromServerFontD0Ev]+0x1c): undefined reference to `icu_48::UMemory::operator delete(void*)'
...

regards,

Pedro.

Re: Module VCL doesn't link external ICU

Posted by Pedro Giffuni <pf...@apache.org>.
Wow.. that is definitely likely to work!

You know very well the build system. Thanks!

Pedro.

--- On Mon, 11/7/11, Ariel Constenla-Haile <ar...@gmail.com> wrote:


> 
> then try modifying solenv/gbuild/platform/freebsd.mk l.
> 124
> 
> gb_LinkTarget_LDFLAGS := \
>    
> -Wl,-rpath-link=$(SOLARLIBDIR):$(SYSBASE)/lib:$(SYSBASE)/usr/lib:$(SYSBASE)/usr/local/lib
> \
> 
> 
> Regards
> -- 
> Ariel Constenla-Haile
> La Plata, Argentina
> 

Re: Module VCL doesn't link external ICU

Posted by Ariel Constenla-Haile <ar...@gmail.com>.
On Mon, Nov 07, 2011 at 10:50:21AM -0800, Pedro Giffuni wrote:
> --- On Mon, 11/7/11, Ariel Constenla-Haile <ar...@gmail.com> wrote:
> 
> Thanks for the analysis. We have some patches concerning -rpath
> in the OOo port for icu but this shouldn't be needed for the
> external ICU.
> 
> > 
> > By the way, why do have icu in /usr/local/lib? Is this the
> > default path?
> 
> Yes, it is the default path for all packages. X11 is also
> installed in /usr/local.

then try modifying solenv/gbuild/platform/freebsd.mk l. 124

gb_LinkTarget_LDFLAGS := \
    -Wl,-rpath-link=$(SOLARLIBDIR):$(SYSBASE)/lib:$(SYSBASE)/usr/lib:$(SYSBASE)/usr/local/lib \


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: Module VCL doesn't link external ICU

Posted by Pedro Giffuni <pf...@apache.org>.

--- On Mon, 11/7/11, Ariel Constenla-Haile <ar...@gmail.com> wrote:

Thanks for the analysis. We have some patches concerning -rpath
in the OOo port for icu but this shouldn't be needed for the
external ICU.

> 
> By the way, why do have icu in /usr/local/lib? Is this the
> default path?

Yes, it is the default path for all packages. X11 is also
installed in /usr/local.

> Do you have another icu version in another directory?
> 

No.

> > however it's not clear where the iculibs
> > are added in the SYSTEM_ICU case, 
> 
> nowhere, AFAIK.
>

Yeah.. OpenGrok concurs :(.

cheers,

Pedro.

Re: Module VCL doesn't link external ICU

Posted by Ariel Constenla-Haile <ar...@gmail.com>.
On Mon, Nov 07, 2011 at 06:08:36AM -0800, Pedro Giffuni wrote:
> OK
> hmm.. you asked for it ;)
> 
> =============
> Building module vcl
> =============
> 
> Entering /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/vcl/prj
> 
> cd .. && gmake  -r -j1 
> [ build LNK ] Library/libvcl.so

splitting the command:

c++ -shared 
-Wl,-z,noexecstack 
'-Wl,-rpath,$ORIGIN:$ORIGIN/../ure-link/lib' 
'-Wl,-rpath-link,$O/lib' 
-Wl,-rpath-link,/lib:/usr/lib 
-Wl,-z,combreloc 
-Wl,-z,defs   
-L$S/solenv/unxfbsdx/lib 
-L$O/lib 
-L$S/solenv/unxfbsdx/lib 
-L/usr/local/openjdk6/lib 
-L/usr/local/openjdk6/jre/lib/amd64 
-L/usr/local/openjdk6/jre/lib/amd64/server 
-L/usr/local/openjdk6/jre/lib/amd64/native_threads 
-L/usr/local/lib  
-Wl,--hash-style=both  
-Wl,--dynamic-list-cpp-new 
-Wl,--dynamic-list-cpp-typeinfo 
-Wl,-Bsymbolic-functions  
-ltl 
-lutl 
-lsot 
-lucbhelper4gcc3 
-lbasegfx 
-lcomphelpgcc3 
-luno_cppuhelpergcc3 
-licuuc -licule 
-li18nisolang1gcc3 
-li18npaper 
-li18nutilgcc3 
-ljvmaccessgcc3 
-lstlport_gcc 
-luno_cppu 
-luno_sal 
-lvos3gcc3 
-lfreetype  

-Wl,--start-group  
-Wl,--end-group 
-o $W/LinkTarget/Library/libvcl.so


* you have the libraries: -licuuc -licule
* the linker search path: -L/usr/local/lib
* you don't have /usr/local/lib in the -rpath-link

> Also:
> 
> ls /usr/local/lib/libicu*
> /usr/local/lib/libicudata.so      /usr/local/lib/libiculx.so
> /usr/local/lib/libicudata.so.48   /usr/local/lib/libiculx.so.48
> /usr/local/lib/libicudata.so.48.1 /usr/local/lib/libiculx.so.48.1
> /usr/local/lib/libicui18n.so      /usr/local/lib/libicutest.so
> /usr/local/lib/libicui18n.so.48   /usr/local/lib/libicutest.so.48
> /usr/local/lib/libicui18n.so.48.1 /usr/local/lib/libicutest.so.48.1
> /usr/local/lib/libicuio.so        /usr/local/lib/libicutu.so
> /usr/local/lib/libicuio.so.48     /usr/local/lib/libicutu.so.48
> /usr/local/lib/libicuio.so.48.1   /usr/local/lib/libicutu.so.48.1
> /usr/local/lib/libicule.so        /usr/local/lib/libicuuc.so
> /usr/local/lib/libicule.so.48     /usr/local/lib/libicuuc.so.48
> /usr/local/lib/libicule.so.48.1   /usr/local/lib/libicuuc.so.48.1
> 
> I see the path is right, 

you are missing the runtime linker path. This may or may not be the
problem, depending on your system configuration. In Fedora
/usr/local/lib[64] is not in the linker's default search path (manual
tweak of /etc/ld.so.conf is required). So in Fedora, -L/usr/local/lib 
is not enough.

By the way, why do have icu in /usr/local/lib? Is this the default path?
Do you have another icu version in another directory?

> however it's not clear where the iculibs
> are added in the SYSTEM_ICU case, 

nowhere, AFAIK.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: Module VCL doesn't link external ICU

Posted by Pedro Giffuni <pf...@apache.org>.
OK
hmm.. you asked for it ;)

=============
Building module vcl
=============

Entering /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/vcl/prj

cd .. && gmake  -r -j1 
[ build LNK ] Library/libvcl.so
R=/usr/ports/editors/openoffice.org-3-devel/work/ooo && S=$R/main && O=$S/solver/340/unxfbsdx.pro && W=$O/workdir &&  mkdir -p $W/LinkTarget/Library/ && c++ -shared -Wl,-z,noexecstack '-Wl,-rpath,$ORIGIN:$ORIGIN/../ure-link/lib' '-Wl,-rpath-link,$O/lib' -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc -Wl,-z,defs   -L$S/solenv/unxfbsdx/lib -L$O/lib -L$S/solenv/unxfbsdx/lib -L/usr/local/openjdk6/lib -L/usr/local/openjdk6/jre/lib/amd64 -L/usr/local/openjdk6/jre/lib/amd64/server -L/usr/local/openjdk6/jre/lib/amd64/native_threads -L/usr/local/lib  -Wl,--hash-style=both  -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions  -ltl -lutl -lsot -lucbhelper4gcc3 -lbasegfx -lcomphelpgcc3 -luno_cppuhelpergcc3 -licuuc -licule -li18nisolang1gcc3 -li18npaper -li18nutilgcc3 -ljvmaccessgcc3 -lstlport_gcc -luno_cppu -luno_sal -lvos3gcc3 -lfreetype  $W/CxxObject/vcl/source/glyphs/gcach_ftyp.o $W/CxxObject/vcl/source/glyphs/gcach_layout.o
 $W/CxxObject/vcl/source/glyphs/gcach_rbmp.o $W/CxxObject/vcl/source/glyphs/glyphcache.o $W/CxxObject/vcl/unx/generic/fontmanager/fontcache.o $W/CxxObject/vcl/unx/generic/fontmanager/fontconfig.o $W/CxxObject/vcl/unx/generic/fontmanager/fontmanager.o $W/CxxObject/vcl/unx/generic/fontmanager/helper.o $W/CxxObject/vcl/unx/generic/fontmanager/parseAFM.o $W/CxxObject/vcl/unx/generic/plugadapt/salplug.o $W/CxxObject/vcl/unx/generic/printer/cupsmgr.o $W/CxxObject/vcl/unx/generic/printer/jobdata.o $W/CxxObject/vcl/unx/generic/printer/ppdparser.o $W/CxxObject/vcl/unx/generic/printer/printerinfomanager.o $W/CxxObject/vcl/source/app/dbggui.o $W/CxxObject/vcl/source/app/dndhelp.o $W/CxxObject/vcl/source/app/help.o $W/CxxObject/vcl/source/app/i18nhelp.o $W/CxxObject/vcl/source/app/idlemgr.o $W/CxxObject/vcl/source/app/salvtables.o $W/CxxObject/vcl/source/app/session.o $W/CxxObject/vcl/source/app/settings.o $W/CxxObject/vcl/source/app/sound.o
 $W/CxxObject/vcl/source/app/stdtext.o $W/CxxObject/vcl/source/app/svapp.o $W/CxxObject/vcl/source/app/svdata.o $W/CxxObject/vcl/source/app/svmain.o $W/CxxObject/vcl/source/app/svmainhook.o $W/CxxObject/vcl/source/app/timer.o $W/CxxObject/vcl/source/app/unohelp2.o $W/CxxObject/vcl/source/app/unohelp.o $W/CxxObject/vcl/source/app/vclevent.o $W/CxxObject/vcl/source/components/display.o $W/CxxObject/vcl/source/components/dtranscomp.o $W/CxxObject/vcl/source/components/factory.o $W/CxxObject/vcl/source/components/fontident.o $W/CxxObject/vcl/source/components/rasterizer_rsvg.o $W/CxxObject/vcl/source/components/stringmirror.o $W/CxxObject/vcl/source/control/button.o $W/CxxObject/vcl/source/control/combobox.o $W/CxxObject/vcl/source/control/ctrl.o $W/CxxObject/vcl/source/control/edit.o $W/CxxObject/vcl/source/control/field2.o $W/CxxObject/vcl/source/control/field.o $W/CxxObject/vcl/source/control/fixbrd.o $W/CxxObject/vcl/source/control/fixed.o
 $W/CxxObject/vcl/source/control/group.o $W/CxxObject/vcl/source/control/ilstbox.o $W/CxxObject/vcl/source/control/imgctrl.o $W/CxxObject/vcl/source/control/longcurr.o $W/CxxObject/vcl/source/control/lstbox.o $W/CxxObject/vcl/source/control/menubtn.o $W/CxxObject/vcl/source/control/morebtn.o $W/CxxObject/vcl/source/control/quickselectionengine.o $W/CxxObject/vcl/source/control/scrbar.o $W/CxxObject/vcl/source/control/slider.o $W/CxxObject/vcl/source/control/spinbtn.o $W/CxxObject/vcl/source/control/spinfld.o $W/CxxObject/vcl/source/control/tabctrl.o $W/CxxObject/vcl/source/control/throbber.o $W/CxxObject/vcl/source/fontsubset/cff.o $W/CxxObject/vcl/source/fontsubset/fontsubset.o $W/CxxObject/vcl/source/fontsubset/gsub.o $W/CxxObject/vcl/source/fontsubset/list.o $W/CxxObject/vcl/source/fontsubset/sft.o $W/CxxObject/vcl/source/fontsubset/ttcr.o $W/CxxObject/vcl/source/fontsubset/xlat.o $W/CxxObject/vcl/source/gdi/alpha.o
 $W/CxxObject/vcl/source/gdi/animate.o $W/CxxObject/vcl/source/gdi/base14.o $W/CxxObject/vcl/source/gdi/bitmap2.o $W/CxxObject/vcl/source/gdi/bitmap3.o $W/CxxObject/vcl/source/gdi/bitmap4.o $W/CxxObject/vcl/source/gdi/bitmap.o $W/CxxObject/vcl/source/gdi/bitmapex.o $W/CxxObject/vcl/source/gdi/bmpacc2.o $W/CxxObject/vcl/source/gdi/bmpacc3.o $W/CxxObject/vcl/source/gdi/bmpacc.o $W/CxxObject/vcl/source/gdi/bmpconv.o $W/CxxObject/vcl/source/gdi/bmpfast.o $W/CxxObject/vcl/source/gdi/configsettings.o $W/CxxObject/vcl/source/gdi/cvtgrf.o $W/CxxObject/vcl/source/gdi/cvtsvm.o $W/CxxObject/vcl/source/gdi/extoutdevdata.o $W/CxxObject/vcl/source/gdi/font.o $W/CxxObject/vcl/source/gdi/gdimtf.o $W/CxxObject/vcl/source/gdi/gfxlink.o $W/CxxObject/vcl/source/gdi/gradient.o $W/CxxObject/vcl/source/gdi/graph.o $W/CxxObject/vcl/source/gdi/graphictools.o $W/CxxObject/vcl/source/gdi/hatch.o $W/CxxObject/vcl/source/gdi/image.o $W/CxxObject/vcl/source/gdi/imagerepository.o
 $W/CxxObject/vcl/source/gdi/impanmvw.o $W/CxxObject/vcl/source/gdi/impbmp.o $W/CxxObject/vcl/source/gdi/impgraph.o $W/CxxObject/vcl/source/gdi/impimage.o $W/CxxObject/vcl/source/gdi/impimagetree.o $W/CxxObject/vcl/source/gdi/impvect.o $W/CxxObject/vcl/source/gdi/jobset.o $W/CxxObject/vcl/source/gdi/lineinfo.o $W/CxxObject/vcl/source/gdi/mapmod.o $W/CxxObject/vcl/source/gdi/metaact.o $W/CxxObject/vcl/source/gdi/metric.o $W/CxxObject/vcl/source/gdi/octree.o $W/CxxObject/vcl/source/gdi/oldprintadaptor.o $W/CxxObject/vcl/source/gdi/outdev2.o $W/CxxObject/vcl/source/gdi/outdev3.o $W/CxxObject/vcl/source/gdi/outdev4.o $W/CxxObject/vcl/source/gdi/outdev5.o $W/CxxObject/vcl/source/gdi/outdev6.o $W/CxxObject/vcl/source/gdi/outdev.o $W/CxxObject/vcl/source/gdi/outdevnative.o $W/CxxObject/vcl/source/gdi/outmap.o $W/CxxObject/vcl/source/gdi/pdfextoutdevdata.o $W/CxxObject/vcl/source/gdi/pdffontcache.o $W/CxxObject/vcl/source/gdi/pdfwriter.o
 $W/CxxObject/vcl/source/gdi/pdfwriter_impl2.o $W/CxxObject/vcl/source/gdi/pdfwriter_impl.o $W/CxxObject/vcl/source/gdi/pngread.o $W/CxxObject/vcl/source/gdi/pngwrite.o $W/CxxObject/vcl/source/gdi/print2.o $W/CxxObject/vcl/source/gdi/print3.o $W/CxxObject/vcl/source/gdi/print.o $W/CxxObject/vcl/source/gdi/regband.o $W/CxxObject/vcl/source/gdi/region.o $W/CxxObject/vcl/source/gdi/rendergraphic.o $W/CxxObject/vcl/source/gdi/rendergraphicrasterizer.o $W/CxxObject/vcl/source/gdi/salgdilayout.o $W/CxxObject/vcl/source/gdi/sallayout.o $W/CxxObject/vcl/source/gdi/salmisc.o $W/CxxObject/vcl/source/gdi/salnativewidgets-none.o $W/CxxObject/vcl/source/gdi/svgread.o $W/CxxObject/vcl/source/gdi/textlayout.o $W/CxxObject/vcl/source/gdi/virdev.o $W/CxxObject/vcl/source/gdi/wall.o $W/CxxObject/vcl/source/helper/canvasbitmap.o $W/CxxObject/vcl/source/helper/canvastools.o $W/CxxObject/vcl/source/helper/evntpost.o $W/CxxObject/vcl/source/helper/lazydelete.o
 $W/CxxObject/vcl/source/helper/strhelper.o $W/CxxObject/vcl/source/helper/threadex.o $W/CxxObject/vcl/source/helper/xconnection.o $W/CxxObject/vcl/source/salmain/salmain.o $W/CxxObject/vcl/source/window/abstdlg.o $W/CxxObject/vcl/source/window/accel.o $W/CxxObject/vcl/source/window/accmgr.o $W/CxxObject/vcl/source/window/arrange.o $W/CxxObject/vcl/source/window/brdwin.o $W/CxxObject/vcl/source/window/btndlg.o $W/CxxObject/vcl/source/window/cmdevt.o $W/CxxObject/vcl/source/window/cursor.o $W/CxxObject/vcl/source/window/decoview.o $W/CxxObject/vcl/source/window/dialog.o $W/CxxObject/vcl/source/window/dlgctrl.o $W/CxxObject/vcl/source/window/dndevdis.o $W/CxxObject/vcl/source/window/dndlcon.o $W/CxxObject/vcl/source/window/dockingarea.o $W/CxxObject/vcl/source/window/dockmgr.o $W/CxxObject/vcl/source/window/dockwin.o $W/CxxObject/vcl/source/window/floatwin.o $W/CxxObject/vcl/source/window/introwin.o $W/CxxObject/vcl/source/window/javachild.o
 $W/CxxObject/vcl/source/window/keycod.o $W/CxxObject/vcl/source/window/keyevent.o $W/CxxObject/vcl/source/window/menu.o $W/CxxObject/vcl/source/window/mnemonic.o $W/CxxObject/vcl/source/window/mnemonicengine.o $W/CxxObject/vcl/source/window/mouseevent.o $W/CxxObject/vcl/source/window/msgbox.o $W/CxxObject/vcl/source/window/popupmenuwindow.o $W/CxxObject/vcl/source/window/printdlg.o $W/CxxObject/vcl/source/window/scrwnd.o $W/CxxObject/vcl/source/window/seleng.o $W/CxxObject/vcl/source/window/split.o $W/CxxObject/vcl/source/window/splitwin.o $W/CxxObject/vcl/source/window/status.o $W/CxxObject/vcl/source/window/syschild.o $W/CxxObject/vcl/source/window/syswin.o $W/CxxObject/vcl/source/window/tabdlg.o $W/CxxObject/vcl/source/window/tabpage.o $W/CxxObject/vcl/source/window/taskpanelist.o $W/CxxObject/vcl/source/window/toolbox2.o $W/CxxObject/vcl/source/window/toolbox.o $W/CxxObject/vcl/source/window/window2.o $W/CxxObject/vcl/source/window/window3.o
 $W/CxxObject/vcl/source/window/window4.o $W/CxxObject/vcl/source/window/window.o $W/CxxObject/vcl/source/window/winproc.o $W/CxxObject/vcl/source/window/wpropset.o $W/CxxObject/vcl/source/window/wrkwin.o  -Wl,--start-group  -Wl,--end-group -o $W/LinkTarget/Library/libvcl.so
/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o: In function `IcuLayoutEngine::operator()(ServerFontLayout&, ImplLayoutArgs&)':
gcach_layout.cxx:(.text+0x7f4): undefined reference to `uscript_getScript_48'
gcach_layout.cxx:(.text+0x853): undefined reference to `icu_48::LayoutEngine::layoutEngineFactory(icu_48::LEFontInstance const*, int, int, LEErrorCode&)'
gcach_layout.cxx:(.text+0x8f4): undefined reference to `icu_48::LayoutEngine::getGlyphs(unsigned int*, LEErrorCode&) const'
gcach_layout.cxx:(.text+0x90e): undefined reference to `icu_48::LayoutEngine::getCharIndices(int*, LEErrorCode&) const'
gcach_layout.cxx:(.text+0x92c): undefined reference to `icu_48::LayoutEngine::getGlyphPositions(float*, LEErrorCode&) const'
/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o: In function `IcuFontFromServerFont::~IcuFontFromServerFont()':
gcach_layout.cxx:(.text._ZN21IcuFontFromServerFontD0Ev[_ZN21IcuFontFromServerFontD0Ev]+0xf): undefined reference to `icu_48::LEFontInstance::~LEFontInstance()'
gcach_layout.cxx:(.text._ZN21IcuFontFromServerFontD0Ev[_ZN21IcuFontFromServerFontD0Ev]+0x18): undefined reference to `icu_48::UMemory::operator delete(void*)'
/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/workdir/CxxObject/vcl/source/glyphs/gcach_layout.o: In function `IcuFontFromServerFont::~IcuFontFromServerFont()':
gcach_layout.cxx:(.text._ZN21IcuFontFromServerFontD1Ev[_ZN21IcuFontFromServerFontD1Ev]+0xb): undefined reference to `icu_48::LEFontInstance::~LEFontInstance()'
/usr/ports/editors/openoffice.org-3-devel/work/ooo/main/solver/340/unxfbsdx.pro/
...
_____

Also:

ls /usr/local/lib/libicu*
/usr/local/lib/libicudata.so      /usr/local/lib/libiculx.so
/usr/local/lib/libicudata.so.48   /usr/local/lib/libiculx.so.48
/usr/local/lib/libicudata.so.48.1 /usr/local/lib/libiculx.so.48.1
/usr/local/lib/libicui18n.so      /usr/local/lib/libicutest.so
/usr/local/lib/libicui18n.so.48   /usr/local/lib/libicutest.so.48
/usr/local/lib/libicui18n.so.48.1 /usr/local/lib/libicutest.so.48.1
/usr/local/lib/libicuio.so        /usr/local/lib/libicutu.so
/usr/local/lib/libicuio.so.48     /usr/local/lib/libicutu.so.48
/usr/local/lib/libicuio.so.48.1   /usr/local/lib/libicutu.so.48.1
/usr/local/lib/libicule.so        /usr/local/lib/libicuuc.so
/usr/local/lib/libicule.so.48     /usr/local/lib/libicuuc.so.48
/usr/local/lib/libicule.so.48.1   /usr/local/lib/libicuuc.so.48.1

I see the path is right, however it's not clear where the iculibs
are added in the SYSTEM_ICU case, and it's a mess to find
where it should be inserted.

cheers,

Pedro.

Re: Module VCL doesn't link external ICU

Posted by Ariel Constenla-Haile <ar...@gmail.com>.
Hello Pedro,

On Sun, Nov 06, 2011 at 02:48:26PM -0800, Pedro Giffuni wrote:
> Ugh.. I'm still struggling with the BSD build, and
> apparently it should be simple but perhaps someone
> that knows well the build structure can give me a good hint:
> 
> =============
> Building module vcl
> =============
> 
> Entering /usr/ports/editors/openoffice.org-3-devel/work/ooo/main/vcl/prj
> 
> cd .. && gmake -s -r -j1 
> [ build LNK ] Library/libvcl.so

it would be useful to see the command g++ is invoked with to link the
library (remove the -s for silent).

Some background on what an "undefined reference" when linking means:

1) the linker was not told which libraries to link against 
   In this case:
   -licuuc --> libicuuc.so
   -licule --> libicule.so
   This is not the case, because this libraries are added in
   Library_vcl.mk gb_Library_add_linked_libs

2) the linker was not told where to find the libraries it links against,
     this is done with the -L option, like -L/usr/lib64

3) both (1) and (2) are needed at build time, at runtime the runtime
   linker must know the path where to search the libraries (see -rpath
   and -rpath-link in man ld)


> Going verbose just shows a lot of objects being linked
> but not ICU which is the missing piece.
> 
> Part of the problem is that I have to use some external
> libraries and this ends up catching the external ICU,
> but in any case there is --with-system-icu so this
> should be OK.
> 
> So ... how can I fix this?

if the external library is only used in one module, you can do it in
that module's makefile. See ENABLE_DBUS in vcl/Library_vclplug_gtk.mk

According to opengrok icu is used in vcl, sw, editeng, svx, svtools
fixing this per module is not reliable, so you have to tweak a more
general solution.

A possible solution is modifying gb_LinkTarget_LDFLAGS in
gbuild/platform/freebsd.mk (now that I read this file, there is an
issue: it assumes the default -rpath-link to be /lib:/usr/lib , this
will not work on 64 bit platforms, where it should be /lib64:/usr/lib64).
Fixing this may solve your problem *only if* icu libs are in /usr/lib64
on your system. You need also -L/usr/lib64 in that case.
Use icu-config to get the required flags for your system.

But notice that this is rather suboptimal, it will set that LDFLAGS for 
every module, even those that do not link against icu.

The optimal solution seems to be in cws gnumake4, see:
http://hg.services.openoffice.org/cws/gnumake4/rev/e86f5a26e982
http://hg.services.openoffice.org/cws/gnumake4/file/b3086537b169/RepositoryExternal.mk#l286

it introduces a function gb_Library_use_externals and a 
RepositoryExternal.mk
But AFAIK this cws was not ready for QA.

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina