-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake 3.11 (potential) issues #1361
Comments
|
Thanks @adriaandegroot, looks like an interesting problem. 😉 @lbartoletti Any ideas? Asking just due to the FreeBSD bit, but kind of hoping... 😄 |
|
Heh Heh Heh: https://euroquis.nl/bobulate/?p=1816
I kind of wonder if we should just be using either the enum or the defines. Doubling up doesn't sound like a good approach. 😉 |
|
@justinclift why using a copy of QtScintilla? |
|
Good question. Trying to remember the answer to that... I'm not sure. My suspicion is that we bundle it so that it's easily available to us for compiling across all platforms. eg Windows in particular where 3rd party dependencies are often all over the place |
|
Hmm, not sure if we can do anything about that. You could try moving the mentioned file names up or down in the lists in libs/qscintilla/Qt4Qt5/CMakeLists.txt. Or maybe change line 167 ( |
|
And Justin is right about the reasons for including a copy of QScintilla. It's all about letting people build DB4S as easily as possible (obviously not thinking about your case here...) without having to install any libraries or setting up any include paths despite Qt and SQLite. |
|
I have the same problem too on Win 7. Last known CMake version to build DB4S is 3.10.3. I tried Martin's suggestion and it didn't work. |
|
Just thinking out loud here. This wasn't an issue with older version of CMake, up to 3.10.3. With the introduction of 3.11, DB4S fails to build. So I checked their release notes and it appears they changed something regarding AUTOMOC. The new version will start multiple parallel Maybe that's the reason behind the change in the order of includes that Adriaan mentioned? |
|
Here's what I found out so far. We get the compile error because there is a Now cmake generates a file called // This file is autogenerated. Changes will be overwritten.
#include "EWIEGA46WW/moc_SciClasses.cpp"
#include "EWIEGA46WW/moc_ScintillaQt.cpp"
#include "SARX73RSAP/moc_qsciabstractapis.cpp"
#include "SARX73RSAP/moc_qsciapis.cpp"
#include "SARX73RSAP/moc_qscilexer.cpp"
#include "SARX73RSAP/moc_qscilexercpp.cpp"
#include "SARX73RSAP/moc_qscilexercustom.cpp"
#include "SARX73RSAP/moc_qscilexerhtml.cpp"
#include "SARX73RSAP/moc_qscilexerjavascript.cpp"
#include "SARX73RSAP/moc_qscilexerjson.cpp"
#include "SARX73RSAP/moc_qscilexerpython.cpp"
#include "SARX73RSAP/moc_qscilexersql.cpp"
#include "SARX73RSAP/moc_qscilexerxml.cpp"
#include "SARX73RSAP/moc_qscimacro.cpp"
#include "SARX73RSAP/moc_qsciscintilla.cpp"
#include "SARX73RSAP/moc_qsciscintillabase.cpp"All the files and directories included there are generated, too. Interestingly the first two lines are in a different directory than the other ones. If I move them to the bottom of the file, it compiles just fine. So the question seems to be: what can we do to let cmake generate the file in such a way that these two files are included last? I guess to answer this we would need to understand why there are even two different subdirectories. The documentation says:
But I don't see why there should be a name collision here. I'm going to stop investigating now. For me, what's said here about xorg.conf is equally true (or even truer (if that's a word)) for cmake files. But maybe somebody has an answer to my question above 😒 |
|
Heh Heh Heh That's good research. Very valid conclusion too. We may need to ask on the CMake mailing list to get an answer though (unsure). 😉 |
|
@MKleusberg, Do you know what exactly autogenerates that file? |
Could we instead take the approach of changing the name of either the Kind of thinking we might not be the only people that use it with CMake, so if we describe the problem to them they might be willing to work out some solution or use whatever we figure out. 😄 |
|
@revolter The program that generates the @justinclift I don't think it's that easy. The Scintilla library uses So I think this is something we need to look into and fix and we need to do it by tweaking something with cmake, even though I don't like that conclusion... |
|
But we already modified the local QScintilla version. For example, we manually removed support for other programming languages by removing lines from multiple files. |
|
You're right of course. But I think the scale would be different. Currently we have some very local changes (and some of them are already applied upstream) on the one hand and the removed files on the other hand. The first sort are small changes which only apply to some internals in QScintilla functions. The last sort only remove obviously not needed files, and introducing them back by accident wouldn't really hurt much. Changing the name of the Not sure if that's convincing 😉 But I think renaming symbols would be more error-prone (too much for my taste, given that all this is a workaround for an issue which should have a proper solution) than the changes we made so far in QScintilla. As a last resort though, why not 😄 |
|
Renaming the enum is definitely a bad idea. But couldn't we remove the |
|
Removing the |
Maybe solvable by wrapping it inside it's own Something like: |
I guess the different generated directory names are because the source headers are in different directories (then their basenames might collide, although it isn't our case): ./Qsci/qsciscintillabase.h
./Qsci/qsciabstractapis.h
./Qsci/qsciapis.h
./Qsci/qscilexer.h
./Qsci/qscilexercustom.h
./Qsci/qscilexersql.h
./Qsci/qscilexerjson.h
./Qsci/qscilexerhtml.h
./Qsci/qscilexerxml.h
./Qsci/qscilexerjavascript.h
./Qsci/qscilexercpp.h
./Qsci/qscilexerpython.h
./Qsci/qscimacro.h
SciClasses.h
ScintillaQt.h
SciAccessibility.h
|
|
Also worth testing if setting AUTOGEN_PARALLEL to 1 returns to the older behaviour, given the already mentioned reference in the release notes:
|
|
I just updated to Ubuntu 18.06 and installed CMake 3.13.1. I've reproduced the issue and have tested with AUTOGEN_PARALLEL set to 1 (no success) and with QT5_WRAP_CPP (it is compiling now). I'm going to test with cmake from Ubuntu (3.10.2) and if it also works, I'll commit this change and we will be able to finally close this issue. |
CMake 3.11 has a new AUTOMOC implementation that is breaking QScintilla compilation. https://cmake.org/cmake/help/v3.11/release/3.11.html#autogen It is disabled and QT5_WRAP_CPP used instead. This has been tested with CMake 3.10.2 and 3.13.1. See issue #1361
|
@adriaandegroot @moll @deepsidhu1313 @ihexon |
|
Oh fantastic! I'm playing around with some compilation stuff in a Windows VM atm anyway (getting ready to test SQLCipher 4.0.0). I'll update CMake in the VM to the latest version and see if |
|
Awesome work Manuel. Just tested it with the latest version of CMake (v3.13.1) and it compiled without any problems. 👍 😃 |
|
Whooo Hooo! 😄 |
|
SQLite 3.26.0 was released yesterday. Going to test that as well. 😄 |
|
Don't forget OpenSSL 1.0.2q too. 😃 |
|
Thanks, hadn't noticed that. Was more planning to check OpenSSL 1.1.x + newer SQLCipher, mainly to get an understanding of whether it builds "as is". Before we even think about what options we need to change for the newer SQLCipher anyway. 😄 |
CMake 3.11 has a new AUTOMOC implementation that is breaking QScintilla compilation. https://cmake.org/cmake/help/v3.11/release/3.11.html#autogen It is disabled and QT5_WRAP_CPP used instead. This has been tested with CMake 3.10.2 and 3.13.1. See issue #1361
|
Just cherry-picked the commit across to the |
|
Compilation with SQLCipher v4.0.0 works without any changes done, at least when using OpenSSL 1.0.2p. Yeah, that OpenSSL is a bit outdated. I'll try it with OpenSSL 1.1.0j next. |
|
I can confirm issue has been resolved, latest builds are deployed to testing ppa for 18.10 and 19.04. Thank you guys!! |
|
Excellent. Closing this now, as the CMake problem is (finally) fixed. 😄 |
|
Awesome 👍 Thanks, Manuel 😄 |
Details for the issue
CMake 3.11 produces a
mocs_compilation.cppfile that has the includes in a slightly different order than CMake 3.10. This affects the build of the embedded QScintilla, which has a header file declaringenum { SCI_SELECTALL = 2013 }and a different header file doing#define SCI_SELECTEALL 2013.There doesn't seem to be a CMake policy to change to the old sorting; you could add a weird hack to the Scintilla headers to force the declaration to be included from the header doing the
#defineing -- before the#defines -- to avoid this. I don't know what (if) QScintilla is doing about it.In the FreeBSD packaging (which is where I noticed this), we have just switched to using the system QScintilla. (Which needed patching -- the FindQScintilla module is a bit wonky).
Useful extra information
Actrual compiler error:
I'm opening this issue because:
I'm using DB4S on:
I'm using DB4S version:
I have also:
The text was updated successfully, but these errors were encountered: