Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Thiago Macieira
On Wednesday, 23 January 2019 13:15:08 PST Nuno Santos wrote:
> I ran it via dependency walker and its failing after calling
> SHGetKnownFolderPath, from the looks of things, it dies inside
> sHGetKnownFolderPath() in qstandardpaths_win.cpp but I have no idea why the
> -static-runtime could influence that.

You said it crashes before main(). So what is calling QStandardPaths in a 
global constructor? Please share the backtrace of the crash.

Please remember that if you have static runtime, your global constructor are 
run intermixed with Qt's and the CRT's. If you had dynamic builds, all of Qt's 
constructors would have completed before the first of yours started and all of 
the CRT constructors would be finished before Qt's first. This intermixing of 
constructors is NOT tested and not supported. If things break because of 
static-runtime, you get to keep the pieces.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Nuno Santos
Michael,

Thanks for sharing your build options. I have been building Qt from source in 
the last few years with -static -static-runtime enabled without problems. 

We definitely share some configuration details but we couldn’t isolate the 
cause of this crash yet.

Best,

Nuno

> On 23 Jan 2019, at 16:43, Klank, Michael  wrote:
> 
> I did recently compile Qt5.12.0 static including OpenSSL.
> This is what I do:
> Building OpenSSL:
> set path="c:\Program Files\NASM\";%path%
> perl Configure VC-WIN64A --prefix=c:\OpenSSL\vc-win64a 
> --openssldir=c:\OpenSSL\SSL no-asm
> 
> building Qt:
> SET _ROOT=C:\klm\src\qt5
> SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
> SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
> set path=c:\Python27\;%path%
> 
> cd c:\klm\src\
> rm -rf qt5
> git clone https://code.qt.io/qt/qt5.git
> cd %_ROOT%
> git checkout 5.12.0
> perl init-repository
> pause
> 
> change inside mkspecs/common/msvc-desktop.conf:
> from QMAKE_CFLAGS_RELEASE= $$QMAKE_CFLAGS_OPTIMIZE -MD to 
> QMAKE_CFLAGS_RELEASE= $$QMAKE_CFLAGS_OPTIMIZE -MT
> from QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MD  
> to QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MT
> from QMAKE_CFLAGS_DEBUG  = -Zi -MDd  to  QMAKE_CFLAGS_DEBUG  = -Zi MTd
> 
> configure -opensource -confirm-license -static -debug-and-release -release 
> -no-pch -optimize-size -nomake tests -nomake examples -qt-zlib -qt-libjpeg 
> -qt-libpng -opengl desktop -plugin-sql-sqlite -openssl 
> -Ic:/OpenSSL/vc-win64a/include -Lc:/OpenSSL/vc-win64a/lib
> jom
> jom install
> 
> Static debug build with qmldebug enabled doesn_t work. Disable qmldebug and 
> it works for me.
> Hope this helps.
> 
> Michael
> 
> -Ursprüngliche Nachricht-
> Von: Interest [mailto:interest-boun...@qt-project.org] Im Auftrag von Nuno 
> Santos
> Gesendet: Mittwoch, 23. Januar 2019 10:44
> An: Thiago Macieira 
> Cc: interest@qt-project.org
> Betreff: Re: [Interest] Qt 5.12 for Windows (Static)
> 
> Thiago,
> 
> I forgot to mention one small detail. A simple console application works and 
> doesn’t crash. Maybe this has something to do with the Qt Quick engine only. 
> Anyway, I have filled the following bug report:
> 
> https://bugreports.qt.io/browse/QTBUG-73217
> 
> Thanks!
> 
> Best regards,
> 
> Nuno
> 
>> On 23 Jan 2019, at 09:16, Nuno Santos  wrote:
>> 
>> Thiago,
>> 
>> Followed as suggested.
>> 
>> 1) removed openssl dependency and tried to compile again -> Didn’t work! :(
>> 2) removed -static and -static-runtime options -> Worked! :)
>> 
>> Maybe there is some kind of issue with -static -static-runtime build options
>> 
>> Will fill a bug report.
>> 
>> Thanks!
>> 
>> Best regards,
>> 
>> Nuno
>> 
>>> On 17 Jan 2019, at 16:35, Thiago Macieira  wrote:
>>> 
>>> On Thursday, 17 January 2019 05:07:21 PST Nuno Santos wrote:
>>>> Can you spot anything wrong?
>>> 
>>> Reduce your problem. Suggested steps:
>>> 1) remove OpenSSL dependency
>>> 2) use regular dynamic runtime (not -static-runtime)
>>> 3) build your application with fewer Qt libraries
>>> 
>>> What is the smallest combination that still crashes at load?
>>> 
>>> Make sure your application is CONFIG += console, so that any output goes to
>>> the console instead of the debug ring.
>>> 
>>> --
>>> Thiago Macieira - thiago.macieira (AT) intel.com
>>> Software Architect - Intel Open Source Technology Center
>>> 
>>> 
>>> 
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> https://lists.qt-project.org/listinfo/interest
>> 
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> https://lists.qt-project.org/listinfo/interest
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
> 
> 
> 
> Persönlich haftende Gesellschafterin: AMK Verwaltungsgesellschaft mbH, 
> Kirchheim/Teck
> Geschäftsführer: Rainer Schwöbel, Rupert Wiest
> Registergericht Stuttgart HRB 230208; HRA 230681
> 
> Die in dieser E-Mail enthaltenen Informationen sind vertraulich. Diese E-Mail 
> ist ausschließlich für den Adressaten bestimmt und jeglicher Zugriff durch 
> andere Personen ist nicht zulässig. Falls Sie nicht der beabsichtigte 
> Emp

Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Nuno Santos
Thiago,

Totally agree!

I left it building before leaving the office. I will have an answer to that 
question by tomorrow morning.

Andy Shaw got here earlier today:

I ran it via dependency walker and its failing after calling 
SHGetKnownFolderPath, from the looks of things, it dies inside 
sHGetKnownFolderPath() in qstandardpaths_win.cpp but I have no idea why the 
-static-runtime could influence that.

Thanks!

Best,

Nuno

> On 23 Jan 2019, at 20:40, Thiago Macieira  wrote:
> 
> On Wednesday, 23 January 2019 11:37:42 PST Nuno Santos wrote:
>> Thiago,
>> 
>> That will be the next try.
>> 
>> However, I think I do need the static runtime as I don’t want the software
>> to depend on the runtime distributable (correct?)
> 
> I understand that you want that. Whether you *need* the option or not is a 
> different story.
> 
> But I'm not asking for a change in your build. I'm asking for dissecting the 
> problem so we can find what the issue is.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Thiago Macieira
On Wednesday, 23 January 2019 11:37:42 PST Nuno Santos wrote:
> Thiago,
> 
> That will be the next try.
> 
> However, I think I do need the static runtime as I don’t want the software
> to depend on the runtime distributable (correct?)

I understand that you want that. Whether you *need* the option or not is a 
different story.

But I'm not asking for a change in your build. I'm asking for dissecting the 
problem so we can find what the issue is.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Nuno Santos
Thiago,

That will be the next try.

However, I think I do need the static runtime as I don’t want the software to 
depend on the runtime distributable (correct?)

I will try it anyway. 

I have made a zip with a compiled console test, a compiled quick test and the 
saved dependency walker file. If you are curious about it:

https://drive.google.com/open?id=1cBnP6eZa95kSn7y7pvTA7eK1eN0yUXcv 


Thanks!

Best,

Nuno

> On 23 Jan 2019, at 16:10, Thiago Macieira  wrote:
> 
> On Wednesday, 23 January 2019 01:16:45 PST Nuno Santos wrote:
>> 2) removed -static and -static-runtime options -> Worked! 
>> 
>> Maybe there is some kind of issue with -static -static-runtime build options
> 
> How about -static without -static-runtime?
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Klank, Michael
I did recently compile Qt5.12.0 static including OpenSSL.
This is what I do:
Building OpenSSL:
set path="c:\Program Files\NASM\";%path%
perl Configure VC-WIN64A --prefix=c:\OpenSSL\vc-win64a 
--openssldir=c:\OpenSSL\SSL no-asm

building Qt:
SET _ROOT=C:\klm\src\qt5
SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
set path=c:\Python27\;%path%

cd c:\klm\src\
rm -rf qt5
git clone https://code.qt.io/qt/qt5.git
cd %_ROOT%
git checkout 5.12.0
perl init-repository
pause

change inside mkspecs/common/msvc-desktop.conf:
from QMAKE_CFLAGS_RELEASE= $$QMAKE_CFLAGS_OPTIMIZE -MD to 
QMAKE_CFLAGS_RELEASE= $$QMAKE_CFLAGS_OPTIMIZE -MT
from QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MD  to 
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MT
from QMAKE_CFLAGS_DEBUG  = -Zi -MDd  to  QMAKE_CFLAGS_DEBUG  = -Zi MTd

configure -opensource -confirm-license -static -debug-and-release -release 
-no-pch -optimize-size -nomake tests -nomake examples -qt-zlib -qt-libjpeg 
-qt-libpng -opengl desktop -plugin-sql-sqlite -openssl 
-Ic:/OpenSSL/vc-win64a/include -Lc:/OpenSSL/vc-win64a/lib
jom
jom install

Static debug build with qmldebug enabled doesn_t work. Disable qmldebug and it 
works for me.
Hope this helps.

Michael

-Ursprüngliche Nachricht-
Von: Interest [mailto:interest-boun...@qt-project.org] Im Auftrag von Nuno 
Santos
Gesendet: Mittwoch, 23. Januar 2019 10:44
An: Thiago Macieira 
Cc: interest@qt-project.org
Betreff: Re: [Interest] Qt 5.12 for Windows (Static)

Thiago,

I forgot to mention one small detail. A simple console application works and 
doesn’t crash. Maybe this has something to do with the Qt Quick engine only. 
Anyway, I have filled the following bug report:

https://bugreports.qt.io/browse/QTBUG-73217

Thanks!

Best regards,

Nuno

> On 23 Jan 2019, at 09:16, Nuno Santos  wrote:
>
> Thiago,
>
> Followed as suggested.
>
> 1) removed openssl dependency and tried to compile again -> Didn’t work! :(
> 2) removed -static and -static-runtime options -> Worked! :)
>
> Maybe there is some kind of issue with -static -static-runtime build options
>
> Will fill a bug report.
>
> Thanks!
>
> Best regards,
>
> Nuno
>
>> On 17 Jan 2019, at 16:35, Thiago Macieira  wrote:
>>
>> On Thursday, 17 January 2019 05:07:21 PST Nuno Santos wrote:
>>> Can you spot anything wrong?
>>
>> Reduce your problem. Suggested steps:
>> 1) remove OpenSSL dependency
>> 2) use regular dynamic runtime (not -static-runtime)
>> 3) build your application with fewer Qt libraries
>>
>> What is the smallest combination that still crashes at load?
>>
>> Make sure your application is CONFIG += console, so that any output goes to
>> the console instead of the debug ring.
>>
>> --
>> Thiago Macieira - thiago.macieira (AT) intel.com
>> Software Architect - Intel Open Source Technology Center
>>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> https://lists.qt-project.org/listinfo/interest
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest



Persönlich haftende Gesellschafterin: AMK Verwaltungsgesellschaft mbH, 
Kirchheim/Teck
Geschäftsführer: Rainer Schwöbel, Rupert Wiest
Registergericht Stuttgart HRB 230208; HRA 230681

Die in dieser E-Mail enthaltenen Informationen sind vertraulich. Diese E-Mail 
ist ausschließlich für den Adressaten bestimmt und jeglicher Zugriff durch 
andere Personen ist nicht zulässig. Falls Sie nicht der beabsichtigte Empfänger 
sind, ist jegliche Veröffentlichung, Vervielfältigung, Verteilung und sonstige 
in diesem Zusammenhang stehende Handlung untersagt und unter Umständen 
ungesetzlich. Falls Sie diese E-Mail irrtümlich erhalten haben, leiten Sie sie 
bitte weiter an die folgende E-Mail-Adresse: i...@amk-group.com

The information in this e-mail is confidential. It is intended solely for the 
address and access to the e-mail by anyone else is unauthorised. If you are not 
the intended recipient, any disclosure, copying, distribution or any action 
taken or committed to be taken in reliance on it, is prohibited and may be 
unlawful. If you have received this e-mail in error please forward to this 
e-mail-address: i...@amk-group.com

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Thiago Macieira
On Wednesday, 23 January 2019 01:43:50 PST Nuno Santos wrote:
> I forgot to mention one small detail. A simple console application works and
> doesn’t crash. Maybe this has something to do with the Qt Quick engine
> only. Anyway, I have filled the following bug report:

How about a plain QWindow (QtGui, but not QtQuick)? Does that show?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Thiago Macieira
On Wednesday, 23 January 2019 01:16:45 PST Nuno Santos wrote:
> 2) removed -static and -static-runtime options -> Worked! 
> 
> Maybe there is some kind of issue with -static -static-runtime build options

How about -static without -static-runtime?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Nuno Santos
Thiago,

I forgot to mention one small detail. A simple console application works and 
doesn’t crash. Maybe this has something to do with the Qt Quick engine only. 
Anyway, I have filled the following bug report:

https://bugreports.qt.io/browse/QTBUG-73217

Thanks!

Best regards,

Nuno

> On 23 Jan 2019, at 09:16, Nuno Santos  wrote:
> 
> Thiago,
> 
> Followed as suggested.
> 
> 1) removed openssl dependency and tried to compile again -> Didn’t work! :(
> 2) removed -static and -static-runtime options -> Worked! :)
> 
> Maybe there is some kind of issue with -static -static-runtime build options
> 
> Will fill a bug report.
> 
> Thanks!
> 
> Best regards,
> 
> Nuno
> 
>> On 17 Jan 2019, at 16:35, Thiago Macieira  wrote:
>> 
>> On Thursday, 17 January 2019 05:07:21 PST Nuno Santos wrote:
>>> Can you spot anything wrong?
>> 
>> Reduce your problem. Suggested steps:
>> 1) remove OpenSSL dependency
>> 2) use regular dynamic runtime (not -static-runtime)
>> 3) build your application with fewer Qt libraries
>> 
>> What is the smallest combination that still crashes at load?
>> 
>> Make sure your application is CONFIG += console, so that any output goes to 
>> the console instead of the debug ring.
>> 
>> -- 
>> Thiago Macieira - thiago.macieira (AT) intel.com
>> Software Architect - Intel Open Source Technology Center
>> 
>> 
>> 
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> https://lists.qt-project.org/listinfo/interest
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-23 Thread Nuno Santos
Thiago,

Followed as suggested.

1) removed openssl dependency and tried to compile again -> Didn’t work! :(
2) removed -static and -static-runtime options -> Worked! :)

Maybe there is some kind of issue with -static -static-runtime build options

Will fill a bug report.

Thanks!

Best regards,

Nuno

> On 17 Jan 2019, at 16:35, Thiago Macieira  wrote:
> 
> On Thursday, 17 January 2019 05:07:21 PST Nuno Santos wrote:
>> Can you spot anything wrong?
> 
> Reduce your problem. Suggested steps:
> 1) remove OpenSSL dependency
> 2) use regular dynamic runtime (not -static-runtime)
> 3) build your application with fewer Qt libraries
> 
> What is the smallest combination that still crashes at load?
> 
> Make sure your application is CONFIG += console, so that any output goes to 
> the console instead of the debug ring.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Nuno Santos
Markus,

Curious…

I’ve been build Qt from source on Windows with JOM for the last 4 years and I 
have never ran into this problem before… lucky? 

Thanks for your feedback!

Best regards,

Nuno

> On 18 Jan 2019, at 05:59, Markus Maier  wrote:
> 
> Which kind of make are you using?
> 
> There is QTBUG-53393, and I believe I ran into this at least with Qt
> 5.9 static msvc builds, using jom for multicore builds. Switching to
> nmake made all my issues go. For dynamic builds, jom always has worked
> for me for the "make" step.
> 
> For the "make install" step, I use nmake in any case (both dynamic and
> static), I experienced some issues with "jom install" quite some time
> ago (quite a lot of "0 files copied" entries in the build output ...)
> which were also completely solved by switching to nmake. I found it
> impossible to create a MCVE in this case, so I never reported a bug
> for this ...
> 
> Best regards
> Markus
> 
> Am Do., 17. Jan. 2019 um 15:29 Uhr schrieb Nuno Santos
> :
>> 
>> Maurice,
>> 
>> It doesn't work with Qt Examples as well.
>> 
>> This is a new machine and I have installed Visual Studio Community 2017, 
>> Python 3.7.2 and Perl Strawberry 5.28.
>> 
>> Created the dir C:\Qt\5.12.0\ and inside I have created a 
>> qt_5.12_64_vars.cmd file with the following content:
>> 
>> CALL "C:\Program Files (x86)\Microsoft Visual 
>> Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
>> SET _ROOT=C:\Qt\5.12.0\src\
>> SET 
>> PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%;C:\Users\sinos\AppData\Local\Programs\Python\Python37-32\
>> SET _ROOT=
>> 
>> Then I call the following commands from git bash:
>> 
>> 1) git clone git://code.qt.io/qt/qt5.git src
>> 2) perl init-repository -f 
>> --module-subset=qtbase,qtdeclarative,qtgraphicaleffects,qtimageformats,qtquickcontrols,qtquickcontrols2,qtwinextras,qtsvg,qtwebsockets
>> 
>> Next, opened a visual studio 2017 command line prompt and changed dir to 
>> c:\Qt\5.12.0\ and executed qt_5.12_64_vars.cmd and then:
>> 
>>> configure -confirm-license -recheck -prefix 
>>> c:\qt\5.12.0\msvc2017_5_12_static_64 -commercial -debug-and-release -static 
>>> -static-runtime -nomake examples -nomake tools -nomake tests -opengl 
>>> dynamic -openssl-linked -I c:\openssl-lib\include64 -L c:\openssl-lib\lib64 
>>> OPENSSL_LIBS="libeay32MT.lib ssleay32MT.lib" -qtnamespace 
>>> com_imaginando_qt_5_12_64
>> 
>> As I'm linking with openssl, the test that checks if openssl is available 
>> was failing and after some debugging I found that the reason was some 
>> missing symbols. In order to fix this I edited msvc-desktop.conf under 
>> C:\Qt\5.12.0\src\qtbase\mkspecs\common and added the following libs to 
>> QMAKE_LIBS
>> 
>> QMAKE_LIBS = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib 
>> advapi32.lib ws2_32.lib gdi32.lib
>> 
>> After that it compiled smoothly until the end. And this is where I am now.
>> 
>> 
>> 
>> Can you spot anything wrong?
>> 
>> Thanks!
>> 
>> Best regards,
>> 
>> Nuno
>> 
>> On 17 Jan 2019, at 11:32, Maurice Kalinowski  
>> wrote:
>> 
>> Those are windows related and resolved during runtime.
>> 
>> Maybe you could post your exact configure line, so that others can try to 
>> reproduce it? Also which modules of Qt are you using?
>> Does it work for Qt examples?
>> 
>> Maurice
>> 
>> 
>> From: Interest  On Behalf Of Nuno Santos
>> Sent: Thursday, January 17, 2019 12:12 PM
>> To: Tony Rietwyk 
>> Cc: interest@qt-project.org
>> Subject: Re: [Interest] Qt 5.12 for Windows (Static)
>> 
>> Tony,
>> 
>> It actually ended up something. There are a lot of issues. Can anyone 
>> understand what is happening?
>> 
>> Thanks!
>> 
>> Nuno
>> 
>> 
>> 
>> 
>> On 17 Jan 2019, at 10:55, Tony Rietwyk  wrote:
>> 
>> Hi Nuno,
>> 
>> Are you sure that the static build of Qt worked?
>> 
>> What happens when you start the debugging by single stepping?  In my 
>> dynamically built exe, I get to qtmain_win.cpp, WinMain routine.  If the 
>> single step works, how far do you get?  If it doesn't, then I think you may 
>> be picking up the wrong runtime dlls - check the path env var.  My 
>> understanding is that a statically built exe still needs dynamic linking to 
>> the c/c++ runtime?  Try

Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Nuno Santos
Sounds like a good plan Thiago!

Thx!

Best,

Nuno

> On 17 Jan 2019, at 16:35, Thiago Macieira  wrote:
> 
> On Thursday, 17 January 2019 05:07:21 PST Nuno Santos wrote:
>> Can you spot anything wrong?
> 
> Reduce your problem. Suggested steps:
> 1) remove OpenSSL dependency
> 2) use regular dynamic runtime (not -static-runtime)
> 3) build your application with fewer Qt libraries
> 
> What is the smallest combination that still crashes at load?
> 
> Make sure your application is CONFIG += console, so that any output goes to 
> the console instead of the debug ring.
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>  Software Architect - Intel Open Source Technology Center
> 
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Markus Maier
Which kind of make are you using?

There is QTBUG-53393, and I believe I ran into this at least with Qt
5.9 static msvc builds, using jom for multicore builds. Switching to
nmake made all my issues go. For dynamic builds, jom always has worked
for me for the "make" step.

For the "make install" step, I use nmake in any case (both dynamic and
static), I experienced some issues with "jom install" quite some time
ago (quite a lot of "0 files copied" entries in the build output ...)
which were also completely solved by switching to nmake. I found it
impossible to create a MCVE in this case, so I never reported a bug
for this ...

Best regards
Markus

Am Do., 17. Jan. 2019 um 15:29 Uhr schrieb Nuno Santos
:
>
> Maurice,
>
> It doesn't work with Qt Examples as well.
>
> This is a new machine and I have installed Visual Studio Community 2017, 
> Python 3.7.2 and Perl Strawberry 5.28.
>
> Created the dir C:\Qt\5.12.0\ and inside I have created a qt_5.12_64_vars.cmd 
> file with the following content:
>
> CALL "C:\Program Files (x86)\Microsoft Visual 
> Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
> SET _ROOT=C:\Qt\5.12.0\src\
> SET 
> PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%;C:\Users\sinos\AppData\Local\Programs\Python\Python37-32\
> SET _ROOT=
>
> Then I call the following commands from git bash:
>
> 1) git clone git://code.qt.io/qt/qt5.git src
> 2) perl init-repository -f 
> --module-subset=qtbase,qtdeclarative,qtgraphicaleffects,qtimageformats,qtquickcontrols,qtquickcontrols2,qtwinextras,qtsvg,qtwebsockets
>
> Next, opened a visual studio 2017 command line prompt and changed dir to 
> c:\Qt\5.12.0\ and executed qt_5.12_64_vars.cmd and then:
>
> > configure -confirm-license -recheck -prefix 
> > c:\qt\5.12.0\msvc2017_5_12_static_64 -commercial -debug-and-release -static 
> > -static-runtime -nomake examples -nomake tools -nomake tests -opengl 
> > dynamic -openssl-linked -I c:\openssl-lib\include64 -L c:\openssl-lib\lib64 
> > OPENSSL_LIBS="libeay32MT.lib ssleay32MT.lib" -qtnamespace 
> > com_imaginando_qt_5_12_64
>
> As I'm linking with openssl, the test that checks if openssl is available was 
> failing and after some debugging I found that the reason was some missing 
> symbols. In order to fix this I edited msvc-desktop.conf under 
> C:\Qt\5.12.0\src\qtbase\mkspecs\common and added the following libs to 
> QMAKE_LIBS
>
> QMAKE_LIBS = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib 
> advapi32.lib ws2_32.lib gdi32.lib
>
> After that it compiled smoothly until the end. And this is where I am now.
>
>
>
> Can you spot anything wrong?
>
> Thanks!
>
> Best regards,
>
> Nuno
>
> On 17 Jan 2019, at 11:32, Maurice Kalinowski  wrote:
>
> Those are windows related and resolved during runtime.
>
> Maybe you could post your exact configure line, so that others can try to 
> reproduce it? Also which modules of Qt are you using?
> Does it work for Qt examples?
>
> Maurice
>
>
> From: Interest  On Behalf Of Nuno Santos
> Sent: Thursday, January 17, 2019 12:12 PM
> To: Tony Rietwyk 
> Cc: interest@qt-project.org
> Subject: Re: [Interest] Qt 5.12 for Windows (Static)
>
> Tony,
>
> It actually ended up something. There are a lot of issues. Can anyone 
> understand what is happening?
>
> Thanks!
>
> Nuno
>
> 
>
>
> On 17 Jan 2019, at 10:55, Tony Rietwyk  wrote:
>
> Hi Nuno,
>
> Are you sure that the static build of Qt worked?
>
> What happens when you start the debugging by single stepping?  In my 
> dynamically built exe, I get to qtmain_win.cpp, WinMain routine.  If the 
> single step works, how far do you get?  If it doesn't, then I think you may 
> be picking up the wrong runtime dlls - check the path env var.  My 
> understanding is that a statically built exe still needs dynamic linking to 
> the c/c++ runtime?  Try running the exe via MS depends utility from 
> http://www.dependencywalker.com/
>
> Hope that helps,
>
>
> On 17/01/2019 8:06 pm, Nuno Santos wrote:
>
>
> Hi,
>
> I have just compiled a fresh Qt 5.12.1 from the source statically on Windows 
> but I’m having a basic problem.
>
> Any application that I run, crashes immediately, even the Qt Creator project 
> templates, like que Qt Quick application template.
>
> I don’t have a clue of what is going on. Any ideas on how to get more 
> information to eventually fill a bug report?
>
> Thanks!
>
> Nuno
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Thiago Macieira
On Thursday, 17 January 2019 05:07:21 PST Nuno Santos wrote:
> Can you spot anything wrong?

Reduce your problem. Suggested steps:
 1) remove OpenSSL dependency
 2) use regular dynamic runtime (not -static-runtime)
 3) build your application with fewer Qt libraries

What is the smallest combination that still crashes at load?

Make sure your application is CONFIG += console, so that any output goes to 
the console instead of the debug ring.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Kai Koehne
> -Original Message-
> From: Interest  On Behalf Of Nuno Santos
> Sent: Thursday, January 17, 2019 11:27 AM
> To: coroberti . 
> Cc: interest@qt-project.org Interest 
> Subject: Re: [Interest] Qt 5.12 for Windows (Static)
> 
> Robert,
> 
> Yes, I know. I have tried both.
> 
> When I click the .exe it doesn’t happen nothing. Nothing! :/
> 
> Is there any kind of debug flags that I can set?

You can also run the app in 'profile' mode of the dependency walker 
(depends.exe, http://www.dependencywalker.com/).

Kai
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Nuno Santos
Maurice,

It doesn't work with Qt Examples as well.

This is a new machine and I have installed Visual Studio Community 2017, Python 
3.7.2 and Perl Strawberry 5.28.

Created the dir C:\Qt\5.12.0\ and inside I have created a qt_5.12_64_vars.cmd 
file with the following content:

CALL "C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
SET _ROOT=C:\Qt\5.12.0\src\
SET 
PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%;C:\Users\sinos\AppData\Local\Programs\Python\Python37-32\
SET _ROOT=

Then I call the following commands from git bash:

1) git clone git://code.qt.io/qt/qt5.git  src
2) perl init-repository -f 
--module-subset=qtbase,qtdeclarative,qtgraphicaleffects,qtimageformats,qtquickcontrols,qtquickcontrols2,qtwinextras,qtsvg,qtwebsockets

Next, opened a visual studio 2017 command line prompt and changed dir to 
c:\Qt\5.12.0\ and executed qt_5.12_64_vars.cmd and then:

> configure -confirm-license -recheck -prefix 
> c:\qt\5.12.0\msvc2017_5_12_static_64 -commercial -debug-and-release -static 
> -static-runtime -nomake examples -nomake tools -nomake tests -opengl dynamic 
> -openssl-linked -I c:\openssl-lib\include64 -L c:\openssl-lib\lib64 
> OPENSSL_LIBS="libeay32MT.lib ssleay32MT.lib" -qtnamespace 
> com_imaginando_qt_5_12_64

As I'm linking with openssl, the test that checks if openssl is available was 
failing and after some debugging I found that the reason was some missing 
symbols. In order to fix this I edited msvc-desktop.conf under 
C:\Qt\5.12.0\src\qtbase\mkspecs\common and added the following libs to 
QMAKE_LIBS

QMAKE_LIBS = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib 
advapi32.lib ws2_32.lib gdi32.lib

After that it compiled smoothly until the end. And this is where I am now.



Can you spot anything wrong?

Thanks!

Best regards,

Nuno

> On 17 Jan 2019, at 11:32, Maurice Kalinowski  wrote:
> 
> Those are windows related and resolved during runtime.
>  
> Maybe you could post your exact configure line, so that others can try to 
> reproduce it? Also which modules of Qt are you using?
> Does it work for Qt examples?
>  
> Maurice
>  
>  
> From: Interest  <mailto:interest-boun...@qt-project.org>> On Behalf Of Nuno Santos
> Sent: Thursday, January 17, 2019 12:12 PM
> To: Tony Rietwyk mailto:t...@rightsoft.com.au>>
> Cc: interest@qt-project.org <mailto:interest@qt-project.org>
> Subject: Re: [Interest] Qt 5.12 for Windows (Static)
>  
> Tony,
>  
> It actually ended up something. There are a lot of issues. Can anyone 
> understand what is happening?
>  
> Thanks!
>  
> Nuno
>  
> 
> 
> 
> On 17 Jan 2019, at 10:55, Tony Rietwyk  <mailto:t...@rightsoft.com.au>> wrote:
>  
> Hi Nuno,
> 
> Are you sure that the static build of Qt worked?
> 
> What happens when you start the debugging by single stepping?  In my 
> dynamically built exe, I get to qtmain_win.cpp, WinMain routine.  If the 
> single step works, how far do you get?  If it doesn't, then I think you may 
> be picking up the wrong runtime dlls - check the path env var.  My 
> understanding is that a statically built exe still needs dynamic linking to 
> the c/c++ runtime?  Try running the exe via MS depends utility from 
> http://www.dependencywalker.com/ <http://www.dependencywalker.com/>
> 
> Hope that helps,
> 
> 
> On 17/01/2019 8:06 pm, Nuno Santos wrote:
> 
> 
> Hi,
> 
> I have just compiled a fresh Qt 5.12.1 from the source statically on Windows 
> but I’m having a basic problem.
> 
> Any application that I run, crashes immediately, even the Qt Creator project 
> templates, like que Qt Quick application template.
> 
> I don’t have a clue of what is going on. Any ideas on how to get more 
> information to eventually fill a bug report?
> 
> Thanks!
> 
> Nuno
> ___
> Interest mailing list
> Interest@qt-project.org <mailto:Interest@qt-project.org>
> https://lists.qt-project.org/listinfo/interest 
> <https://lists.qt-project.org/listinfo/interest>
> ___
> Interest mailing list
> Interest@qt-project.org <mailto:Interest@qt-project.org>
> https://lists.qt-project.org/listinfo/interest 
> <https://lists.qt-project.org/listinfo/interest>
>  

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Nuno Santos
Tony,

It is the first time I’m building Qt 5.12 from the source. My latest stable 
static build from source was 5.10.

I have just tried dependency walker and for the time, I have saw this 
application not responding. It doesn’t load the test.exe binary. Just keeps 
there hanging….

Something is rely bad with this binary…

Nuno

> On 17 Jan 2019, at 10:55, Tony Rietwyk  wrote:
> 
> Hi Nuno,
> 
> Are you sure that the static build of Qt worked?
> 
> What happens when you start the debugging by single stepping?  In my 
> dynamically built exe, I get to qtmain_win.cpp, WinMain routine.  If the 
> single step works, how far do you get?  If it doesn't, then I think you may 
> be picking up the wrong runtime dlls - check the path env var.  My 
> understanding is that a statically built exe still needs dynamic linking to 
> the c/c++ runtime?  Try running the exe via MS depends utility from 
> http://www.dependencywalker.com/
> 
> Hope that helps,
> 
> 
> On 17/01/2019 8:06 pm, Nuno Santos wrote:
> 
>> Hi,
>> 
>> I have just compiled a fresh Qt 5.12.1 from the source statically on Windows 
>> but I’m having a basic problem.
>> 
>> Any application that I run, crashes immediately, even the Qt Creator project 
>> templates, like que Qt Quick application template.
>> 
>> I don’t have a clue of what is going on. Any ideas on how to get more 
>> information to eventually fill a bug report?
>> 
>> Thanks!
>> 
>> Nuno
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> https://lists.qt-project.org/listinfo/interest
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Jean-Michaël Celerier
You did add the Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin) call somewhere,
right ?

Best,
---
Jean-Michaël Celerier
http://www.jcelerier.name


On Thu, Jan 17, 2019 at 11:53 AM Nuno Santos 
wrote:

> Robert,
>
> Yes, I know. I have tried both.
>
> When I click the .exe it doesn’t happen nothing. Nothing! :/
>
> Is there any kind of debug flags that I can set?
>
> Nuno
>
> On 17 Jan 2019, at 10:16, coroberti .  wrote:
>
> On Thu, Jan 17, 2019 at 11:13 AM Nuno Santos 
> wrote:
>
>> Hi,
>> I have just compiled a fresh Qt 5.12.1 from the source statically on
>> Windows but I’m having a basic problem.
>> Any application that I run, crashes immediately, even the Qt Creator
>> project templates, like que Qt Quick application template.
>> I don’t have a clue of what is going on. Any ideas on how to get more
>> information to eventually fill a bug report?
>>
>> Thanks!
>> Nuno
>>
>
> Nuno,
> Are you running from QtCreator or by clicking the exe file?
> Clicking the exe could provide a Windows message if any dlls required are
> not linked.
>
> Running in debugger interesting if you are coming to main.
>
> Kind regards,
> Robert
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Henry Skoglund

On 2019-01-17 11:52, Nuno Santos wrote:
I have tried to put everything that is relevant in a single image. What 
is crashing is the Qt Creator template for a Qt Quick App.


As you can see not even the first line of debug is printed. Maybe 
something was not configured correctly.


I can’t spot anything wrong…. Can you?



That error "Cannot retrieve debugging output" you should try to fix: try 
to close all other programs running, for example Visual Studio and 
DbgView. (It could be that some of your qDebug() statement actually runs 
but you're not seeing any output because of that error).


Rgrds Henry

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Tony Rietwyk

Hi Nuno,

Are you sure that the static build of Qt worked?

What happens when you start the debugging by single stepping?  In my 
dynamically built exe, I get to qtmain_win.cpp, WinMain routine.  If the 
single step works, how far do you get?  If it doesn't, then I think you 
may be picking up the wrong runtime dlls - check the path env var.  My 
understanding is that a statically built exe still needs dynamic linking 
to the c/c++ runtime?  Try running the exe via MS depends utility from 
http://www.dependencywalker.com/


Hope that helps,


On 17/01/2019 8:06 pm, Nuno Santos wrote:


Hi,

I have just compiled a fresh Qt 5.12.1 from the source statically on Windows 
but I’m having a basic problem.

Any application that I run, crashes immediately, even the Qt Creator project 
templates, like que Qt Quick application template.

I don’t have a clue of what is going on. Any ideas on how to get more 
information to eventually fill a bug report?

Thanks!

Nuno
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread coroberti .
On Thu, Jan 17, 2019 at 12:27 PM Nuno Santos 
wrote:

> Robert,
>
> Yes, I know. I have tried both.
>
> When I click the .exe it doesn’t happen nothing. Nothing! :/
>
> Is there any kind of debug flags that I can set?
>
> Nuno
>
>
Nuno,
1.What about trying some log to file at the beginning of your main()?

2. What about compiling some console test and running it from console?

3. QT_DEBUG_PLUGINS
http://doc.qt.io/qt-5/deployment-plugins.html
http://doc.qt.io/qt-5/plugins-howto.html#static-plugins

j2mc
Robert
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Nuno Santos
Robert,

Yes, I know. I have tried both.

When I click the .exe it doesn’t happen nothing. Nothing! :/

Is there any kind of debug flags that I can set? 

Nuno

> On 17 Jan 2019, at 10:16, coroberti .  wrote:
> 
> On Thu, Jan 17, 2019 at 11:13 AM Nuno Santos  > wrote:
> Hi,
> I have just compiled a fresh Qt 5.12.1 from the source statically on Windows 
> but I’m having a basic problem.
> Any application that I run, crashes immediately, even the Qt Creator project 
> templates, like que Qt Quick application template.
> I don’t have a clue of what is going on. Any ideas on how to get more 
> information to eventually fill a bug report?
> 
> Thanks!
> Nuno
> 
> Nuno,
> Are you running from QtCreator or by clicking the exe file?
> Clicking the exe could provide a Windows message if any dlls required are not 
> linked.
> 
> Running in debugger interesting if you are coming to main.
> 
> Kind regards,
> Robert
>   

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread coroberti .
On Thu, Jan 17, 2019 at 11:13 AM Nuno Santos 
wrote:

> Hi,
> I have just compiled a fresh Qt 5.12.1 from the source statically on
> Windows but I’m having a basic problem.
> Any application that I run, crashes immediately, even the Qt Creator
> project templates, like que Qt Quick application template.
> I don’t have a clue of what is going on. Any ideas on how to get more
> information to eventually fill a bug report?
>
> Thanks!
> Nuno
>

Nuno,
Are you running from QtCreator or by clicking the exe file?
Clicking the exe could provide a Windows message if any dlls required are
not linked.

Running in debugger interesting if you are coming to main.

Kind regards,
Robert
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Nuno Santos
Mitch,

I don’t do dynamic builds on Windows. Only static builds. For dynamic builds I 
rely on the official releases. 

I have been build Qt from source on Windows since 5.8 and I have never 
experienced this before.

I don’t have the debugger installed on this machine yet. I believe we need to 
install something in order to have debugging on Windows. Can’t remember exactly 
what now.

DebugView prints nothings :(

More ideas?

Thanks!

Nuno

> On 17 Jan 2019, at 09:57, Mitch Curtis  wrote:
> 
>> -Original Message-
>> From: Interest  On Behalf Of Nuno
>> Santos
>> Sent: Thursday, 17 January 2019 10:06 AM
>> To: interest@qt-project.org Interest 
>> Subject: [Interest] Qt 5.12 for Windows (Static)
>> 
>> Hi,
>> 
>> I have just compiled a fresh Qt 5.12.1 from the source statically on Windows
>> but I’m having a basic problem.
>> 
>> Any application that I run, crashes immediately, even the Qt Creator project
>> templates, like que Qt Quick application template.
>> 
>> I don’t have a clue of what is going on. Any ideas on how to get more
>> information to eventually fill a bug report?
> 
> So dynamic builds work fine?
> 
> Make a debug build so you can get a stack trace. If you don't see any errors 
> before it crashes, try running it with DebugView just in case:
> 
> https://docs.microsoft.com/en-us/sysinternals/downloads/debugview
> 
>> Thanks!
>> 
>> Nuno
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Mitch Curtis
> -Original Message-
> From: Interest  On Behalf Of Nuno
> Santos
> Sent: Thursday, 17 January 2019 10:06 AM
> To: interest@qt-project.org Interest 
> Subject: [Interest] Qt 5.12 for Windows (Static)
> 
> Hi,
> 
> I have just compiled a fresh Qt 5.12.1 from the source statically on Windows
> but I’m having a basic problem.
> 
> Any application that I run, crashes immediately, even the Qt Creator project
> templates, like que Qt Quick application template.
> 
> I don’t have a clue of what is going on. Any ideas on how to get more
> information to eventually fill a bug report?

So dynamic builds work fine?

Make a debug build so you can get a stack trace. If you don't see any errors 
before it crashes, try running it with DebugView just in case:

https://docs.microsoft.com/en-us/sysinternals/downloads/debugview

> Thanks!
> 
> Nuno
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Qt 5.12 for Windows (Static)

2019-01-17 Thread Nuno Santos
Hi,

I have just compiled a fresh Qt 5.12.1 from the source statically on Windows 
but I’m having a basic problem.

Any application that I run, crashes immediately, even the Qt Creator project 
templates, like que Qt Quick application template.

I don’t have a clue of what is going on. Any ideas on how to get more 
information to eventually fill a bug report?

Thanks!

Nuno
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest