-
Notifications
You must be signed in to change notification settings - Fork 289
Add OpenSSL 3.x, V8 12.1+, GCC 15 compatibility and system library support#1641
Open
toabctl wants to merge 20 commits into
Open
Add OpenSSL 3.x, V8 12.1+, GCC 15 compatibility and system library support #1641toabctl wants to merge 20 commits into
toabctl wants to merge 20 commits into
Conversation
CLA assistant check
All committers have signed the CLA.
@toabctl
toabctl
force-pushed
the
openssl3-compat
branch
from
March 11, 2026 13:19
fa541d7 to
8f05f21
Compare
toabctl
commented
Mar 11, 2026
Author
@papacarlo could you have a look please?
looking at the other PRs in this repo, I wonder if external contributions are actually welcome. Or is this the wrong repo?
ioapibuf.h already gets all needed zlib types (uLong, voidpf, zlib_filefunc_def, OF macro) through ioapi.h which includes zlib.h. The relative ../../zlib.h include was a duplicate and creates an unnecessary hard dependency on the vendored zlib directory layout.
When use_system_zlib is set, link against system -lz and force-include zlib_addon.h so the patched vendored minizip sources still see the addon flags. The vendored minizip is kept as it has OnlyOffice-specific patches (ioapibuf, disabled CRC check, read-only open mode flag).
Create centralized cryptopp.pri with use_system_cryptopp flag, replacing ad-hoc CRYPTOPP_DISABLE_ASM defines and -lCryptoPPLib links scattered across 7 consumer .pro files. Change all #include paths from relative vendored paths to portable <cryptopp/foo.h> form, which works for both vendored (via INCLUDEPATH pointing to Common/3dParty/) and system (/usr/include/cryptopp/) headers. CRYPTOPP_DISABLE_ASM is only defined for vendored builds to avoid ODR violations when linking against a system library built with ASM enabled.
Wrap vendored include/library paths in !use_system_boost guard. When using system boost, link without -L paths since system libs are in the default search path. Compiler flags (enum constexpr warnings, ARM64 defines) remain unconditional as they apply regardless of boost source.
When use_system_icu is set, link against system -licuuc -licudata without vendored include/library paths. All platform-specific vendored ICU configuration (Windows, Linux, macOS, iOS, Android) is wrapped in the else branch.
Create harfbuzz.pri with use_system_harfbuzz guard. When set, link against system -lharfbuzz. Otherwise include the generated harfbuzz_sources.pri from make.py. Update make.py to write to harfbuzz_sources.pri instead of harfbuzz.pri so the git-tracked file is not overwritten. Update .gitignore to track harfbuzz.pri and ignore the generated harfbuzz_sources.pri.
When use_system_heif is set, link against system -lheif -lde265 -lx265 without vendored paths or static build defines. All platform-specific vendored library paths (Windows, Linux/Android, macOS/iOS) are wrapped in the else branch.
When use_system_v8 is set, link against system libv8_monolith from /usr/lib with headers from /usr/include/v8 (as provided by the chromium-v8-dev package). Defines V8_VERSION_89_PLUS, V8_VERSION_121_PLUS, V8_COMPRESS_POINTERS, and DISABLE_MEMORY_LIMITATION for compatibility with modern V8 (12.1+). Add V8_VERSION_121_PLUS guards for API changes: - Inspector connect() requires additional trust/debugger params - VisitHandlesWithClassIds() was removed
Change from vendored relative path to <libheif/heif.h> which works with both system libheif (/usr/include/libheif/heif.h) and vendored libheif (via INCLUDEPATH from heif.pri).
GCC 14+ treats -Wincompatible-pointer-types as an error. The jasper code used int* where jpc_fix_t* (long int* on 64-bit) was expected. Fix the function declarations, definitions, and struct typedef to use jpc_fix_t consistently: - jpc_ft_synthesize() parameter in jpc_qmfb.c - analyze/synthesize function pointers in jpc_qmfb2d_t struct - jpc_tsfb_analyze2/synthesize2() parameters in jpc_tsfb.c These changes are backward compatible with older GCC as they correct the types to match actual usage on all architectures.
@toabctl
toabctl
force-pushed
the
openssl3-compat
branch
from
March 12, 2026 10:56
4b00199 to
78a4250
Compare
pole.cpp: Replace wide string literals (L"...") with narrow ones when outputting to std::cout. GCC 15 libstdc++ deletes the operator<<(ostream, wchar_t*) overload as mixing narrow/wide streams is undefined behavior. v8_base: Add V8Holder compat macro that maps to This() on V8 12.1+ (where Holder() was removed) and Holder() on older V8. Replace all Holder() calls in v8_base.h and v8_base.cpp. inspector/utils.cpp: Use v8::Isolate::GetCurrent() instead of Context::GetIsolate() which was removed in newer V8.
@toabctl
toabctl
force-pushed
the
openssl3-compat
branch
3 times, most recently
from
March 13, 2026 19:45
c9c61b6 to
176d612
Compare
When use_system_v8 is set, link against system libv8 from /usr/lib with headers from /usr/include/v8 (as provided by the nodejs-22-libv8 package which extracts V8 from Node.js). Defines V8_VERSION_89_PLUS, V8_VERSION_121_PLUS, and DISABLE_MEMORY_LIMITATION for compatibility with modern V8 (12.1+). Node.js V8 does not enable pointer compression by default, so V8_COMPRESS_POINTERS is not defined. V8_SUPPORT_SNAPSHOTS is also not defined as snapshots require sdkjs compiled from source.
@toabctl
toabctl
force-pushed
the
openssl3-compat
branch
from
March 13, 2026 20:50
176d612 to
f22a1fb
Compare
The zlip_set_addition_flag and zlip_get_addition_flag functions are used across shared library boundaries (defined in libkernel.so, called by consumers). Add extern "C" guards so C++ callers use the correct C linkage, and add explicit default visibility to ensure they are exported from the shared library built with -fvisibility=hidden.
@toabctl
toabctl
force-pushed
the
openssl3-compat
branch
from
March 14, 2026 06:50
1af0409 to
30f03ae
Compare
@toabctl
toabctl
changed the title
(削除) common_openssl: add OpenSSL 3.x compatibility (削除ここまで)
(追記) Add OpenSSL 3.x, V8 12.1+, GCC 15 compatibility and system library support (追記ここまで)
Mar 16, 2026
@toabctl
toabctl
force-pushed
the
openssl3-compat
branch
from
March 16, 2026 08:56
3678d99 to
3e85b5c
Compare
When use_system_googletest is set, link against system -lgtest (and optionally -lgtest_main, -lgmock) instead of compiling vendored sources. All vendored source compilation is wrapped in the else branch. Add core_no_gtest_main and core_gmock config flags to control gtest_main and gmock inclusion, replacing per-project SOURCES -= hacks that break under use_system_googletest. Migrate cfcpp/test, OOXML/test, and OdfFile/Test/test_odf to use the central googletest.pri with the new config flags.
@toabctl
toabctl
force-pushed
the
openssl3-compat
branch
from
March 16, 2026 11:49
3e85b5c to
c75ccef
Compare
toabctl
commented
Mar 16, 2026
Author
I'm happy to split this up into smaller commits and adjust to whatever you prefer.
But I would like to understand if this is a feasible approach that have a chance to get merged upstream .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Summary
This PR makes it possible to build OnlyOffice core against system-provided libraries and modern toolchains, enabling proper distribution packaging (e.g. openSUSE/Fedora RPMs) instead of relying solely on vendored/bundled dependencies.
OpenSSL 3.x compatibility
RSA_new()/RSA_generate_multi_prime_key()to theEVP_PKEY_CTXinterface, which works on both OpenSSL 1.1.x and 3.x (migration guide)EVP_CIPHER_CTX_init()calls (EVP_CIPHER_CTX_new()already zero-initializes) and no-opEVP_cleanup()calls (docs)HashEmbedV8 12.1+ compatibility
V8Holdercompat macro (This()on 12.1+,Holder()on older V8)VisitHandlesWithClassIds()removal and inspectorconnect()API changes behindV8_VERSION_121_PLUSv8::Isolate::GetCurrent()instead of removedContext::GetIsolate()GCC 14/15 fixes
-Wincompatible-pointer-typeserrors in vendored jasper (int*vsjpc_fix_t*)pole.cppthat GCC 15 libstdc++ rejects (operator<<(ostream, wchar_t*)deleted)System library support (
CONFIG+=use_system_*)Add
use_system_*qmake config flags to link against system-installed packages instead of vendored copies:use_system_openssluse_system_zlib(keeps vendored minizip with OnlyOffice-specific patches)use_system_cryptopp— also normalizes include paths to portable<cryptopp/foo.h>formuse_system_boostuse_system_icuuse_system_harfbuzzuse_system_heif— also switches to portable<libheif/heif.h>includeuse_system_v8— targets V8 from system packages (e.g.nodejs-22-libv8)Other fixes
zlib_addonsymbols with proper C linkage and visibility for shared library buildszlib.hinclude fromioapibuf.h