https://bugs.documentfoundation.org/show_bug.cgi?id=155446

            Bug ID: 155446
           Summary: LibreOffice does not build with ccache enabled on
                    Windows
           Product: LibreOffice
           Version: 7.6.0.0 alpha1+ Master
          Hardware: All
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

Description:
On Windows, building LibreOffice master with ccache enabled using Visual Studio
became possible with the patches from Luboš Luňák in 2021.

At the time, a patched version of Cygwin ccache.exe binary was used.
Unfortunately, the performance was not good, and the decision was not to use
it.

Right now, the official binaries of the Cygwin contain the above patches, and
they work with Visual Studio.

But with the latest sources, LibreOffice does not build when ccache enabled on
Windows. OpenSSL is one of the libraries that LibreOffice depends on, and it
does not build with ccache enabled.

Steps to Reproduce:
1. Build LibreOffice from sources on Windows using LODE instructions:
https://wiki.documentfoundation.org/Development/lode
2. Download ccache binary from Github, and put it in C:\cygwin64\bin (or other
relevant folder, if you have changed the default Cygwin folder).

cccache 4.8.1
Windows x86_64 binary release
https://github.com/ccache/ccache/releases

3. Enable ccache in autogen.input with --enable-ccache
4. Build OpenSSL with:
    ./autogen.sh; make openssl

Actual Results:
Build fails with:

$ make openssl
cd C:/cygwin64/home/user/lode/dev/core/external/openssl &&
C:/cygwin64/home/user/lode/opt/bin/make -j 8 -rs
[build LOC] openssl
[build UPK] openssl-3.0.8.tar.gz
[build LOC] top level modules: openssl
[build PAT] openssl
Configuring OpenSSL version 3.0.8 for target VC-WIN64A
Using os-specific seed configuration
Created configdata.pm
Running configdata.pm
Created makefile.in
Created makefile
Created include/openssl/configuration.h

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL.md file first)      ***
***                                                                ***
**********************************************************************

jom 1.1.2 - empower your cores

        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/crypto/bn_conf.h.in" > include\crypto\bn_conf.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/crypto/dso_conf.h.in" > include\crypto\dso_conf.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/asn1.h.in" > include\openssl\asn1.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/asn1t.h.in" > include\openssl\asn1t.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/bio.h.in" > include\openssl\bio.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/cmp.h.in" > include\openssl\cmp.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/cms.h.in" > include\openssl\cms.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/conf.h.in" > include\openssl\conf.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/crmf.h.in" > include\openssl\crmf.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/crypto.h.in" > include\openssl\crypto.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/ct.h.in" > include\openssl\ct.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/err.h.in" > include\openssl\err.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/ess.h.in" > include\openssl\ess.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/fipskey.h.in" > include\openssl\fipskey.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/lhash.h.in" > include\openssl\lhash.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/ocsp.h.in" > include\openssl\ocsp.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/opensslv.h.in" > include\openssl\opensslv.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/pkcs12.h.in" > include\openssl\pkcs12.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/pkcs7.h.in" > include\openssl\pkcs7.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/safestack.h.in" > include\openssl\safestack.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/srp.h.in" > include\openssl\srp.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/ssl.h.in" > include\openssl\ssl.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/ui.h.in" > include\openssl\ui.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/x509.h.in" > include\openssl\x509.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/x509_vfy.h.in" > include\openssl\x509_vfy.h
        "C:/cygwin64/bin/perl.exe" "-I." -Mconfigdata "util/dofile.pl"
"-omakefile" "include/openssl/x509v3.h.in" > include\openssl\x509v3.h
        C:\cygwin64\bin\jom.exe / depend
        C:\cygwin64\bin\jom.exe / _build_sw
        "C:\cygwin64\bin\ccache.exe
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe
"  -Z7  /Gs0 /GF /Gy /MD /W3 /wd4090 /nologo /O2 -I"." -I"include"
-I"apps/include" -D"L_ENDIAN" -D"OPENSSL_PIC" -D"OPENSSLDIR=\"C:/Program
Files/Common Files/SSL\"" -D"ENGINESDIR=\"C:/Program
Files/OpenSSL/lib/engines-3\"" -D"MODULESDIR=\"C:/Program
Files/OpenSSL/lib/ossl-modules\"" -D"OPENSSL_BUILDING_OPENSSL"
-D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN" -D"UNICODE" -D"_UNICODE"
-D"_CRT_SECURE_NO_DEPRECATE" -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"NDEBUG"  
-c /Foapps\lib\libapps-lib-app_libctx.obj "apps/lib/app_libctx.c"
The filename, directory name, or volume label syntax is incorrect.
jom:
C:\cygwin64\home\user\lode\dev\core\workdir\UnpackedTarball\openssl\Makefile
[apps\lib\libapps-lib-app_libctx.obj] Error 1
        "C:\cygwin64\bin\ccache.exe
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe
"  -Z7  /Gs0 /GF /Gy /MD /W3 /wd4090 /nologo /O2 -I"." -I"include"
-I"apps/include" -D"L_ENDIAN" -D"OPENSSL_PIC" -D"OPENSSLDIR=\"C:/Program
Files/Common Files/SSL\"" -D"ENGINESDIR=\"C:/Program
Files/OpenSSL/lib/engines-3\"" -D"MODULESDIR=\"C:/Program
Files/OpenSSL/lib/ossl-modules\"" -D"OPENSSL_BUILDING_OPENSSL"
-D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN" -D"UNICODE" -D"_UNICODE"
-D"_CRT_SECURE_NO_DEPRECATE" -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"NDEBUG"  
-c /Foapps\lib\libapps-lib-app_params.obj "apps/lib/app_params.c"
The filename, directory name, or volume label syntax is incorrect.
        "C:\cygwin64\bin\ccache.exe
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe
"  -Z7  /Gs0 /GF /Gy /MD /W3 /wd4090 /nologo /O2 -I"." -I"include"
-I"apps/include" -D"L_ENDIAN" -D"OPENSSL_PIC" -D"OPENSSLDIR=\"C:/Program
Files/Common Files/SSL\"" -D"ENGINESDIR=\"C:/Program
Files/OpenSSL/lib/engines-3\"" -D"MODULESDIR=\"C:/Program
Files/OpenSSL/lib/ossl-modules\"" -D"OPENSSL_BUILDING_OPENSSL"
-D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN" -D"UNICODE" -D"_UNICODE"
-D"_CRT_SECURE_NO_DEPRECATE" -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"NDEBUG"  
-c /Foapps\lib\libapps-lib-app_provider.obj "apps/lib/app_provider.c"
jom:
C:\cygwin64\home\user\lode\dev\core\workdir\UnpackedTarball\openssl\Makefile
[apps\lib\libapps-lib-app_params.obj] Error 1
The filename, directory name, or volume label syntax is incorrect.
jom:
C:\cygwin64\home\user\lode\dev\core\workdir\UnpackedTarball\openssl\Makefile
[apps\lib\libapps-lib-app_provider.obj] Error 1
jom:
C:\cygwin64\home\user\lode\dev\core\workdir\UnpackedTarball\openssl\makefile
[build_sw] Error 2
make[1]: ***
[C:/cygwin64/home/user/lode/dev/core/external/openssl/ExternalProject_openssl.mk:65:
C:/cygwin64/home/user/lode/dev/core/workdir/ExternalProject/openssl/build]
Error 1
make: *** [Makefile:121: openssl] Error 2

Expected Results:
Build should pass


Reproducible: Always


User Profile Reset: No

Additional Info:
A more detailed description is provided here:

Using ccache and jom to speed up Windows builds
https://lists.freedesktop.org/archives/libreoffice/2023-May/090397.html

Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: dc11f5b151e1a2ea2623fc8cf806a400763955d9
CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_DE); UI: en-US
Calc: CL threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to