Am Do., 15. Dez. 2022 um 22:54 Uhr schrieb Yu Jin <technikma...@gmail.com>:
> Am Mi., 14. Dez. 2022 um 19:50 Uhr schrieb Scott Kostyshak < > skost...@lyx.org>: > >> On Sat, Dec 10, 2022 at 05:09:46PM +0100, Kornel Benko wrote: >> > Am Sat, 10 Dec 2022 15:38:43 +0100 >> > schrieb Yu Jin <technikma...@gmail.com>: >> > >> > > Am Do., 8. Dez. 2022 um 16:11 Uhr schrieb Kornel Benko < >> kor...@lyx.org>: >> > > >> > > > Am Thu, 8 Dec 2022 09:52:29 -0500 >> > > > schrieb Scott Kostyshak <skost...@lyx.org>: >> > > > >> > > > > On Mon, Dec 05, 2022 at 10:15:18PM +0100, Yu Jin wrote: >> > > > > > Am Mo., 5. Dez. 2022 um 10:39 Uhr schrieb Pavel Sanda < >> sa...@lyx.org>: >> > > > > > >> > > > > > > >> > > > > > > Given that on major linux distributions will still link >> against qt5 >> > > > > > > I think stikcing for 2.4 with Qt 5 is just fine... >> > > > > > >> > > > > > >> > > > > > I think my curiosity helped here :) >> > > > > > >> > > > > > So I found out that there is different version of zlib in the Qt >> > > > versions, >> > > > > > the working Qt has a version 1.2.11 (I can see it in the zlib.h >> in e.g. >> > > > > > C:\Qt\6.3.1\msvc2019_64\include\QtZlib folder and the broken Qt >> > > > Versions >> > > > > > have 1.2.12 or 13. >> > > > > > I digged a bit more and found that our projects in Visual Studio >> > > > include >> > > > > > those QtZlib folders for some reason: >> > > > > > and lyx's zlib folder gets included further below which means >> it has >> > > > lower >> > > > > > priority. If I just remove the QtZlib include from the project, >> > > > compilation >> > > > > > works. Can we do something in CMake here so that QtZlib is not >> > > > included? >> > > > > >> > > > > CC'ing Kornel if he has time to take a look at the CMake question. >> > > > > >> > > > > Scott >> > > > >> > > > I really have no idea. I don't even have QtZlib directory on my >> system. >> > > > Even searching with 'apt-file find QtZlib' >> > > > >> > > > Ok so i found out that QtZlib is a dependency of QtCore and QtCore >> is a >> > > dependency of Qt6Core5Compat. Since we have >> > > include_directories(${Qt6Core5Compat_INCLUDE_DIRS}) >> > > >> > > >> https://git.lyx.org/?p=lyx.git;a=blob;f=CMakeLists.txt;h=4a9c428d4a48c838f9e9cd61fab59c46a330b1b3;hb=HEAD#l837 >> > > >> > > It includes those dirs. I don't know it does seem kinda suspicious to >> me, >> > > because actually Qt forces everyone who needs Core to use QtZlib with >> that, >> > > but I can't evaluate that. I just tried to add a >> > > list(REMOVE_ITEM Qt6Core5Compat_INCLUDE_DIRS >> > > "C:/Qt/6.4.1/msvc2019_64/include/QtZlib") >> > > just before that include_directories command and it works >> > > perfectly fine, everything compiles and runs as it should. With Qt5 it >> > > works fine because we don't include any dirs there but we do with that >> > > compatibility module. >> > > What we could do is use this command: >> > > list(REMOVE_ITEM Qt6Core5Compat_INCLUDE_DIRS >> > > "${CMAKE_PREFIX_PATH}/include/QtZlib") >> > > but it would rather be a workaround than a solution. Any thoughts? >> > >> > If this works for you, then I have no objection. >> > Works for debian (it is noop there). >> >> Yu Jin, does Kornel's patch indeed work for you? Even though it is a >> workaround, since we don't have a better fix let's just go for it if it >> works for you? >> > > Yes it does work, but actually I had a better idea to > use ${_Qt6ZlibPrivate_OWN_INCLUDE_DIRS} instead of > "${CMAKE_PREFIX_PATH}/include/QtZlib", because it is in the variable > already. I have sent a patch here: > https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg218797.html > can you test it again, it contains 2 more changes, but you can ignore > those, they only affect wininstaller. > Then I can push it if it still works for linux. > Here is a separate patch for just the CMake part. -- Eugene
qtzlibinc.diff
Description: Binary data
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel