[Open Office] JRE register fails when building 2.0.4 on Mandriva 2007 x86_64

Atle Nissestad atle.nissestad at norbit.no
Thu Oct 26 16:22:41 EDT 2006


Caolan McNamara wrote:
>
>
> yeah, maybe it is. If all else fails and we're built for x86_64 give one
> final go if m_sHome != "file:///usr/lib64" and try a m_sHome value
> of /usr/lib64. 
>
> gcj is sort of in a transition period at the moment I guess, I'd expect
> that next iteration of gcj for nearly everyone will move to a standalone
> libjvm.so in which case the java.home value becomes reliable to find the
> jvm providing library and everyone marches along quite happily. In the
> meantime though an additional fallback can't hurt.
>
> There *might* be an argument that mandriva's 64bit gij's java.home
> should be /usr/lib64 not /usr/lib (like I bet it says) but
> http://gcc.gnu.org/onlinedocs/gcj/GNU-Classpath-Properties.html doesn't
> really give any guarantee that it points above the libgcj.so dir, it
> probably just so happens to do so for me and a few others.
>
> C.
>
>   
You're right, this is the output of gij findhome:

/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
file:///usr/lib

Kind of stupid I guess...
Anyway, the patch below fixes the build for me:

--- jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx.bak 2006-10-19
00:23:07.000000000 +0200
+++ jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx 2006-10-26
21:45:13.000000000 +0200
@@ -196,6 +196,27 @@
}
}
}
+
+#ifdef X86_64
+ if (!bRt)
+ {
+ m_sHome = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///usr/lib64"));
+ for(i_path ip = libpaths.begin(); ip != libpaths.end(); ip++)
+ {
+ //Construct an absolute path to the possible runtime
+ OUString usRt= m_sHome + *ip;
+ DirectoryItem item;
+ if(DirectoryItem::get(usRt, item) == File::E_None)
+ {
+ //found runtime lib
+ m_sRuntimeLibrary = usRt;
+ bRt = true;
+ break;
+ }
+ }
+ }
+#endif
+
if (!bRt)
return false;

Atle


More information about the Openoffice mailing list