You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by "Geir Magnusson Jr." <ge...@pobox.com> on 2006/09/15 16:56:57 UTC
[drlvm] is_name_lowercase() in natives_support.cpp
Looking at things, yes, it's the ICU dll, which has uppercase letters in
the filename.
My plan is to just convert all paths to lowercase.
Any problems people can see?
geir
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm] is_name_lowercase() in natives_support.cpp
Posted by Mark Hindess <ma...@googlemail.com>.
On 18 September 2006 at 7:06, "Geir Magnusson Jr." <ge...@pobox.com> wrote:
> Sorry - that came across too harsh w/o the smileys...
Actually, I thought it was pretty fair.
> Seriously, we had mixed up two things... does it make sense?
I'd read the body of the message without really reading the subject line
and consequently jumped to an invalid conclusion about the context. Now
I've read the body again (after looking at the subject line and reading
the related thread) it makes sense.
Regards,
Mark.
> Geir Magnusson Jr. wrote:
> > Do you really understand what we are talking about?
> >
> > The change discussed doesn't happen on linux unless you choose to define
> > PLATFORM_NT while compiling, but then I suspect lower-casing a file path
> > for a string pool will be the least of your problems.
> >
> > geir
> >
> >
> > Mark Hindess wrote:
> >> On 15 September 2006 at 10:56, "Geir Magnusson Jr." <ge...@pobox.com>
> >> wrote:
> >>> Looking at things, yes, it's the ICU dll, which has uppercase letters
> >>> in the filename.
> >>>
> >>> My plan is to just convert all paths to lowercase.
> >>>
> >>> Any problems people can see?
> >>
> >> Yes. It will break the IBM VME on linux. Renaming locally and
> >> running HelloWorld results in:
> >>
> >> <error: unable to load ICUInterface34 (Not found in
> >> com.ibm.oti.vm.bootstrap.library.path)>
> >> JVMJ9VM015W Initialization error for library jclclear_23(14):
> >> JVMJ9VM009E J9VMDllMain failed
> >> HMYEXEL062E Internal VM error: Failed to create Java VM
> >> FAILED.
> >>
> >> -Mark.
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> Terms of use : http://incubator.apache.org/harmony/mailing.html
> >> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> >> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >>
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm] is_name_lowercase() in natives_support.cpp
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
Sorry - that came across too harsh w/o the smileys...
Seriously, we had mixed up two things... does it make sense?
geir
Geir Magnusson Jr. wrote:
> Do you really understand what we are talking about?
>
> The change discussed doesn't happen on linux unless you choose to define
> PLATFORM_NT while compiling, but then I suspect lower-casing a file path
> for a string pool will be the least of your problems.
>
> geir
>
>
> Mark Hindess wrote:
>> On 15 September 2006 at 10:56, "Geir Magnusson Jr." <ge...@pobox.com>
>> wrote:
>>> Looking at things, yes, it's the ICU dll, which has uppercase letters
>>> in the filename.
>>>
>>> My plan is to just convert all paths to lowercase.
>>>
>>> Any problems people can see?
>>
>> Yes. It will break the IBM VME on linux. Renaming locally and
>> running HelloWorld results in:
>>
>> <error: unable to load ICUInterface34 (Not found in
>> com.ibm.oti.vm.bootstrap.library.path)>
>> JVMJ9VM015W Initialization error for library jclclear_23(14):
>> JVMJ9VM009E J9VMDllMain failed
>> HMYEXEL062E Internal VM error: Failed to create Java VM
>> FAILED.
>>
>> -Mark.
>>
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm] is_name_lowercase() in natives_support.cpp
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
Do you really understand what we are talking about?
The change discussed doesn't happen on linux unless you choose to define
PLATFORM_NT while compiling, but then I suspect lower-casing a file path
for a string pool will be the least of your problems.
geir
Mark Hindess wrote:
> On 15 September 2006 at 10:56, "Geir Magnusson Jr." <ge...@pobox.com> wrote:
>> Looking at things, yes, it's the ICU dll, which has uppercase letters in
>> the filename.
>>
>> My plan is to just convert all paths to lowercase.
>>
>> Any problems people can see?
>
> Yes. It will break the IBM VME on linux. Renaming locally and running
> HelloWorld results in:
>
> <error: unable to load ICUInterface34 (Not found in com.ibm.oti.vm.bootstrap.library.path)>
> JVMJ9VM015W Initialization error for library jclclear_23(14): JVMJ9VM009E J9VMDllMain failed
> HMYEXEL062E Internal VM error: Failed to create Java VM
> FAILED.
>
> -Mark.
>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm] is_name_lowercase() in natives_support.cpp
Posted by Mark Hindess <ma...@googlemail.com>.
On 15 September 2006 at 10:56, "Geir Magnusson Jr." <ge...@pobox.com> wrote:
> Looking at things, yes, it's the ICU dll, which has uppercase letters in
> the filename.
>
> My plan is to just convert all paths to lowercase.
>
> Any problems people can see?
Yes. It will break the IBM VME on linux. Renaming locally and running
HelloWorld results in:
<error: unable to load ICUInterface34 (Not found in com.ibm.oti.vm.bootstrap.library.path)>
JVMJ9VM015W Initialization error for library jclclear_23(14): JVMJ9VM009E J9VMDllMain failed
HMYEXEL062E Internal VM error: Failed to create Java VM
FAILED.
-Mark.
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm] is_name_lowercase() in natives_support.cpp
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
Alexey Varlamov wrote:
> Geir,
>
> The DRLVM build is broken now on gcc3.3.3 (SUSE9):
>
> build.native.cpp:
> [cc] 135 total files to be compiled.
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp: In
> [cc] function `apr_dso_handle_t* natives_load_library(const
> char*, bool*,
> [cc] NativeLoadStatus*)':
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:287: error: jump
> [cc] to label `NATIVES_LOAD_LIBRARY_EXIT'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:268: error:
> [cc] from here
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:281: error:
> [cc] crosses initialization of `jint res'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:273: error:
> [cc] crosses initialization of `Global_Env*ge'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:287: error: jump
> [cc] to label `NATIVES_LOAD_LIBRARY_EXIT'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:255: error:
> [cc] from here
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:281: error:
> [cc] crosses initialization of `jint res'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:273: error:
> [cc] crosses initialization of `Global_Env*ge'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:258: error:
> [cc] crosses initialization of `NativeLibInfo*pinfo'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:287: error: jump
> [cc] to label `NATIVES_LOAD_LIBRARY_EXIT'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:234: error:
> [cc] from here
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:281: error:
> [cc] crosses initialization of `jint res'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:273: error:
> [cc] crosses initialization of `Global_Env*ge'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:258: error:
> [cc] crosses initialization of `NativeLibInfo*pinfo'
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp:241: error:
> [cc] crosses initialization of `apr_status_t apr_status'
>
> BUILD FAILED
How bizarre. Propose a fix then. All I was trying to do was localize
the free() under windows.
>
> Besides, you introduced inconsistency in names, ones registered inside
> of ClassLoader::LoadNativeLibrary and those actually loaded in
> natives_load_library().
> So, if one will try loading the same lib with different names on
> Windows via j.l.System.loadLibrary(), there will be unexpected
> UnsatisfiedLinkError.
> I guess that awkward usage of port_filepath_canonical() was intended
> to solve exactly this problem.
I can't see how. Seems like port_filepath_canonical() was being used in
LoadNativeLibrary() was to create a full path, and would PREPEND THE
CURRENT DIRECTORY to it. So in our case, where we are wanting to let
apr_dso_load() get a dll/so, it *can't* presume current directory.
That said, I do agree that we should move the lower-casing done in
natives_load_library() and just demand that callers get their path right
as part of the API for natives_load_library()
If you want to add that to your fix above, that would be great.
Sorry for the trouble. I'll do it if you want.
geir
>
> So we still need better solution.
>
> --
> Alexey
>
> 2006/9/15, Geir Magnusson Jr. <ge...@pobox.com>:
>> Looking at things, yes, it's the ICU dll, which has uppercase letters in
>> the filename.
>>
>> My plan is to just convert all paths to lowercase.
>>
>> Any problems people can see?
>>
>> geir
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm] is_name_lowercase() in natives_support.cpp
Posted by Alexey Varlamov <al...@gmail.com>.
2006/9/18, Geir Magnusson Jr. <ge...@pobox.com>:
>
>
> Artem Aliev wrote:
> > Geir,
> >
> > The current DRLVM build is still failed.
>
> Because I was waiting for Alexey :)
>
> I'll take your patch though.
Geir,
Sorry for late response, I was busy offline. As now compilation
problem is fixed, I will look into the "canonical" issue in some time.
--
Alexey
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm] is_name_lowercase() in natives_support.cpp
Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
Artem Aliev wrote:
> Geir,
>
> The current DRLVM build is still failed.
Because I was waiting for Alexey :)
I'll take your patch though.
geir
> I attach patch for the current state of VM.
> Could you please apply it or commit new version of natives_support.cpp
>
> Thanks
> Artem
>
>
> On 9/18/06, Alexey Varlamov <al...@gmail.com> wrote:
>> Geir,
>>
>> The DRLVM build is broken now on gcc3.3.3 (SUSE9):
>>
>> build.native.cpp:
>> [cc] 135 total files to be compiled.
>> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp: In
>> [cc] function `apr_dso_handle_t* natives_load_library(const
>
> ------------------------------------------------------------------------
>
> Index: vm/vmcore/src/util/natives_support.cpp
> ===================================================================
> --- vm/vmcore/src/util/natives_support.cpp (revision 447423)
> +++ vm/vmcore/src/util/natives_support.cpp (working copy)
> @@ -203,7 +203,12 @@
>
> char *localLibName = (char *) library_name;
> NativeLibraryHandle returnCode = NULL;
> -
> + NativeLibInfo* pfound;
> + NativeLibInfo* pinfo;
> + NativeLibraryHandle handle;
> + apr_status_t apr_status;
> + Global_Env *ge;
> + jint UNREF res;
> #ifdef PLATFORM_NT
> TRACE2("init", "### lib name = " << library_name);
>
> @@ -221,7 +226,7 @@
>
> jni_libs.lock._lock();
>
> - NativeLibInfo* pfound = search_library_list(localLibName);
> + pfound = search_library_list(localLibName);
>
> if (pfound)
> {
> @@ -237,8 +242,7 @@
> *just_loaded = true;
>
> // library was not loaded previously, try to load it
> - NativeLibraryHandle handle;
> - apr_status_t apr_status = port_dso_load_ex(&handle, localLibName,
> + apr_status = port_dso_load_ex(&handle, localLibName,
> PORT_DSO_BIND_DEFER, jni_libs.ppool);
> if (APR_SUCCESS != apr_status)
> {
> @@ -255,7 +259,7 @@
> goto NATIVES_LOAD_LIBRARY_EXIT;
> }
>
> - NativeLibInfo* pinfo = (NativeLibInfo*)apr_palloc(jni_libs.ppool, sizeof(NativeLibInfo));
> + pinfo = (NativeLibInfo*)apr_palloc(jni_libs.ppool, sizeof(NativeLibInfo));
> if (NULL == pinfo)
> {
> apr_dso_unload(handle);
> @@ -270,7 +274,7 @@
>
> pinfo->handle = handle;
>
> - Global_Env *ge = VM_Global_State::loader_env;
> + ge = VM_Global_State::loader_env;
> pinfo->name = ge->string_pool.lookup(localLibName);
>
> pinfo->next = jni_libs.lib_info_list;
> @@ -278,7 +282,7 @@
>
> jni_libs.lock._unlock();
>
> - jint UNREF res = find_call_JNI_OnLoad(pinfo->handle); // What to do with result???
> + res = find_call_JNI_OnLoad(pinfo->handle); // What to do with result???
>
> *pstatus = APR_SUCCESS;
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm] is_name_lowercase() in natives_support.cpp
Posted by Artem Aliev <ar...@gmail.com>.
Geir,
The current DRLVM build is still failed.
I attach patch for the current state of VM.
Could you please apply it or commit new version of natives_support.cpp
Thanks
Artem
On 9/18/06, Alexey Varlamov <al...@gmail.com> wrote:
> Geir,
>
> The DRLVM build is broken now on gcc3.3.3 (SUSE9):
>
> build.native.cpp:
> [cc] 135 total files to be compiled.
> [cc] drlvm/vm/vmcore/src/util/natives_support.cpp: In
> [cc] function `apr_dso_handle_t* natives_load_library(const
Re: [drlvm] is_name_lowercase() in natives_support.cpp
Posted by Alexey Varlamov <al...@gmail.com>.
Geir,
The DRLVM build is broken now on gcc3.3.3 (SUSE9):
build.native.cpp:
[cc] 135 total files to be compiled.
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp: In
[cc] function `apr_dso_handle_t* natives_load_library(const
char*, bool*,
[cc] NativeLoadStatus*)':
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:287: error: jump
[cc] to label `NATIVES_LOAD_LIBRARY_EXIT'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:268: error:
[cc] from here
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:281: error:
[cc] crosses initialization of `jint res'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:273: error:
[cc] crosses initialization of `Global_Env*ge'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:287: error: jump
[cc] to label `NATIVES_LOAD_LIBRARY_EXIT'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:255: error:
[cc] from here
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:281: error:
[cc] crosses initialization of `jint res'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:273: error:
[cc] crosses initialization of `Global_Env*ge'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:258: error:
[cc] crosses initialization of `NativeLibInfo*pinfo'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:287: error: jump
[cc] to label `NATIVES_LOAD_LIBRARY_EXIT'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:234: error:
[cc] from here
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:281: error:
[cc] crosses initialization of `jint res'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:273: error:
[cc] crosses initialization of `Global_Env*ge'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:258: error:
[cc] crosses initialization of `NativeLibInfo*pinfo'
[cc] drlvm/vm/vmcore/src/util/natives_support.cpp:241: error:
[cc] crosses initialization of `apr_status_t apr_status'
BUILD FAILED
Besides, you introduced inconsistency in names, ones registered inside
of ClassLoader::LoadNativeLibrary and those actually loaded in
natives_load_library().
So, if one will try loading the same lib with different names on
Windows via j.l.System.loadLibrary(), there will be unexpected
UnsatisfiedLinkError.
I guess that awkward usage of port_filepath_canonical() was intended
to solve exactly this problem.
So we still need better solution.
--
Alexey
2006/9/15, Geir Magnusson Jr. <ge...@pobox.com>:
> Looking at things, yes, it's the ICU dll, which has uppercase letters in
> the filename.
>
> My plan is to just convert all paths to lowercase.
>
> Any problems people can see?
>
> geir
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org