harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hindess <mark.hind...@googlemail.com>
Subject Re: [classlib][awt] Test failure
Date Mon, 27 Nov 2006 15:13:18 GMT

On 27 November 2006 at 17:26, "Oleg Khaschansky" <oleg.v.khaschansky@gmail.com> wrote:
> > Installing libxmu-dev on the build machine does fix the problem.
> > However, most people will not have the -dev packages installed, so
> > I think this should be fixed in the code.
> 
> It looks like it's a known issue [1]. And I think we need to solve
> this problem not only for libXmu, but for libX11 and all other libs
> which are dlopened. The question is what would be a correct solution
> for this? Trying to load different major versions one-by-one? Or just
> add a requirement that lib*-devel should be installed?
> 
> [1] https://launchpad.net/distros/ubuntu/+bug/39492

Perhaps try to load major versions that are known to work?

Regards,
 Mark.

> On 11/27/06, Mark Hindess <mark.hindess@googlemail.com> wrote:
> >
> > On 27 November 2006 at 14:10, "Oleg Khaschansky" <oleg.v.khaschansky@gmail.
> com> wrote:
> > > >   1) Xmu is installed
> > > >   2) Xmu is working
> > > >   3) Xmu has found the default color map
> > >
> > > Is symlink to libxmu also ok? Maybe fails not FindFunction but
> > > LOAD_LIB(libXmu, Xmu);
> > > which is, actually, a following:
> > > libXmu = dlopen("libXmu.so", RTLD_LAZY)
> > >
> > > Could you try this code also on that machine?
> >
> > Interesting... looking a little closer at the install on my laptop
> > (which works):
> >
> > bash$ dlocate libXmu.so
> > libxmu6: /usr/X11R6/lib/libXmu.so.6.2
> > libxmu6: /usr/X11R6/lib/libXmu.so.6
> > libxmu-dev: /usr/X11R6/lib/libXmu.so
> >
> > which means that the runtime packages only provide the versioned .so
> > files/symlinks and the .so with no version is provided by the -dev
> > package.
> >
> > Installing libxmu-dev on the build machine does fix the problem.
> > However, most people will not have the -dev packages installed, so
> > I think this should be fixed in the code.
> >
> > -Mark.
> >
> > > On 11/27/06, Mark Hindess <mark.hindess@googlemail.com> wrote:
> > > >
> > > > On 27 November 2006 at 11:04, "Ivanov, Alexey A" <alexey.a.ivanov@intel
> .com
> > > > wrote:
> > > > > Tim, Oleg, Geir, all,
> > > > >
> > > > > Some tests also fail because of this problem. See comments in
> > > > > HARMONY-1439 [1] and HARMONY-1979 [2]. The one that regards to this
> > > > > particular problem reads:
> > > > >
> > > > > "Mark Hindess [26/Oct/06 01:19 PM]
> > > > > Hmm... looks like the problem I'm having is because:
> > > > >   FindFunction(libXmu, "XmuLookupStandardColormap");
> > > > >
> > > > > returns NULL. No idea why since libXmu is installed and seems to
cont
> ain
> > > > > that symbol. This is a debian/stable machine."
> > > > >
> > > > Thanks for mentioning this.  I think this is crucial to getting to the
> > > > bottom of this.  I've just run the following test program below on the
> > > > build machine and it returns "status = 1".  This means:
> > > >
> > > >   1) Xmu is installed
> > > >   2) Xmu is working
> > > >   3) Xmu has found the default color map
> > > >
> > > > Regards,
> > > >  Mark.
> > > >
> > > > /* Compile with:
> > > >  * gcc -I/usr/X11R6/include -o xmutest xmutest.c -L/usr/X11R6/lib -lX11
>  -lX
> > > mu
> > > >  */
> > > >
> > > > #include <stdio.h>
> > > > #include <stdlib.h>
> > > > #include <unistd.h>
> > > > #include <X11/Xlib.h>
> > > > #include <X11/Xutil.h>
> > > > #include <X11/Xatom.h>
> > > > #include <X11/Xmu/StdCmap.h>
> > > >
> > > > int main(int argc, char **argv)
> > > > {
> > > >     Display *display;
> > > >     int screen;
> > > >     Visual* visual;
> > > >     int depth;
> > > >     int status;
> > > >
> > > >     if ((display = XOpenDisplay(NULL)) == NULL) {
> > > >         return (-1);
> > > >     }
> > > >     screen = DefaultScreen(display);
> > > >     visual = DefaultVisual(display,screen);
> > > >     depth = DefaultDepth(display,screen);
> > > >     status = XmuLookupStandardColormap(display, screen,
> > > >                                        XVisualIDFromVisual(visual), dep
> th,
> > > >                                        XA_RGB_DEFAULT_MAP, False, True)
> ;
> > > >     printf("status = %d\n", status);
> > > > }
> > > >
> > > > > [1] https://issues.apache.org/jira/browse/HARMONY-1439
> > > > > [2] https://issues.apache.org/jira/browse/HARMONY-1979
> > > > >
> > > > > --
> > > > > Alexey A. Ivanov
> > > > > Intel Enterprise Solutions Software Division
> > > > >
> > > > >
> > > > > >-----Original Message-----
> > > > > >From: Geir Magnusson Jr. [mailto:geir@pobox.com]
> > > > > >Sent: Sunday, November 26, 2006 12:46 AM
> > > > > >To: dev@harmony.apache.org
> > > > > >Subject: Re: [classlib][awt] Test failure
> > > > > >
> > > > > >
> > > > > >
> > > > > >Tim Ellison wrote:
> > > > > >> Oleg Khaschansky wrote:
> > > > > >>> Do you suggest to introduce the error handling for all
the wrappe
> rs
> > > > > or
> > > > > >>> only for this one? If for all, do you think if it will
affect the
> > > > > >>> performance?
> > > > > >>
> > > > > >> I was thinking of something like this.  In the non-error
case it
> > > > > would
> > > > > >> add an additional NULL check as the function address is
being cach
> ed,
> > > > > >> and no additional overhead after the cache has been populated.
> > > > > >>
> > > > > >> The actual exception thrown is open to debate.\
> > > > > >
> > > > > >:)
> > > > > >
> > > > > >I don't understand the context - in the event of this fault,
is it t
> ime
> > > > > >to simply shut down?  Or is this survivable?  My understanding
is th
> at
> > > > > >you just don't want to see a GPF.
> > > > > >
> > > > > >Either way, how about a hint - like "missing libxmu" or similar?
> > > > > >
> > > > > >geir
> > > > > >
> > > > > >>
> > > > > >> Index:
> > > > > >>
> > > > > >src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge
> _li
> > > > > nux_
> > > > > >X11.cpp
> > > > > >> =
> > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =3D=
> > > 3D=
> > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =3D=
> > > 3D=
> > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > > > >> ---
> > > > > >>
> > > > > >src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge
> _li
> > > > > nux_
> > > > > >X11.cpp
> > > > > >> (revision 478891)
> > > > > >> +++
> > > > > >>
> > > > > >src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge
> _li
> > > > > nux_
> > > > > >X11.cpp
> > > > > >> (working copy)
> > > > > >> @@ -23,6 +23,7 @@
> > > > > >>
> > > > > >>  #include "org_apache_harmony_awt_nativebridge_linux_X11.h"
> > > > > >>  #include "org_apache_harmony_awt_nativebridge_linux_ErrorHandler.
> h"
> > > > > >> +#include "exceptions.h"
> > > > > >>
> > > > > >>  static libHandler libX11;
> > > > > >>  static libHandler libXmu;
> > > > > >> @@ -575,6 +576,10 @@
> > > > > >>  JNIEXPORT jint  JNICALL
> > > > > >>
> > > > > >Java_org_apache_harmony_awt_nativebridge_linux_X11_XmuLookupStandard
> Col
> > > > > orma
> > > > > >p(
> > > > > >> JNIEnv *env, jobject self, jlong dpy, jint screen, jlong
visualid,
> > > > > jint
> > > > > >> depth, jlong property, jint replace, jint retain) {
> > > > > >>      if (p_nbridge_XmuLookupStandardColormap =3D=3D NULL)
{
> > > > > >>          p_nbridge_XmuLookupStandardColormap =3D (int (*)
(void *,
>  =
> > > > > int,
> > > > > >> long, int, long, int, int)) FindFunction(libXmu,
> > > > > >> "XmuLookupStandardColormap");
> > > > > >> +        if (p_nbridge_XmuLookupStandardColormap =3D=3D
NULL) {
> > > > > >> +            throwNewExceptionByName(env,
> > > > > >> "java/lang/UnsupportedOperationException", "Function not
found");
> > > > > >> +            return 0;
> > > > > >> +          }
> > > > > >>      }
> > > > > >>      return (jint) (* p_nbridge_XmuLookupStandardColormap)((void
*
> )
> > > > > dpy,
> > > > > >> (int) screen, (long) visualid, (int) depth, (long) property,
(int)
> > > > > >> replace, (int) retain);
> > > > > >>  }
> > > > > >>
> > > > > >>
> > > > > >> What do you think?
> > > > > >>
> > > > > >> Regards,
> > > > > >> Tim
> > > > > >>
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> >
> >
> 



Mime
View raw message