Re: Error when compiling with Qt6 on macOS

2021-03-26 Thread Kornel Benko
Am Fri, 26 Mar 2021 12:00:32 +0100
schrieb pdv :

> > OK, I will ignore Qt6MacExtras for Qt6. (commit 9b03680a)
> >   
> >> Configuring incomplete, errors occurred!
> >> See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeOutput.log".
> >> See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeError.log".
> >>
> >> Chris
> >>
> >>  
> > Kornel
> > 
> >   
> 
> I also must exclude the QMacPasteboardMimeGraphics class in 
> GuiApplication.cpp since QMacPasteboard is not available anymore with qt6.
> 
> and add an #include  in support/Package.cpp (I suppose 
> this will pose no problem for qt5 but have not checked it, it's only 
> needed with USE_MACOSX_PACKAGING)
> 
> (patch included)
> 
> P. De Visschere

OK, committed at a9b0f5fa.

Kornel



pgpmdxwn4F52Y.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling with Qt6 on macOS

2021-03-26 Thread pdv

On 25/03/2021 17:31, Kornel Benko wrote:

Am Thu, 25 Mar 2021 14:50:20 +0100
schrieb Christoph Schmitz :


One library is obviously not installed by Homebrew: Qt6MacExtrasConfig. I 
searched for
the two files manually, but without success.

-- CMake error message:

TOP_SRC_DIR = /Users/chris/Git/LyX

Building out-of-source
Selecting build type defaults from configure.ac

CXX11_FLAG_DETECTED = "--std=c++17 -Wno-deprecated-register"
Compiler supports std_regex
Using clang
CMake Error at CMakeLists.txt:793 (find_package):
Could not find a package configuration file provided by "Qt6MacExtras" with
any of the following names:

Qt6MacExtrasConfig.cmake
qt6macextras-config.cmake

Add the installation prefix of "Qt6MacExtras" to CMAKE_PREFIX_PATH or set
"Qt6MacExtras_DIR" to a directory containing one of the above files. If
"Qt6MacExtras" provides a separate development package or SDK, be sure it
has been installed.


OK, I will ignore Qt6MacExtras for Qt6. (commit 9b03680a)


Configuring incomplete, errors occurred!
See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeOutput.log".
See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeError.log".

Chris



Kornel




I also must exclude the QMacPasteboardMimeGraphics class in 
GuiApplication.cpp since QMacPasteboard is not available anymore with qt6.


and add an #include  in support/Package.cpp (I suppose 
this will pose no problem for qt5 but have not checked it, it's only 
needed with USE_MACOSX_PACKAGING)


(patch included)

P. De Visschere
diff --git a/src/frontends/qt/GuiApplication.cpp 
b/src/frontends/qt/GuiApplication.cpp
index e6964edfb2..aaff335266 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -153,7 +153,7 @@
 #endif
 #endif
 
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && (QT_VERSION < 0x06)
 #include 
 #endif // Q_OS_MAC
 
@@ -752,7 +752,7 @@ public:
 //
 
 
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && (QT_VERSION < 0x06)
 // QMacPasteboardMimeGraphics can only be compiled on Mac.
 
 class QMacPasteboardMimeGraphics : public QMacPasteboardMime
@@ -1048,7 +1048,7 @@ struct GuiApplication::Private
Qt::ApplicationState last_state_;
 #endif
 
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && (QT_VERSION < 0x06)
/// Linkback mime handler for MacOSX.
QMacPasteboardMimeGraphics mac_pasteboard_mime_;
 #endif
diff --git a/src/support/Package.cpp b/src/support/Package.cpp
index a349a5e755..a779544f99 100644
--- a/src/support/Package.cpp
+++ b/src/support/Package.cpp
@@ -43,6 +43,7 @@
 # include "support/qstring_helpers.h"
 # include 
 # include 
+# include 
 #endif
 
 using namespace std;
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling with Qt6 on macOS

2021-03-25 Thread pdv

On 25/03/2021 15:05, pdv wrote:

On 25/03/2021 11:27, Christoph Schmitz wrote:
I have tried to compile LyX with Qt6 on macOS. The compiler stops 
quickly after a series of error messages. I attach a complete log file 
of my configure and make run.


Compiling LyX with Qt5 works with charm (thanks to the help of Marcus 
Mikulcak).


Chris




I have build successfully with the latest LyX and with Qt6 and cmake. 
There are a few issues to take into account:


1) there is an incompatibility between the moc_ files generated with qt5 
and qt6; you must remove these files manually if you switch; a "Clean" 
within XCode is not enough.


2) qtmacextras is not included in qt6 (it's not clear whether it ever 
will). You must remove 2 steps in the cmake files and the 
QMacPasteboardMimeGraphics code in GuiApplication.cpp.


3) I had to add one #include  in support/Package.cpp.

I believe the qtmacextras is needed for copy/paste (and dragging) .pdf 
content.


P. De Visschere



I found this in the qt-wiki:


Qt Mac Extras

Not included in Qt 6.0. Will find new home in the more relevant modules 
over time, and the remaining APIs considered included in later 6.x releases.



So, some time qt6macextras should be back.

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


Re: Error when compiling with Qt6 on macOS

2021-03-25 Thread Kornel Benko
Am Thu, 25 Mar 2021 14:50:20 +0100
schrieb Christoph Schmitz :

> One library is obviously not installed by Homebrew: Qt6MacExtrasConfig. I 
> searched for
> the two files manually, but without success.
> 
> -- CMake error message:
> 
> TOP_SRC_DIR = /Users/chris/Git/LyX
> 
> Building out-of-source
> Selecting build type defaults from configure.ac
> 
> CXX11_FLAG_DETECTED = "--std=c++17 -Wno-deprecated-register"
> Compiler supports std_regex
> Using clang
> CMake Error at CMakeLists.txt:793 (find_package):
> Could not find a package configuration file provided by "Qt6MacExtras" with
> any of the following names:
> 
> Qt6MacExtrasConfig.cmake
> qt6macextras-config.cmake
> 
> Add the installation prefix of "Qt6MacExtras" to CMAKE_PREFIX_PATH or set
> "Qt6MacExtras_DIR" to a directory containing one of the above files. If
> "Qt6MacExtras" provides a separate development package or SDK, be sure it
> has been installed.

OK, I will ignore Qt6MacExtras for Qt6. (commit 9b03680a)

> Configuring incomplete, errors occurred!
> See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeOutput.log".
> See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeError.log".
> 
> Chris
> 
> 
Kornel


pgp7UxM6Gagbs.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling with Qt6 on macOS

2021-03-25 Thread pdv

On 25/03/2021 11:27, Christoph Schmitz wrote:

I have tried to compile LyX with Qt6 on macOS. The compiler stops quickly after 
a series of error messages. I attach a complete log file of my configure and 
make run.

Compiling LyX with Qt5 works with charm (thanks to the help of Marcus Mikulcak).

Chris




I have build successfully with the latest LyX and with Qt6 and cmake. 
There are a few issues to take into account:


1) there is an incompatibility between the moc_ files generated with qt5 
and qt6; you must remove these files manually if you switch; a "Clean" 
within XCode is not enough.


2) qtmacextras is not included in qt6 (it's not clear whether it ever 
will). You must remove 2 steps in the cmake files and the 
QMacPasteboardMimeGraphics code in GuiApplication.cpp.


3) I had to add one #include  in support/Package.cpp.

I believe the qtmacextras is needed for copy/paste (and dragging) .pdf 
content.


P. De Visschere

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


Re: Error when compiling with Qt6 on macOS

2021-03-25 Thread Christoph Schmitz
One library is obviously not installed by Homebrew: Qt6MacExtrasConfig. I 
searched for the two files manually, but without success.

-- CMake error message:

TOP_SRC_DIR = /Users/chris/Git/LyX

Building out-of-source
Selecting build type defaults from configure.ac

CXX11_FLAG_DETECTED = "--std=c++17 -Wno-deprecated-register"
Compiler supports std_regex
Using clang
CMake Error at CMakeLists.txt:793 (find_package):
Could not find a package configuration file provided by "Qt6MacExtras" with
any of the following names:

Qt6MacExtrasConfig.cmake
qt6macextras-config.cmake

Add the installation prefix of "Qt6MacExtras" to CMAKE_PREFIX_PATH or set
"Qt6MacExtras_DIR" to a directory containing one of the above files. If
"Qt6MacExtras" provides a separate development package or SDK, be sure it
has been installed.

Configuring incomplete, errors occurred!
See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeOutput.log".
See also "/Users/chris/Git/LyX/build/CMakeFiles/CMakeError.log".

Chris


> Am 25.03.2021 um 13:40 schrieb Kornel Benko :
> 
> Am Thu, 25 Mar 2021 12:38:22 +0100
> schrieb Christoph Schmitz mailto:chr.schm...@web.de>>:
> 
>> Yes, I tried a clean build several times. And I tried it now again:
>> 
>> - I deleted the local repository.
>> - I cloned the repository.
>> - I removed Qt5 (brew remove Qt5 && brew cleanup).
>> 
>> Attached is the complete build log.
>> 
>> Unfortunately I have no idea what to do with cmake. I started the cmake GUI 
>> and clicked
>> on "Configure". There are a few surprising parameters (see attached 
>> screenshot):
>> 
>> LYX_USE_QT=QT4
>> QT_MKSPECS_DIR=**Unknown**
>> Qt5Core_DIR is present while Qt6Core_DIR is present as well.
>> 
>> Chris
>> 
> 
> Try calling cmake with '-DLYX_USE_QT=QT6'
> (or, in the GUI, select LYX_USE_QT to QT6)
> 
> Configure should fail if QT6 is not complete.
> 
>   Kornel
> -- 
> lyx-devel mailing list
> lyx-devel@lists.lyx.org 
> http://lists.lyx.org/mailman/listinfo/lyx-devel 
> 
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling with Qt6 on macOS

2021-03-25 Thread Kornel Benko
Am Thu, 25 Mar 2021 12:38:22 +0100
schrieb Christoph Schmitz :

> Yes, I tried a clean build several times. And I tried it now again:
> 
> - I deleted the local repository.
> - I cloned the repository.
> - I removed Qt5 (brew remove Qt5 && brew cleanup).
> 
> Attached is the complete build log.
> 
> Unfortunately I have no idea what to do with cmake. I started the cmake GUI 
> and clicked
> on "Configure". There are a few surprising parameters (see attached 
> screenshot):
> 
> LYX_USE_QT=QT4
> QT_MKSPECS_DIR=**Unknown**
> Qt5Core_DIR is present while Qt6Core_DIR is present as well.
> 
> Chris
> 

Try calling cmake with '-DLYX_USE_QT=QT6'
(or, in the GUI, select LYX_USE_QT to QT6)

Configure should fail if QT6 is not complete.

Kornel


pgp_GdyEN6iJL.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Error when compiling with Qt6 on macOS

2021-03-25 Thread Kornel Benko
Am Thu, 25 Mar 2021 11:27:02 +0100
schrieb Christoph Schmitz :

> I have tried to compile LyX with Qt6 on macOS. The compiler stops quickly 
> after a
> series of error messages. I attach a complete log file of my configure and 
> make run.
> 
> Compiling LyX with Qt5 works with charm (thanks to the help of Marcus 
> Mikulcak).
> 
> Chris
> 

1.) Have you tried a clean build? (Looks like you do not use moc6 but moc5)
2.) Are you able to use cmake to compile?

Kornel


pgp6KlrX6VxTy.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Error when compiling with Qt6 on macOS

2021-03-25 Thread Christoph Schmitz
I have tried to compile LyX with Qt6 on macOS. The compiler stops quickly after 
a series of error messages. I attach a complete log file of my configure and 
make run.

Compiling LyX with Qt5 works with charm (thanks to the help of Marcus Mikulcak).

Chris

❯ ./autogen.sh

Using automake (GNU automake) 1.16.3
Using autoconf (GNU Autoconf) 2.69
Building macros...
Building config header template...
Building Makefile templates...
Building configure...
Building po/POTFILES.in...

run "./configure && make"

❯ ./configure \
--with-version-suffix=-2.4 \
--prefix=/Users/chris/Git/LyX/build/LyX.app \
--with-x=no \
--disable-stdlib-debug \
--with-included-hunspell \
--with-libiconv-prefix=/usr \
--enable-qt6 \
--with-qt-dir=/usr/local/opt/qt

configuring LyX version 2.4.0dev
checking for build type... development
checking for version suffix... -2.4
checking whether Qt6 is requested... yes
checking build system type... x86_64-apple-darwin20.4.0
checking host system type... x86_64-apple-darwin20.4.0
checking target system type... x86_64-apple-darwin20.4.0
checking what packaging should be used... macosx
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether UID '501' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking for a Python interpreter with version >= 2.7.0 or 3.5.0... python3
checking for python3... /usr/local/bin/python3
checking for python version... 3.9
checking for python platform... darwin
checking for python script directory... ${prefix}/lib/python3.9/site-packages
checking for python extension module directory... 
${exec_prefix}/lib/python3.9/site-packages
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for ranlib... ranlib
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking whether the compiler is clang... yes
checking for clang version... 12.0.0
checking for a good C++ mode... -std=c++17
checking whether STL is libstdc++... no
checking whether STL is libstdc++ using the C++11 ABI... no
checking for std::call_once availability... yes
checking whether C++ compiler accepts -Wno-deprecated-copy... no
checking for gcc... gcc
checking whether we are using the GNU Objective C compiler... yes
checking whether gcc accepts -g... yes
checking dependency style of gcc... gcc3
checking dependency style of gcc... (cached) gcc3
checking for extra library directory... NONE
checking for extra include directory... NONE
checking for extra lib+include directory... NONE
checking for main in -lshlwapi... no
checking for main in -lpsapi... no
checking for main in -lgdi32... no
checking for main in -lole32... no
checking whether to use included nod library... yes
checking whether to use included boost library... no
checking for boost library... no
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking whether printing callstack is possible... (cached) yes
checking whether make_unique is defined by header memory... yes
checking size of wchar_t... 4
checking for wchar_t... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking for ld used by GCC... 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker 
(/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld)
 is GNU ld... no
checking for shared library run path origin... done