On Monday 03 July 2006 22:12 Salikh Zakirov wrote:
> Andrey Chernyshev wrote:
> > (a) Do a quick-fix in build.xml / deploy.copy_classlib target -  add a
> > filter which will will exclude hythr from copying;
>
> Verified.
>
> The Andrey's suggestion worked out (patch below).
> To make the smoke tests pass on Linux I had to further apply more patches:
> * fix String.intern() (patch from HARMONY-721)
> * add -Bsymbolic flag to hyzlib linking command, as suggested by Gregory
>   to avoid name clashes with system libz during dynamic linking. (Patch to
> classlib further below).

This is a strange case of name collision (if it is name collision) that I see. 
Usually if there is a name collision all tests crash, not just 3 out of many. 
Also I've seen crashes only on SuSE for some reason, on Gentoo everything 
works fine.

Adding -Bsymbolic makes them go away but I didn't really investigate deeply 
why it happens. Hopefully this is temporary and harmless linking change until 
Zlib is used by classlib as an external resource. It is for the better if 
classlib does not duplicate public symbols from Zlib and -Bsymbolic is a 
crutch to help to workaround this problem for some time.

On a side note shouldn't it be LDFLAGS += instead of LDFLAGS = ?

> ---
> Subject: [PATCH] Workaround to avoid copying *hythr* from classlib's bin/
> directory
>
> --- a/build/make/build.xml
> +++ b/build/make/build.xml
> @@ -432,6 +432,7 @@ Version: $Revision: 1.16.2.20 $
>              <fileset dir="${external.dep.CLASSLIB}/deploy/jdk/jre/bin">
>                  <include name="*"/>
>                  <exclude name="java*"/>
> +                <exclude name="*hythr*"/>
>              </fileset>
>          </copy>
>
> --
>
> ---
> Subject: [PATCH] added overridable LDFLAGS in rules.mk, use -Bsymbolic for
> hyzlib
>
> --- a/depends/build/rules.mk
> +++ b/depends/build/rules.mk
> @@ -26,7 +26,7 @@ all: $(DLLNAME) $(EXENAME) $(LIBNAME)
>         -Wl,-soname=$(@F) $(VMLINK) -o $@ \
>         $(BUILDFILES) $(SYSLIBFILES) \
>         -Xlinker --start-group $(MDLLIBFILES) -Xlinker --end-group \
> -       -lc -lm -ldl
> +       -lc -lm -ldl $(LDFLAGS)
>
>  $(EXENAME): $(BUILDFILES) $(MDLLIBFILES)
>         $(CC) $(VMLINK) \
> --- a/native-src/linux.IA32/zlib/makefile
> +++ b/native-src/linux.IA32/zlib/makefile
> @@ -29,4 +29,6 @@ BUILDFILES = \
>
>  DLLNAME = ../libhyzlib.so
>
> +LDFLAGS = -Wl,-Bsymbolic
> +
>  include $(HY_HDK)/build/make/rules.mk

-- 
Gregory Shimansky, Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to