The library .dylib file path was not found when building cairo for
macOS. Now it is possible to build cairo for macOS.
Built library files for cario and pixman are adjusted using the tool
install_name_tool, and also solenv/bin/macosx-change-install-names.pl
perl script which also uses install_name_tool indirectly.
From now on, macOS no longer uses the name 'libcairo' for built library
file, and it will use 'libcairo-lo' like the other platforms. This removes
the need for handling macOS differently from the other platforms.
To use headless mode, these options should be added to autogen.input:
--enable-headless
--without-system-fontconfig
--without-system-freetype
Change-Id: I1895ba651a07b1dbd8488fa973ec1d90c24de63b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194931
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
...after 2b515d095d "upgrade pixman and cairo".
For one, building ExternalProject_cairo failed with
> Run-time dependency fontconfig found: NO (tried pkgconfig and cmake)
> Not looking for a fallback subproject for the dependency fontconfig because:
> Use of fallback dependencies is disabled.
>
> meson.build:271:17: ERROR: Dependency 'fontconfig' is required but not found.
and
> Called: `/usr/bin/pkg-config --cflags fontconfig` -> 1
> stderr:
> Package libxml-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libxml-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'libxml-2.0', required by 'fontconfig', not found
in workdir/UnpackedTarball/cairo/builddir/meson-logs/meson-log.txt, because
workdir/UnpackedTarball/fontconfig/fontconfig.pc contains
> Requires.private: libxml-2.0 >= 2.6
so add workdir/UnpackedTarball/libxml2/libxml-2.0.pc to PKG_CONFIG_PATH (TODO:
even though its contents point to /usr/local? but that seems good enough to get
the build going).
For another,
> [LNK] Executable/soffice.js: wait for lock at Mon Sep 29 10:23:58 AM UTC 2025
> [LNK] Executable/soffice.js: got link lock at Mon Sep 29 10:24:03 AM UTC 2025
> em++: error: /home/sberg/lo-wasm-upstream/core/workdir/UnpackedTarball/pixman/pixman/.libs/libpixman-1.a: No such file or directory ("/home/sberg/lo-wasm-upstream/core/workdir/UnpackedTarball/pixman/pixman/.libs/libpixman-1.a" was expected to be an input file, based on the commandline arguments provided)
> make[1]: *** [/home/sberg/lo-wasm-upstream/core/desktop/Executable_soffice_bin.mk:10: /home/sberg/lo-wasm-upstream/core/instdir/program/soffice.js] Error 1
failed to link, so adapt the path in RepositoryExternal.mk.
Change-Id: I925f4fbcaabd58b0de074575293ba9b5366f2cf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191623
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Earlier, no -O flag at all got used in the cairo and pixman
builds. Which was sad, as these two libraries are performance-critical.
Yes, this change is quick-and-dirty. The proper way would be to modify
things in solenv/gbuild. But that is somewhat complicated.
In general it seems fairly hard to make sure the same compiler flags
get used for every external bundled library. Each external library is
a special snowflake, more or less, with a differently structured
ExternalProject makefile.
For instance for the libwpd library (just picked randomly as an
example), even -O2 gets used. (Which as such is OK.) This despite
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk apparently trying to
enforce use of -O1 for Emscripten.
This change has a visible impact on the performance of COWASM.
Change-Id: I99d74db2da733134fde16661881856f9a81100f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146009
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
For cross builds, odd cases of cairo configure picking up wrong librt
and then missing pthread functions - so lets just disable it, we're
not using cairo multi-threaded anyway.
Change-Id: Id8b6426203859e7bf082d71ad8cf4548928d6acc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143390
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
This is basically ea68de2968 but
for LDFLAGS. A number of external libs cannot use this because
their libtool mishandles -fuse-ld.
Change-Id: Idee379eb0a3afb475b536519ee3de064b4e218f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133639
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Building LO with WASM native EH and Emscripten 3.1.6+, the link
fails with a missing "emscripten_longjmp" symbol. Actually the
old build was simply wrong, because the emscripten_longjmp
function is just used for the Emscripten SjLj and not the native
WASM SjLj implementation. Linking just worked, because the used
libcompiler_rt-wasm-sjlj-mt.a lib was incorrectly providing that
symbol, which 3.1.6 removed.
But since running the NEH build still fails early in the same way
then before in FF nightly 100 and Chrome (= failure in the LO job
scheduler calling Task::UpdateMinPeriod for the "desktop::Desktop
m_firstRunTimer" timer, resulting in a WASM VM "RuntimeError:
indirect call signature mismatch"), there is still no way to know,
if nothing else it missing. The Emscripten / JS EH build still
works without any code changes. And it's not the first call on
a job object that fails...
And unfortunatly, because Qt itself also uses libpng, it also uses
SjLj for error handling, like LO in the image import, so the Qt
build must also be patched to build with "-s SUPPORT_LONGJMP=wasm".
Simply enough to do (see README.wasm.md). LO's configure now
detects that symbol and will bail out on incompatible Qt and LO
build setup.
See https://github.com/emscripten-core/emscripten/issues/16572
Change-Id: I3a1877f3aeb77873906176b9d3cd1ea92973f1f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132139
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
No idea why we just provided the platform flags when cross-
compiling. In the curious case, where the host platform is
detected as x86_64-pc-mingw32 per default and we actually
want to override it with x86_64-pc-cygwin, we don't do a
cross compile, but must override the host platform.
But there is additional special handling needed for the omitted
cross-platform build in the special case of --host=i686-pc-cygwin
and --build=x86_64-pc-cygwin, where we deliberatly ignore cross
building; Windows is already a slow build, so try to keep this
optimization (AMD64 can execute x86 binaries).
There is the theoretical case, where the externals config.guess
would have detected something else and that "magically" even
worked, while the LO detected triplet would fail, but this
should be fixed in the external in any way.
Change-Id: Ib7a9719e0e406fe90334b7611dc3f01b51692bfa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129153
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
All the small stuff, which is needed for the WASM build, but is
not really worth an extra patch.
* No soffice.sh script needed for WASM
* WASM soffice.bin executable extension is html
* Some small additional SAL_LOG output
* Default to colibre icon theme
* Test for qt5 even without X11
* Remove emconfigure artefacts at the end of the configure run
* No oosplash for WASM
* Disable the Office IPC thread
* Suppress -Wno-enum-conversion for Cairo builds
* Fix libnumbertext by using gb_EMSCRIPTEN_CPPFLAGS
* Map EMSCRIPTEN to LINUX nls
* No extra newlines for missing icon theme images
* Print the missing dependency in some gbuild error messages
* Copy Qt WASM loader, HTML template and SVG logo for binaries
* Especially build the vcldemo for Emscripten
Change-Id: I356370c72cc09357411e14d0c00762152877a800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128584
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
cairo.RGB24_888.patch is split out from the rest of the unrelated
patchfile it was in, this was introduced originally as:
commit 54596087e5
Author: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Date: Sat Dec 9 16:28:42 2017 -0500
vcl-svp: add 24-bit (3-byte) RGB surface support to Cairo
drop parts of pixman-ubsan.patch that no longer apply, which
maybe casts doubt over the parts that do apply if they are still
necessary
Change-Id: Id1e8f112b1121b892c97ea248b101f133f03ac48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121234
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Except for the pixman include, the ANDROID cairo external is the
same then the other OS use. It also builds fontconfig, so there
is really no need to depend on the source (ok, this way it can
be a bit more parallel, if nothing is generated). But the build
nevertheless always sets includes for fontconfig anyway. And the
code implied you can build Android without --disable-dynloading.
Change-Id: I9970dc5c052b6fa80588233244c6828079d8277e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116554
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
A full `make check screenshot` required lots of little "harmless" fixes in
pixman and cairo to address:
> cairo-image-compositor.c:133:34: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
during CppunitTest_emfio_emf
> pixman-fast-path.c:3089:23: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
during CppunitTest_emfio_emf
> pixman-sse2.c:5019:17: runtime error: load of misaligned address 0x7f99303dbac5 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
during CppunitTest_emfio_emf
> cairo-fixed-private.h:64:14: runtime error: left shift of negative value -8388608
during CppunitTest_emfio_wmf
> pixman-sse2.c:6443:20: runtime error: left shift of 198 by 24 places cannot be represented in type 'int'
during CppunitTest_filter_svg
> pixman-sse2.c:5976:6: runtime error: load of misaligned address 0x629000163202 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
during CppunitTest_filter_svg
> pixman-sse2.c:3259:10: runtime error: load of misaligned address 0x606000c85761 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
during CppunitTest_oox_vml
> pixman-sse2.c:521:18: runtime error: load of misaligned address 0x607000ca9d41 for type 'const uint32_t' (aka 'const unsigned int'), which requires 4 byte alignment
during CppunitTest_oox_vml
> pixman-gradient-walker.c:196:14: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
during CppunitTest_sc_tiledrendering
> pixman-combine32.c:786:1: runtime error: left shift of 255 by 24 places cannot be represented in type 'int32_t' (aka 'int')
during CppunitTest_vcl_backend_test
> pixman-fast-path.c:2761:29: runtime error: left shift of negative value -99
during CppunitTest_xmloff_draw
> pixman-bits-image.c:243:31: runtime error: left shift of negative value -99
during CppunitTest_xmloff_draw
> pixman-bits-image.c:244:31: runtime error: left shift of negative value -9
during CppunitTest_sd_tiledrendering
> pixman-fast-path.c:2762:29: runtime error: left shift of negative value -84
during CppunitTest_sw_rtfexport2
> cairo-gstate.c:2300:14: runtime error: null pointer passed as argument 1, which is declared to never be null
during CppunitTest_sw_ooxmlexport8
> pixman-access.c:389:2: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
during CppunitTest_sw_ooxmlexport15
> ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ff264ae275c at pc 0x7ff238941795 bp 0x7fff6bbadb10 sp 0x7fff6bbadb08
> READ of size 4 at 0x7ff264ae275c thread T0
> #0 in _add_clipped_edge at workdir/UnpackedTarball/cairo/src/cairo-polygon.c:351:24 (instdir/program/libcairo.so.2 +0x88c794)
during CppunitTest_sw_odfexport
> cairo-tor-scan-converter.c:1619:34: runtime error: left shift of negative value -39
during CppunitTest_sw_odfexport
> ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fe6ca085750 at pc 0x000000325c3a bp 0x7fff899bedd0 sp 0x7fff899be580
> READ of size 16 at 0x7fe6ca085750 thread T0
> #0 in __asan_memcpy at /home/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3 (workdir/LinkTarget/Executable/cppunittester +0x325c39)
during CppunitTest_sw_odfexport
> pixman-sse2.c:3352:14: runtime error: left shift of 65535 by 16 places cannot be represented in type 'int'
during CppunitTest_sw_odfexport
> cairo-gstate.c:2355:14: runtime error: null pointer passed as argument 1, which is declared to never be null
during CppunitTest_basctl_dialogs_test
> pixman-sse2.c:3537:10: runtime error: load of misaligned address 0x615000167682 for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
during CppunitTest_sc_screenshots
> cairo-image-source.c:512:10: runtime error: load of misaligned address 0x6180037aee6f for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
during UITest_writer_tests7
Change-Id: Icd2a211df4751d8dbfd5903bfba424b4c4672999
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104572
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
See instructions in solenv/gbuild/Trace.mk . This generates a file than
can be viewed e.g. in the Chromium tracing view.
Change-Id: I5f90647c58ca729375525b6daed2d4918adc8188
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88754
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Also transmit $(verbose) to the build so it's debuggable.
Change-Id: I8620fdcae2fcd34807b6b83b7c38aa5ca1ba2caa
Reviewed-on: https://gerrit.libreoffice.org/78596
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
This gets rid of the horrible hack in gbuild.mk to accomodate the
case-incorrect iOS platform makefiles that cannot be renamed without
upsetting git on file systems that sadly lack the case sensitivity
feature.
Keep the macro defined to IOS though.
Change-Id: I1022bfef4900da00e75fc1ccce786b20f8673234
Reviewed-on: https://gerrit.libreoffice.org/62705
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
since it has nothing to do with the headless command line option, so
use the name it has in the configure.ac file
Change-Id: Ibf0615ed02695d6e48a797f5632e4f417c010c70
Reviewed-on: https://gerrit.libreoffice.org/59611
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
In OOo times, there'd originally been efforts to allow building on Windows with
MinGW. Later, in LO times, this has been shifted to an attempt of cross-
compiling for Windows on Linux. That attempt can be considered abandoned, and
the relevant code rotting.
Due to this heritage, there are now three kinds of MinGW-specific code in LO:
* Code from the original OOo native Windows effort that is no longer relevant
for the LO cross-compilation effort, but has never been removed properly.
* Code from the original OOo native Windows effort that is re-purposed for the
LO cross-compilation effort.
* Code that has been added specifially for the LO cross-compilation effort.
All three kinds of code are removed.
(An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing
--with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.)
Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568
Reviewed-on: https://gerrit.libreoffice.org/34127
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* from pixman-0.24.4.patch drop:
- Android support config.sub: obsoleted by new upstream autoconf
- configure Mac OS X 10.4 (unsupported) linker warning
- configure getisax Solaris check: it's unclear why this would
give a wrong result on Linux, it certainly does't on Fedora 24...
- __inline__ workaround looks fixed upstream
* drop pixman-0.24.4.android.patch:
obsoleted by new upstream autoconf
* from cairo-1.10.2.patch drop:
- Makefile.win32.common: drop this for now, we don't build
cairo on windows and paths in this patch are still dmake INPATH...
- Android support config.sub: obsoleted by new upstream autoconf
- configure "libpng15" should be obsolete since it's overridden
by png_CFLAGS/png_LIBS anyway
- configure Mac OS X 10.4 (unsupported) linker warning
- cairo-output-stream.c: fixed upstream
- cairo-ft-font.c: presumed obsolete, FcResultOutOfMemory added in 2004
* drop cairo.dlsym.lcdfilter.patch:
FT_Library_SetLcdFilter since 2.3.0 so exists in RHEL 6 baseline (2.3.11)
* drop cairo-1.10.2-oldfontconfig.patch:
RHEL 6 baseline has fontconfig 2.8.0 so 2.2.95 isn't "too new"
* drop cairo-1.10.2.wntmsc.patch:
we don't build cairo on windows currently, and this doesn't apply
* drop no-flto-clang.patch:
fixed upstream
* remove definition of COMPRESS var that appears to be completely unused
Change-Id: I5d782b9267c348c266ef369db2f8ac2c3c70b90d
Reviewed-on: https://gerrit.libreoffice.org/28365
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
disables OpenGL and glew usage, lets --without-gui do what
--without-x did before and disables X related test
Change-Id: I680b47c9962a0d43c8ece593db0b82e347ceebdb
Reviewed-on: https://gerrit.libreoffice.org/23474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
When you're on Debian derivatives, using internal cairo but external
(system's) freetype, the "ft2build.h" is in /usr/include/freetype2/,
not /usr/include/, which is already in FREETYPE_CFLAGS since configure.ac
Change-Id: I24c697776bd77d423ebeafd38315cb76cad28f9b
Reviewed-on: https://gerrit.libreoffice.org/23334
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>