2025/07/16 12:45、Koji Yokota <yoko...@gmail.com>のメール:


2025/07/16 6:17、Scott Kostyshak <skost...@lyx.org>のメール:

On Tue, Jul 15, 2025 at 08:14:38PM +0200, Kornel Benko wrote:
You have use
-DLYX_CXX_FLAGS_EXTRA='-Woverloaded-virtual'

Note that I only see the warning with GCC. I do not see it with Clang.

Below are my build commands to reproduce the warning. Run the following
lines in the directory where you have the LyX git repository. Also the
parent directory needs to be writeable.

I wouldn't be surprised if the cmake command fails because we have
different dependencies. Let me know what error you get and it should be
an easy fix.

You don't have to use all of the warning flags, but they currently work
for me so I left them as is.

LYX_GIT_REPO="$( pwd )" &&
rm -rf ../CMakeBuild &&
export CC=gcc &&
export CXX=g++ &&
mkdir ../CMakeBuild &&
cd ../CMakeBuild &&
cmake -Wdev -Werror=dev "${LYX_GIT_REPO}" -DCMAKE_INSTALL_PREFIX=/usr/local -DLYX_DEBUG=ON -DLYX_RELEASE=OFF -DLYX_CPACK=ON -DLYX_PROGRAM_SUFFIX=OFF -DLYX_LOCALVERSIONING=ON -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_BINARY_RPM:BOOL=OFF -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_STGZ:BOOL=OFF -DCPACK_BINARY_TGZ:BOOL=OFF -DCPACK_BINARY_TBZ2:BOOL=OFF -DCPACK_BINARY_TZ:BOOL=OFF -DCPACK_SOURCE_TGZ:BOOL=ON -DCPACK_SOURCE_TBZ2:BOOL=OFF -DCPACK_SOURCE_TZ:BOOL=OFF -DCPACK_SOURCE_ZIP:BOOL=OFF -DLYX_HUNSPELL=ON -DLYX_EXTERNAL_HUNSPELL=ON -DLYX_ENCHANT=ON -DLYX_EXTERNAL_Z=ON -DLYX_EXTERNAL_DTL=ON -DLYX_EXTERNAL_ICONV=ON -DLYX_NLS=ON -DLYX_ENABLE_URLTESTS=OFF -DLYX_ENABLE_EXPORT_TESTS=ON -DLYX_ENABLE_KEYTESTS=OFF -DLYX_PROFILE=ON -DLYX_USE_QT=QT6 -DLYX_CXX_FLAGS_EXTRA='-Wextra;-Werror;-pedantic;-Wextra-semi;-Wmissing-include-dirs;-fmax-errors=1;-Wlogical-op;-Wduplicated-cond;-Wduplicated-branches;-fdelete-null-pointer-checks;-Wnull-dereference;-Wno-useless-cast;-Wno-missing-declarations;-Wno-float-equal;-Wcast-qual;-Wno-padded;-Wno-shadow;-Wno-effc++;-Wno-non-virtual-dtor;-Wno-aggregate-return;-Wcast-align;-Wformat=2;-Wpointer-arith;-Wsequence-point;-Wswitch;-Wunused-but-set-parameter;-Wwrite-strings;-Wredundant-decls;-Wundef;-Wno-implicit-fallthrough;-Wdouble-promotion;-Wmisleading-indentation;-Wno-sign-conversion;-Wno-conversion;-Woverloaded-virtual;-Wunused;-Wno-old-style-cast;-Wunused-macros;-Wno-missing-noreturn' -DLYX_STDLIB_DEBUG=OFF -DLYX_DEBUG_GLIBC=OFF -DLYX_DEBUG_GLIBC_PEDANTIC=OFF &&
make -j8 &&
echo 'all done.’

Thanks, I could somehow manage to test :)

I think the attached patch resolves the warnings. Could you test it?

Probably, the reason of warning was that while one of two overloaded functions (Painter::text()) was a pure virtual function, the other was not.

The function names are brought back to the original since they don’t seem to be the source of conflict.

Koji

Attachment: remedy_warnings.patch
Description: Binary data

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to