Discussion:
cannot compile LyX with MSVC 2013 and Qt 5 or Qt 4 - need CMake help
Uwe Stöhr
2014-06-24 22:23:03 UTC
Permalink
Dear LyX developers,

thanks to a mainboard crash I had again to setup my complete build
system and after 6 hours of trying to compile LyX I am a bit lost.

There are several problems that I cannot solve:

- I have now Win 7 64bit and installed MSVC2010. MSVC2010 requires the
.net framework version 4.0, but my graphics driver requires .net 4.5.
Unfortunately when .net 4.5 is installed, .net 4.0 is removed because it
is not compatible with 4.5.
I read the Miscrosoft pages and they say one should upgrade to MSVC
2012. But they only offer the newer MSVC 2013. I installed it.

- I installed the openGL version of Qt 5.3 But this version is
incompatible with CMake because CMake wants to find a library called
glu32. This library does not exist and all attempts to fix this issue as
written in the Internet failed for me. It turned out that one must
install a non-openGL version of Qt. So I uninstalled Qt 5.3 and
re-installed it without OpenGL.

Now the glu32-problem is solved, but CMake still makes problems:

- CMake Warning at CMakeLists.txt:549 (find_package):
By not providing "FindQt5X11Extras.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5X11Extras", but CMake did not find one.

But there is no Qt5X11 folder nor such files in the Windows releases of Qt.

After configuring and pressing "Generate" in the CMake-gui, I get tons
of these 2 warnings:

- CMake Warning (dev) in src/CMakeLists.txt:
Policy CMP0020 is not set: Automatically link Qt executables to qtmain
target on Windows. Run "cmake --help-policy CMP0020" for policy details.
Use the cmake_policy command to set the policy and suppress this
warning. This warning is for project developers. Use -Wno-dev to
suppress it.
CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
CMake Warning (dev) in src/CMakeLists.txt:
Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config>
properties.
Run "cmake --help-policy CMP0043" for policy details. Use the
cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.


Then I also get this warning, although I specified the path to the
Qt5::Concurrent CMake folder of Qt:

- Target "LyX" links to target "Qt5::Concurrent" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED
target, or
an ALIAS target is missing?
This warning is for project developers. Use -Wno-dev to suppress it.


Finally CMake stops with these errors:

- CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is: CMAKE_CXX_FLAGS_ DEBUG

But its value is set:
/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1

The same appears for these variables:

CMAKE_CXX_FLAGS_ MINSIZEREL
CMAKE_CXX_FLAGS_ RELWITHDEBINFO
CMAKE_CXX_FLAGS_ DEBUG
CMAKE_CXX_FLAGS_ MINSIZEREL
CMAKE_CXX_FLAGS_ RELWITHDEBINFO

which are all set in CMake.


When I want now compile LyX, I get this error

D:\LyXGit\Master\compile-result\lyx.sln.metaproj : error MSB4126: The
project map configuration "Release|x64" is invalid.

But I have nowhere set "x64" as configuration and can also not find such
a setting in CMake.

Nevertheless the compilation starts and I get this compiler warning:

"D:\LyXGit\Master\compile-result\src\LyX.vcxproj" (Standardziel) (3) ->
(ClCompile Ziel) ->
..\..\src\Paragraph.cpp(3855): warning C4018: '<': conflict between
'signed' and 'unsigned' [D:\LyXGit\Master\compile-resul\src\LyX.vcxproj]


Sorry for being again such a noob with the compile business but I am
again completely lost.
I also tried to use Qt 4.8.6 with MSCV 2013 but when I choose this
compiler for LyX 2.1.x CMake always wants to use Qt 5. I even
uninstalled Qt 5.3 but then CMake says, that Qt cannot be found. Only if
I use MSVC 2010 as compiler CMake accepts Qt 4.8.6. But MSVC 2010 is no
option as I mentioned.

So what I need is a way to compile LyX 2.1.x using either Qt 4.8.x or Qt
5.3 using MSVC 2013. Is this possible? and if yes, how?


many thanks in advance and again sorry for my technical limitations
Uwe
Scott Kostyshak
2014-06-24 22:49:46 UTC
Permalink
So what I need is a way to compile LyX 2.1.x using either Qt 4.8.x or Qt 5.3
using MSVC 2013. Is this possible? and if yes, how?
Hi Uwe,

Sorry you're having trouble with this. 6 hours dealing with build
errors is not fun at all!

Are you able to build a previous version of LyX? For example, 2.1
release? I don't understand whether you're having trouble building
because of changes that have been made to the CMake code or changes to
your build environment from your mainboard crash.

Kornel and I have made significant changes to the CMake code and both
of us only have access to test on Linux (and worse, both only on
Ubuntu) so it's hard for us to test that it works on other platforms.
Thanks for your patience. However, to my knowledge we have not made
any significant changes to the 2.1.x branch. Do you mean master
branch?

On master branch, there is now a flag that controls whether CMake
compiles LyX with Qt 4 or Qt 5. Qt 4 is the default. To try with Qt 5,
set the flag -DLYX_USE_QT=QT5

Scott
Kornel Benko
2014-06-25 09:28:17 UTC
Permalink
Post by Scott Kostyshak
So what I need is a way to compile LyX 2.1.x using either Qt 4.8.x or Qt 5.3
using MSVC 2013. Is this possible? and if yes, how?
Hi Uwe,
Sorry you're having trouble with this. 6 hours dealing with build
errors is not fun at all!
Are you able to build a previous version of LyX? For example, 2.1
release? I don't understand whether you're having trouble building
because of changes that have been made to the CMake code or changes to
your build environment from your mainboard crash.
I understood that he _is_ trying 2.1.
QT5 will be used there, if cmake finds it. So one has to deinstall QT5.
Post by Scott Kostyshak
Kornel and I have made significant changes to the CMake code and both
of us only have access to test on Linux (and worse, both only on
Ubuntu) so it's hard for us to test that it works on other platforms.
Thanks for your patience. However, to my knowledge we have not made
any significant changes to the 2.1.x branch. Do you mean master
branch?
On master branch, there is now a flag that controls whether CMake
compiles LyX with Qt 4 or Qt 5. Qt 4 is the default. To try with Qt 5,
set the flag -DLYX_USE_QT=QT5
I would discourage QT5 for now, we know QT4 was working on windows, it may also work on 64-bit windows.
Post by Scott Kostyshak
Scott
Kornel
Kornel Benko
2014-06-25 16:28:58 UTC
Permalink
Post by Kornel Benko
Post by Scott Kostyshak
So what I need is a way to compile LyX 2.1.x using either Qt 4.8.x or Qt 5.3
using MSVC 2013. Is this possible? and if yes, how?
Hi Uwe,
Sorry you're having trouble with this. 6 hours dealing with build
errors is not fun at all!
Are you able to build a previous version of LyX? For example, 2.1
release? I don't understand whether you're having trouble building
because of changes that have been made to the CMake code or changes to
your build environment from your mainboard crash.
I understood that he _is_ trying 2.1.
QT5 will be used there, if cmake finds it. So one has to deinstall QT5.
Post by Scott Kostyshak
Kornel and I have made significant changes to the CMake code and both
of us only have access to test on Linux (and worse, both only on
Ubuntu) so it's hard for us to test that it works on other platforms.
Thanks for your patience. However, to my knowledge we have not made
any significant changes to the 2.1.x branch. Do you mean master
branch?
On master branch, there is now a flag that controls whether CMake
compiles LyX with Qt 4 or Qt 5. Qt 4 is the default. To try with Qt 5,
set the flag -DLYX_USE_QT=QT5
I would discourage QT5 for now, we know QT4 was working on windows, it may also work on 64-bit windows.
Post by Scott Kostyshak
Scott
Uwe, please try this patch (on 2.1 branch).
The patch implements the use of LYX_USE_QT variable, so the default compilation should use
qt4 even if also qt5 devel files are installed.

Kornel
Uwe Stöhr
2014-06-25 21:29:34 UTC
Permalink
Post by Kornel Benko
Post by Kornel Benko
I understood that he _is_ trying 2.1.
Yes.
Post by Kornel Benko
Post by Kornel Benko
QT5 will be used there, if cmake finds it. So one has to deinstall QT5.
That is bad.
Post by Kornel Benko
Uwe, please try this patch (on 2.1 branch).
The patch implements the use of LYX_USE_QT variable, so the default compilation should use
qt4 even if also qt5 devel files are installed.
That would be very helpful. This way I can try Qt 5 for master and use
Qt 4 to compile releases of 2.1. Please commit.

thanks and regards
Uwe
Kornel Benko
2014-06-26 08:11:03 UTC
Permalink
Post by Uwe Stöhr
Post by Kornel Benko
Post by Kornel Benko
I understood that he _is_ trying 2.1.
Yes.
Post by Kornel Benko
Post by Kornel Benko
QT5 will be used there, if cmake finds it. So one has to deinstall QT5.
That is bad.
Post by Kornel Benko
Uwe, please try this patch (on 2.1 branch).
The patch implements the use of LYX_USE_QT variable, so the default compilation should use
qt4 even if also qt5 devel files are installed.
That would be very helpful. This way I can try Qt 5 for master and use
Qt 4 to compile releases of 2.1. Please commit.
Done. I am pretty sure, this does not break users using Qt4.

I hope, Richard does not object?
Post by Uwe Stöhr
thanks and regards
Uwe
Kornel
Georg Baum
2014-06-26 18:16:56 UTC
Permalink
Am Mittwoch, 25. Juni 2014 um 23:29:34, schrieb Uwe Stöhr
Post by Uwe Stöhr
That would be very helpful. This way I can try Qt 5 for master and use
Qt 4 to compile releases of 2.1. Please commit.
Done. I am pretty sure, this does not break users using Qt4.
I hope, Richard does not object?
Please commit to the stable branch after getting the OK, not before,
especially when a release is due in the very near future. The change is
good, but not too urgent, and it really helps to have very clear rules.


Georg
Kornel Benko
2014-06-26 18:38:15 UTC
Permalink
Post by Georg Baum
Am Mittwoch, 25. Juni 2014 um 23:29:34, schrieb Uwe Stöhr
Post by Uwe Stöhr
That would be very helpful. This way I can try Qt 5 for master and use
Qt 4 to compile releases of 2.1. Please commit.
Done. I am pretty sure, this does not break users using Qt4.
I hope, Richard does not object?
Please commit to the stable branch after getting the OK, not before,
especially when a release is due in the very near future. The change is
good, but not too urgent, and it really helps to have very clear rules.
Right, I felt guilty already.
Post by Georg Baum
Georg
Kornel
Uwe Stöhr
2014-06-26 23:06:52 UTC
Permalink
Post by Kornel Benko
Post by Uwe Stöhr
Post by Kornel Benko
The patch implements the use of LYX_USE_QT variable, so the default compilation should use
qt4 even if also qt5 devel files are installed.
That would be very helpful. This way I can try Qt 5 for master and use
Qt 4 to compile releases of 2.1. Please commit.
Done. I am pretty sure, this does not break users using Qt4.
Thank you. I tested that the compilation with Qt4 works fine as before.

Do you have any clue why a merged build fails with trunk and master? Do
we need to fix this or not? If not, then the CMake flag for merged
builds should be removed to avoid the troubles had.

thanks and regards
Uwe
Scott Kostyshak
2014-06-27 00:46:26 UTC
Permalink
Post by Uwe Stöhr
Post by Kornel Benko
Post by Uwe Stöhr
Post by Kornel Benko
The patch implements the use of LYX_USE_QT variable, so the default
compilation should use
qt4 even if also qt5 devel files are installed.
That would be very helpful. This way I can try Qt 5 for master and use
Qt 4 to compile releases of 2.1. Please commit.
Done. I am pretty sure, this does not break users using Qt4.
Thank you. I tested that the compilation with Qt4 works fine as before.
Do you have any clue why a merged build fails with trunk and master? Do we
need to fix this or not? If not, then the CMake flag for merged builds
should be removed to avoid the troubles had.
Are you able to build the merged build with an older git commit? I
know it worked for you before but it sounds like your build
environment has changed, so it would be nice to rule that possibility
out first.

Scott

Kornel Benko
2014-06-25 09:21:23 UTC
Permalink
Post by Uwe Stöhr
Dear LyX developers,
thanks to a mainboard crash I had again to setup my complete build
system and after 6 hours of trying to compile LyX I am a bit lost.
- I have now Win 7 64bit and installed MSVC2010. MSVC2010 requires the
.net framework version 4.0, but my graphics driver requires .net 4.5.
Unfortunately when .net 4.5 is installed, .net 4.0 is removed because it
is not compatible with 4.5.
I read the Miscrosoft pages and they say one should upgrade to MSVC
2012. But they only offer the newer MSVC 2013. I installed it.
- I installed the openGL version of Qt 5.3 But this version is
incompatible with CMake because CMake wants to find a library called
glu32. This library does not exist and all attempts to fix this issue as
written in the Internet failed for me. It turned out that one must
install a non-openGL version of Qt. So I uninstalled Qt 5.3 and
re-installed it without OpenGL.
By not providing "FindQt5X11Extras.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5X11Extras", but CMake did not find one.
This is expected on windows, please ignore. It means, you are not able to tests
with xvkbd command (which works only on X11).

BTW, lyx with Qt5 is still experimental IMHO.
Post by Uwe Stöhr
But there is no Qt5X11 folder nor such files in the Windows releases of Qt.
After configuring and pressing "Generate" in the CMake-gui, I get tons
Policy CMP0020 is not set: Automatically link Qt executables to qtmain
target on Windows. Run "cmake --help-policy CMP0020" for policy details.
Use the cmake_policy command to set the policy and suppress this
warning. This warning is for project developers. Use -Wno-dev to
suppress it.
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config>
properties.
Run "cmake --help-policy CMP0043" for policy details. Use the
cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
Please ignore. Seen this on other projects too.
Post by Uwe Stöhr
Then I also get this warning, although I specified the path to the
- Target "LyX" links to target "Qt5::Concurrent" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED
target, or
an ALIAS target is missing?
This warning is for project developers. Use -Wno-dev to suppress it.
- CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is: CMAKE_CXX_FLAGS_ DEBUG
/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
CMAKE_CXX_FLAGS_ MINSIZEREL
CMAKE_CXX_FLAGS_ RELWITHDEBINFO
CMAKE_CXX_FLAGS_ DEBUG
CMAKE_CXX_FLAGS_ MINSIZEREL
CMAKE_CXX_FLAGS_ RELWITHDEBINFO
which are all set in CMake.
When I want now compile LyX, I get this error
D:\LyXGit\Master\compile-result\lyx.sln.metaproj : error MSB4126: The
project map configuration "Release|x64" is invalid.
But I have nowhere set "x64" as configuration and can also not find such
a setting in CMake.
"D:\LyXGit\Master\compile-result\src\LyX.vcxproj" (Standardziel) (3) ->
(ClCompile Ziel) ->
..\..\src\Paragraph.cpp(3855): warning C4018: '<': conflict between
'signed' and 'unsigned' [D:\LyXGit\Master\compile-resul\src\LyX.vcxproj]
Sorry for being again such a noob with the compile business but I am
again completely lost.
I also tried to use Qt 4.8.6 with MSCV 2013 but when I choose this
compiler for LyX 2.1.x CMake always wants to use Qt 5. I even
uninstalled Qt 5.3 but then CMake says, that Qt cannot be found. Only if
I use MSVC 2010 as compiler CMake accepts Qt 4.8.6. But MSVC 2010 is no
option as I mentioned.
You may have to remove CMakeCache.txt first. Guessing only.
Post by Uwe Stöhr
So what I need is a way to compile LyX 2.1.x using either Qt 4.8.x or Qt
5.3 using MSVC 2013. Is this possible? and if yes, how?
For 2.1, you have to deinstall Qt5 and remove the CMakeCache.

We made some changes (use -DLYX_USE_QT=QT4) for trunk, but not for lyx 2.1.
If you could try this, and it works, we should backport ...
Post by Uwe Stöhr
many thanks in advance and again sorry for my technical limitations
Uwe
Kornel
Uwe Stöhr
2014-06-25 22:05:40 UTC
Permalink
Post by Kornel Benko
Post by Uwe Stöhr
By not providing "FindQt5X11Extras.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5X11Extras", but CMake did not find one.
This is expected on windows, please ignore. It means, you are not able to tests
with xvkbd command (which works only on X11).
Thanks Kornel,

but can't CMake get the info that I am on Windows and then not search
for Qt5X11Extras?
Post by Kornel Benko
BTW, lyx with Qt5 is still experimental IMHO.
I was now able to compile Master with Qt 5.3. LyX works so far, but
crashes immediately when trying to view a file as PDF. So yes, Qt 5 and
LyX does not yet work but we should try to make this possible for LyX
LyX 2.2.
Post by Kornel Benko
Post by Uwe Stöhr
- CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is: CMAKE_CXX_FLAGS_ DEBUG
/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
CMAKE_CXX_FLAGS_ MINSIZEREL
CMAKE_CXX_FLAGS_ RELWITHDEBINFO
CMAKE_CXX_FLAGS_ DEBUG
CMAKE_CXX_FLAGS_ MINSIZEREL
CMAKE_CXX_FLAGS_ RELWITHDEBINFO
which are all set in CMake.
When I want now compile LyX, I get this error
D:\LyXGit\Master\compile-result\lyx.sln.metaproj : error MSB4126: The
project map configuration "Release|x64" is invalid.
But I have nowhere set "x64" as configuration and can also not find such
a setting in CMake.
Now I spent some more hours and found out that having .NET 4 installed
side by side with .Net 4.5.1 is possible if .Net 4 is installed before
.NET 4.5.1

I am therefore now able to compile LyX 2.1 using Qt 4.8.6 and MSVC 2010.

But in the first run I get this compilation error:

support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""public: void __thiscall
lyx::TexRow::newline(void)" (?***@TexRow@lyx@@QAEXXZ)" in Funktion
""class lyx::otexstream & __cdecl lyx::operator<<(class lyx::otexstream
&,struct lyx::BreakLine)" (??6lyx@@YAAAVotexstream@
***@AAV10@***@0@@Z)".
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""public: void __thiscall
lyx::TexRow::newlines(int)" (?***@TexRow@lyx@@***@Z)" in Funktion
""class lyx::otexstream & __cdecl lyx::operator<<(class lyx::otexstream
&,class std::basic_string<unsigned int,struct std::char_traits<unsigned
int>,class std::allocator<unsigned int> > const &)" (??6
lyx@@***@0@***@ABV?$***@IU?$***@I@std@@V?$alloca
***@I@2@@std@@@Z)".
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""class lyx::frontend::Application * __cdecl
lyx::theApp(void)
" (?***@lyx@@***@frontend@***@XZ)" in Funktion
"_applescript_execute_command".
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""public: __thiscall
lyx::FuncRequest::FuncRequest(class lyx::
FuncRequest const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,enum
lyx::FuncRequest::Origin)"
(??***@lyx@@***@ABV01@ABV?$***@DU?$***@D@std@@V?$***@D@2@
@std@@***@01@@Z)" in Funktion "_applescript_execute_command".
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""public: class lyx::FuncRequest __thiscall
lyx::LyXAction::lookupFunc(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
(?***@LyXAction@lyx@@QBE?AVFuncRequest
@***@ABV?$***@DU?$***@D@std@@V?$***@D@2@@std@@@Z)"
in Funktion"_applescript_execute_command".
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""class lyx::LyXAction lyx::lyxaction"
(?***@lyx@@***@1@A)" in Funktion
"_applescript_execute_command". [D:\LyXGit\2.1.x\compil
e-result\src\support\tests\check_filetools.vcxproj]
D:\LyXGit\2.1.x\compile-result\bin\Release\check_filetools.exe : fatal
error LNK1120: 6 nicht aufgel÷ste externe Verweise.
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]

I now also found the reason: the flags
-DLYX_MERGE_REBUILD
and
-DLYX_MERGE_FILES
are set to true

This seems correct because our build.bat in our CMake folder states "REM
set -DLYX_MERGE_REBUILD and -DLYX_MERGE_FILES to 1 for a version
released with an installer"

I nevertheless sett both flags to false and can not compile LyX 2.1
without errors.

So what is wrong with using a merged build? I am pretty sure that I used
merged builds for the release of LyX 2.0.8 and it worked fine.

---------

Finally this compilation warning remains:

"D:\LyXGit\Master\compile-result\src\LyX.vcxproj" (Standardziel) (3) ->
(ClCompile Ziel) ->
..\..\src\Paragraph.cpp(3855): warning C4018: '<': conflict between
'signed' and 'unsigned' [D:\LyXGit\Master\compile-resul\src\LyX.vcxproj]

This should be fixed for LyX 2.1.1 if possible.

many thanks and regards
Uwe
Kornel Benko
2014-06-26 07:58:41 UTC
Permalink
Post by Uwe Stöhr
Post by Kornel Benko
Post by Uwe Stöhr
By not providing "FindQt5X11Extras.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5X11Extras", but CMake did not find one.
This is expected on windows, please ignore. It means, you are not able to tests
with xvkbd command (which works only on X11).
Thanks Kornel,
but can't CMake get the info that I am on Windows and then not search
for Qt5X11Extras?
This is exactly the algorithm to get the info :)
(I mean, get the info from QT itself, about how QT is implemented.)

What we can do, is add the QUIET flag to find_package(...)
to make it less noisy.
Post by Uwe Stöhr
Post by Kornel Benko
BTW, lyx with Qt5 is still experimental IMHO.
I was now able to compile Master with Qt 5.3. LyX works so far, but
crashes immediately when trying to view a file as PDF. So yes, Qt 5 and
LyX does not yet work but we should try to make this possible for LyX
LyX 2.2.
Post by Kornel Benko
Post by Uwe Stöhr
- CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is: CMAKE_CXX_FLAGS_ DEBUG
/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
CMAKE_CXX_FLAGS_ MINSIZEREL
CMAKE_CXX_FLAGS_ RELWITHDEBINFO
CMAKE_CXX_FLAGS_ DEBUG
CMAKE_CXX_FLAGS_ MINSIZEREL
CMAKE_CXX_FLAGS_ RELWITHDEBINFO
which are all set in CMake.
When I want now compile LyX, I get this error
D:\LyXGit\Master\compile-result\lyx.sln.metaproj : error MSB4126: The
project map configuration "Release|x64" is invalid.
But I have nowhere set "x64" as configuration and can also not find such
a setting in CMake.
Now I spent some more hours and found out that having .NET 4 installed
side by side with .Net 4.5.1 is possible if .Net 4 is installed before
.NET 4.5.1
I am therefore now able to compile LyX 2.1 using Qt 4.8.6 and MSVC 2010.
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""public: void __thiscall
""class lyx::otexstream & __cdecl lyx::operator<<(class lyx::otexstream
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""public: void __thiscall
""class lyx::otexstream & __cdecl lyx::operator<<(class lyx::otexstream
&,class std::basic_string<unsigned int,struct std::char_traits<unsigned
int>,class std::allocator<unsigned int> > const &)" (??6
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""class lyx::frontend::Application * __cdecl
lyx::theApp(void)
"_applescript_execute_command".
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""public: __thiscall
FuncRequest const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,enum
lyx::FuncRequest::Origin)"
@std@@***@01@@Z)" in Funktion "_applescript_execute_command".
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""public: class lyx::FuncRequest __thiscall
lyx::LyXAction::lookupFunc(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)const "
@***@ABV?$***@DU?$***@D@std@@V?$***@D@2@@std@@@Z)"
in Funktion"_applescript_execute_command".
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
support.lib(_allinone_const.obj) : error LNK2019: Verweis auf nicht
aufgel÷stes externes Symbol ""class lyx::LyXAction lyx::lyxaction"
"_applescript_execute_command". [D:\LyXGit\2.1.x\compil
e-result\src\support\tests\check_filetools.vcxproj]
D:\LyXGit\2.1.x\compile-result\bin\Release\check_filetools.exe : fatal
error LNK1120: 6 nicht aufgel÷ste externe Verweise.
[D:\LyXGit\2.1.x\compile-result\src\support\tests\check_filetools.vcxproj]
I now also found the reason: the flags
-DLYX_MERGE_REBUILD
and
-DLYX_MERGE_FILES
are set to true
This seems correct because our build.bat in our CMake folder states "REM
set -DLYX_MERGE_REBUILD and -DLYX_MERGE_FILES to 1 for a version
released with an installer"
I never use MERGE. But maybe Peter can help, its his child.
Was it a clean build tree?
Post by Uwe Stöhr
I nevertheless sett both flags to false and can not compile LyX 2.1
without errors.
So what is wrong with using a merged build? I am pretty sure that I used
merged builds for the release of LyX 2.0.8 and it worked fine.
---------
"D:\LyXGit\Master\compile-result\src\LyX.vcxproj" (Standardziel) (3) ->
(ClCompile Ziel) ->
..\..\src\Paragraph.cpp(3855): warning C4018: '<': conflict between
'signed' and 'unsigned' [D:\LyXGit\Master\compile-resul\src\LyX.vcxproj]
This should be fixed for LyX 2.1.1 if possible.
+1
Post by Uwe Stöhr
many thanks and regards
Uwe
Kornel
Georg Baum
2014-06-26 18:30:54 UTC
Permalink
Post by Uwe Stöhr
I was now able to compile Master with Qt 5.3. LyX works so far, but
crashes immediately when trying to view a file as PDF. So yes, Qt 5 and
LyX does not yet work but we should try to make this possible for LyX
LyX 2.2.
Yes. There have been many discussion already on that topic, and part of the
work has been done, but it is not finished. Somebody needs to volunteer.
Post by Uwe Stöhr
Now I spent some more hours and found out that having .NET 4 installed
side by side with .Net 4.5.1 is possible if .Net 4 is installed before
.NET 4.5.1
I am therefore now able to compile LyX 2.1 using Qt 4.8.6 and MSVC 2010.
Very good. For the record: If you want to build with a never MSVC version,
then you need all dependencies built with that version as well. Otherwise
you'll get either linker errors or crashes at runtime, since both the C
runtime library and the C++ libraries (runtime and STL) are not binary
compatible between different MSVC releases. Sometimes you even need the MSVC
service pack to match (this was the case with a MSVC 2005 bug fix).
Post by Uwe Stöhr
So what is wrong with using a merged build? I am pretty sure that I used
merged builds for the release of LyX 2.0.8 and it worked fine.
Nothing is wrong with it, but AFAIK it is not tested, and code that is not
tested breaks (always, the only question is how long it takes). However, for
the resulting binary it should not matter whether you use a merged build or
not (otherwise the merged build would be broken). The only difference should
be build speed.


Georg
Loading...