PRECONDITIONS: * OS: Ubuntu Quantal Linux x64 * Libreoffice: "master" branch * Java: - java version "1.7.0_21" - Java(TM) SE Runtime Environment (build 1.7.0_21-b11) - Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode) * Configure flags: --with-system-libs --enable-debug --enable-odk \ --with-jdk-home=~/java/default \ --with-ant-home=~/java/apache-ant-1.9.0/ --disable-kde --disable-kde4 \ --disable-kdeab --disable-epm --disable-mathmldtd --disable-gnome-vfs \ --disable-tde --disable-tdeab --disable-postgresql-sdbc \ --disable-ext-wiki-publisher --disable-ext-report-builder \ --disable-scripting-beanshell --disable-scripting-javascript \ --without-system-graphite --without-system-mdds --without-system-vigra \ --without-myspell-dicts --without-system-odbc --without-system-npapi-headers \ --without-system-sane --without-system-openldap --without-system-clucene \ --without-system-libmspub --without-system-libcmis --without-system-orcus \ --without-system-lpsolve --without-system-liblangtag --without-system-libmwaw \ --without-ppds --without-afms --without-krb5 --without-junit --without-gssapi STEPS LEADING TO THE ISSUE: 1- Go to the sdk examples java folder (DocumentHandling, for instance) and build them just typing "make". 2- Execute any of the examples ("make DocumentLoader.run", for instance) EXPECTED RESULTS: The example is executed correctly, in this case, loading the test document. ACTUAL OUTCOMES: The example logs the following info: mkdir -p ~/libreoffice4.0_sdk/LINUXexample.out/misc/JavaDocumentHandlingExamples/converted_files "~/java/default/bin/java" -d32 -Dcom.sun.star.lib.loader.unopath="~/libo.git/install//program" -jar ~/libreoffice4.0_sdk/LINUXexample.out/class/JavaDocumentHandlingExamples/DocumentConverter.jar "./test" "MS Word 97" "doc" "~/libreoffice4.0_sdk/LINUXexample.out/misc/JavaDocumentHandlingExamples/converted_files" Error: This Java instance does not support a 32-bit JVM. Please install the desired version. make: *** [DocumentConverter.run] Error 1
My first impression is that the java option -d32 shouldn't be used in this scenario, except if it's mandatory to use a 32 bits Java VM for technical reasons. The Makefile's $(SDK_JAVA) environment variable is resolved by the odk/settings/std.mk file, as follows: SDK_JAVA="$(OO_SDK_JAVA_HOME)/$(JAVABIN)/java" $(JAVA_OPTIONS) There is a test in the std.mk to check out the java VM arch target, which adds the -d32 option to the JAVA_OPTIONS variable in case of 64 bits arch. JAVA_OPTIONS= ifneq "$(OO_SDK_JAVA_HOME)" "" JAVA_BITS := $(shell $(OO_SDK_JAVA_HOME)/$(JAVABIN)/java -version 2>&1 | tail -1 | cut -d " " -f3) ifeq "$(JAVA_BITS)" "64-Bit" JAVA_OPTIONS=-d32 endif endif I guess this test is based on the assumption that the SDK was build for a 32 bit target, even using a 64 bits OS. I think it should also take into account the SDK build target, since LO should work fine as well on 64 bit architectures.
Assigned to Stephan Bergman, since we have already talked about the issue.
Stephan Bergmann committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=391477d40ea718c46089e16484726dba085a6ad8 fdo#63693 Do not force java -d32 for a 64-bit SDK The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
so, I guess this bug is CONFIRMED and ASSIGNED.
Added Andrés Gómez to the CC list of this bug.
Requested backports to libreoffice-4-0 towards LO 4.0.4 (<https://gerrit.libreoffice.org/#/c/3480/>) and libreoffice-3-6 towards LO 3.6.7 (<https://gerrit.libreoffice.org/#/c/3481/>). CC'ing Rene and Björn, apparently of more interest to Debian/Ubuntu than Fedora distros.
Stephan Bergmann committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=0d243a4452acc2a4672901e2782617b82aa135d4&h=libreoffice-3-6 fdo#63693 Do not force java -d32 for a 64-bit SDK It will be available in LibreOffice 3.6.7. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Stephan Bergmann committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bcebecda16cb8783a720a2bcaff7a74e279c866b&h=libreoffice-4-0 fdo#63693 Do not force java -d32 for a 64-bit SDK It will be available in LibreOffice 4.0.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I've verified the bug is fixed in master branch.