Hi,

I'm trying to fix LibreOffice on 32-bit PowerPC which fails running the 
smoketest [1]:

[build CUT] smoketest
S=/build/reproducible-path/libreoffice-26.2.0~beta1 && I=$S/instdir && 
W=$S/workdir &&  mkdir -p $W/CppunitTest/ && rm -fr 
$W/CppunitTest/smoketest.test.user && cp -r $W/unittest
$W/CppunitTest/smoketest.test.user &&    rm -fr 
$W/CppunitTest/smoketest.test.core && mkdir $W/CppunitTest/smoketest.test.core 
&& cd $W/CppunitTest/smoketest.test.core &&   (   MAX_CONCURRENCY=4
MOZILLA_CERTIFICATE_FOLDER=dbm: SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1 
SAL_USE_VCLPLUGIN=svp LIBO_LANG=C      LO_RUNNING_UNIT_TEST=1     env
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$I/program:$I/program":$W/UnpackedTarball/cppunit/src/cppunit/.libs
    $W/LinkTarget/Executable/cppunittester
$W/LinkTarget/CppunitTest/libtest_smoketest.so --headless 
"-env:BRAND_BASE_DIR=file://$S/instdir" "-env:BRAND_SHARE_SUBDIR=share" 
"-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource" "-
env:UserInstallation=file://$W/CppunitTest/smoketest.test.user"    
"-env:UNO_TYPES=file://$I/program/types.rdb file://$I/program/types/offapi.rdb" 
 "-env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb" -
env:URE_BIN_DIR=file://$I/program -env:URE_INTERNAL_LIB_DIR=file://$I/program 
-env:LO_LIB_DIR=file://$I/program -env:LO_JAVA_DIR=file://$I/program/classes 
--protector
$W/LinkTarget/Library/unoexceptionprotector.so unoexceptionprotector 
--protector $W/LinkTarget/Library/unobootstrapprotector.so 
unobootstrapprotector   -env:arg-soffice=path:$I/program/soffice -
env:arg-user=$W/CustomTarget/smoketest 
-env:arg-env=LD_LIBRARY_PATH"${LD_LIBRARY_PATH+=$LD_LIBRARY_PATH}" 
-env:arg-testarg.smoketest.doc=$W/Zip/smoketestdoc.sxw  "-
env:CPPUNITTESTTARGET=$W/CppunitTest/smoketest.test" )  2>&1  
[_RUN_____] (anonymous namespace)::Test::test
./unotest/source/cpp/officeconnection.cxx:77:(anonymous namespace)::Test::test
setUp() failed
- equality assertion failed
- Expected: 0
- Actual  : 4

(anonymous namespace)::Test::test finished in: 6ms
officeconnection.cxx:77:Assertion
Test name: (anonymous namespace)::Test::test
setUp() failed
- equality assertion failed
- Expected: 0
- Actual  : 4

Failures !!!
Run: 1   Failure total: 1   Failures: 1   Errors: 0

officeconnection.cxx line 77 corresponds to:

        CPPUNIT_ASSERT_EQUAL(
            osl_Process_E_None,
            osl_executeProcess(
                toAbsoluteFileUrl(
                    argSoffice.copy(RTL_CONSTASCII_LENGTH("path:"))).pData,
                args, std::size(args), 0, nullptr, nullptr, envs, envs == 
nullptr ? 0 : 1,
                &process_));

Looking at the error enum [2], a return value of 4 indicates an unknown error 
(osl_Process_E_Unknown).

In order to debug what was going own, I added some debug code to print the 
contents of:

        toAbsoluteFileUrl(argSoffice.copy(RTL_CONSTASCII_LENGTH("path:"))).pData

which yielded:

        
file:///home/glaubitz/loffice/libreoffice-26.2.0~beta1/instdir/program/soffice

Looking at instdir/program, there is no "soffice", just "soffice.bin" which I 
can run manually:

(sid_powerpc-dchroot)glaubitz@perotto:~/loffice/libreoffice-26.2.0~beta1$ ls -l 
instdir/program/soffice*
-rwxr-xr-x 1 glaubitz glaubitz 70144 Dec  9 18:16 instdir/program/soffice.bin
-rw-r--r-- 1 glaubitz glaubitz   520 Dec  9 12:09 instdir/program/sofficerc
(sid_powerpc-dchroot)glaubitz@perotto:~/loffice/libreoffice-26.2.0~beta1$

(sid_powerpc-dchroot)glaubitz@perotto:~/loffice/libreoffice-26.2.0~beta1$ 
./instdir/program/soffice.bin --quickstart=no --nologo --norestore --headless &
[1] 1602456
(sid_powerpc-dchroot)glaubitz@perotto:~/loffice/libreoffice-26.2.0~beta1$ kill 
%1
(sid_powerpc-dchroot)glaubitz@perotto:~/loffice/libreoffice-26.2.0~beta1$ 
./instdir/program/soffice.bin --help |head
LibreOfficeDev 26.2.0.0.beta1 

Usage: soffice [argument...]
       argument - switches, switch parameters and document URIs (filenames).   

Using without special arguments:                                               
Opens the start center, if it is used without any arguments.                   
   {file}              Tries to open the file (files) in the components        
                       suitable for them.                                      
   {file} {macro:///Library.Module.MacroName}                                  
[1]+  Exit 255                   ./instdir/program/soffice.bin --quickstart=no 
--nologo --norestore --headless
(sid_powerpc-dchroot)glaubitz@perotto:~/loffice/libreoffice-26.2.0~beta1$

Thus, I'm not really sure what the problem is.

Does anyone know how to debug an unknown error in this case? Is there a way to 
run
the commands from the smoketest manually to see if it crashes somewhere?

Thanks,
Adrian

> [1] 
> https://buildd.debian.org/status/fetch.php?pkg=libreoffice&arch=powerpc&ver=4%3A26.2.0%7Ebeta1-1&stamp=1765108295&raw=0
> [2] 
> https://github.com/LibreOffice/core/blob/aba5f8016965e42075e68faa17ddfd3b3213247d/include/osl/process.h#L63

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply via email to