Help me understand building

windows

#1

I’ve been using Valentina with a lot of enjoyment for months now, and I want to repeat what many have said, it is an amazing piece of software you’ve built.

What I still don’t understand, is building the source code, especially on windows. It seems very hit or miss - one build fails while one build works as different commits come along. Also, seeing from the appveyor builds, some builds fail on that as well, while some environments build without issue.

Also today - you released a new test build for download on the main website, for windows, yet whatever I try on windows 10/qt5.8 with mingw 5.3, it doesn’t build for me. That for me is the final proof that either I’m doing something wrong, or there’s something wrong with my configuration.

I already tried upgrading from qt5.7 to qt5.8, but this did not help. I understand both the command line “make_install.bat” script building way, and the qt creator way, the latter also giving me detailed errors on where the project fails to build.

I wonder how you as developers build while I obviously can’t? What am I doing wrong? Sometimes I can’t follow the latest commits for weeks, yet new commits are being churned out all the time, obviously changing things/tweaking things.

Not being able to build the latest builds makes it impossible for me to test the latest revisions, which I’d thoroughly would like to do. Is it easier to build on ubuntu? Do you recommend switching to a linux environment for development purposes? Then again, today, you’ve managed to create a windows installer for the latest build, yet I can’t build it myself - which poses the question whether or not there’s not just some trick to building that I’m missing - or a certain technique which ensures I can fix building issues on my favorite platform (i.e. windows)


#2

As i understand this is question for me.:slight_smile:

That’s good that you know how to build the project.

This is because i have been using Ubuntu for developing. And can test build success before commit only on this platform. That’s why i setted up a CI service, like Appveyor, to test changes on other platforms. Different platforms and even compilers from the same vendor have differences we should test. This mean some commits will fail on some platforms/Qt versions/for different compilers/for different versions of compilers from the same vendor.

As to Appveyor not always fail status means a build is broken. It just can mean that we got compiler warning. We treat them as errors in this case. That’s true not only for Appveyor, but for all CI services we have been using.

How can i say you what you are doing wrong when i don’t know what errors you get.

I assure you we don’t hide any tricks from you. Actually you know about Appveyor, but did you tried to analyze file appveyor.yml? Or maybe look at Appveyor build log?


#3

I see. So if I’d switch to ubuntu, I could more easily test each and every one of your new commits without any issues. Are there any guides (even if it’s only a rough guide, I usually figure it out) that would help me get started?

I tried looking at the appveyor build log, but it throws different errors to what I’m getting. The most common error I’m getting now is the following (and has been since over a week, same file, same place). Unfortunately though I know some coding, C++ is still more like chinese for me, so I can’t really figure out what to change in order to get it to build.

This is the same consistent error I’m getting on my machine:

As it is easiest to display the error while in QT creator, that is how i’m running the build - I make sure I clean, run qmake first, then run build in debug mode.

here is the paste of the compile output:

https://paste.ofcode.org/kPthy7RGCADuB3UnXnJTAX

basically, vpiecenode is the problem.


#4
In file included from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:30:0:
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h: In function 'QDataStream& operator>>(QDataStream&, VPieceNodeData&)':
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:8: error: ambiguous overload for 'operator>>' (operand types are 'QDataStream' and 'quint32 {aka unsigned int}')
     in >> p.m_id
        ^
In file included from C:\Qt\5.8\mingw53_32\include/QtCore/qregexp.h:47:0,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qstringlist.h:47,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qlist.h:1093,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qhash.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/qshareddata.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/QSharedDataPointer:1,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.h:33,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:29:
C:\Qt\5.8\mingw53_32\include/QtCore/qstring.h:1370:28: note: candidate: QDataStream& operator>>(QDataStream&, QString&) <near match>
 Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QString &);
                            ^
C:\Qt\5.8\mingw53_32\include/QtCore/qstring.h:1370:28: note:   conversion of argument 2 would be ill-formed:
In file included from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:30:0:
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:13: error: invalid user-defined conversion from 'quint32 {aka unsigned int}' to 'QString&' [-fpermissive]
     in >> p.m_id
             ^
In file included from C:\Qt\5.8\mingw53_32\include/QtCore/qregexp.h:47:0,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qstringlist.h:47,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qlist.h:1093,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qhash.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/qshareddata.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/QSharedDataPointer:1,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.h:33,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:29:
C:\Qt\5.8\mingw53_32\include/QtCore/qstring.h:673:31: note: candidate is: QString::QString(const char*) <near match>
     inline QT_ASCII_CAST_WARN QString(const char *ch)
                               ^
C:\Qt\5.8\mingw53_32\include/QtCore/qstring.h:673:31: note:   conversion of argument 1 would be ill-formed:
In file included from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:30:0:
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:13: error: invalid conversion from 'quint32 {aka unsigned int}' to 'const char*' [-fpermissive]
     in >> p.m_id
             ^
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:13: error: invalid conversion from 'quint32 {aka unsigned int}' to 'const char*' [-fpermissive]
In file included from C:\Qt\5.8\mingw53_32\include/QtCore/qregexp.h:47:0,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qstringlist.h:47,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qlist.h:1093,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qhash.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/qshareddata.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/QSharedDataPointer:1,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.h:33,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:29:
C:\Qt\5.8\mingw53_32\include/QtCore/qstring.h:673:31: note:   initializing argument 1 of 'QString::QString(const char*)'
     inline QT_ASCII_CAST_WARN QString(const char *ch)
                               ^
In file included from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:30:0:
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:13: error: conversion to non-const reference type 'class QString&' from rvalue of type 'QString' [-fpermissive]
     in >> p.m_id
             ^
In file included from C:\Qt\5.8\mingw53_32\include/QtCore/qbytearraylist.h:47:0,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qlist.h:1092,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qhash.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/qshareddata.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/QSharedDataPointer:1,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.h:33,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:29:
C:\Qt\5.8\mingw53_32\include/QtCore/qbytearray.h:679:28: note: candidate: QDataStream& operator>>(QDataStream&, QByteArray&) <near match>
 Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QByteArray &);
                            ^
C:\Qt\5.8\mingw53_32\include/QtCore/qbytearray.h:679:28: note:   conversion of argument 2 would be ill-formed:
In file included from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:30:0:
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:13: error: invalid user-defined conversion from 'quint32 {aka unsigned int}' to 'QByteArray&' [-fpermissive]
     in >> p.m_id
             ^
In file included from C:\Qt\5.8\mingw53_32\include/QtCore/qbytearraylist.h:47:0,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qlist.h:1092,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qhash.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/qshareddata.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/QSharedDataPointer:1,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.h:33,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:29:
C:\Qt\5.8\mingw53_32\include/QtCore/qbytearray.h:181:5: note: candidate is: QByteArray::QByteArray(const char*, int) <near match>
     QByteArray(const char *, int size = -1);
     ^

#5
C:\Qt\5.8\mingw53_32\include/QtCore/qbytearray.h:181:5: note:   conversion of argument 1 would be ill-formed:
In file included from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:30:0:
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:13: error: invalid conversion from 'quint32 {aka unsigned int}' to 'const char*' [-fpermissive]
     in >> p.m_id
             ^
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:13: error: invalid conversion from 'quint32 {aka unsigned int}' to 'const char*' [-fpermissive]
In file included from C:\Qt\5.8\mingw53_32\include/QtCore/qbytearraylist.h:47:0,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qlist.h:1092,
                 from C:\Qt\5.8\mingw53_32\include/QtCore/qhash.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/qshareddata.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/QSharedDataPointer:1,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.h:33,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:29:
C:\Qt\5.8\mingw53_32\include/QtCore/qbytearray.h:181:5: note:   initializing argument 1 of 'QByteArray::QByteArray(const char*, int)'
     QByteArray(const char *, int size = -1);
     ^
In file included from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:30:0:
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:13: error: conversion to non-const reference type 'class QByteArray&' from rvalue of type 'QByteArray' [-fpermissive]
     in >> p.m_id
             ^
In file included from C:\Qt\5.8\mingw53_32\include/QtCore/qhash.h:44:0,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/qshareddata.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/QSharedDataPointer:1,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.h:33,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:29:
C:\Qt\5.8\mingw53_32\include/QtCore/qchar.h:595:28: note: candidate: QDataStream& operator>>(QDataStream&, QChar&) <near match>
 Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QChar &);
                            ^
C:\Qt\5.8\mingw53_32\include/QtCore/qchar.h:595:28: note:   conversion of argument 2 would be ill-formed:
In file included from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:30:0:
..\..\..\..\Software\src\libs\vpatterndb\vpiecenode_p.h:148:13: error: invalid initialization of non-const reference of type 'QChar&' from an rvalue of type 'QChar'
     in >> p.m_id
             ^
In file included from C:\Qt\5.8\mingw53_32\include/QtCore/qhash.h:44:0,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/qshareddata.h:46,
                 from C:\Qt\5.8\mingw53_32\include\QtCore/QSharedDataPointer:1,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.h:33,
                 from ..\..\..\..\Software\src\libs\vpatterndb\vpiecenode.cpp:29:
C:\Qt\5.8\mingw53_32\include/QtCore/qchar.h:85:22: note:   after user-defined conversion: constexpr QChar::QChar(uint)
     Q_DECL_CONSTEXPR QChar(uint rc) Q_DECL_NOTHROW : ucs(ushort(rc & 0xffff)) {}
                      ^
g++ -c -pipe -fno-keep-inline-dllexport -O0 -Wall -Wextra -fno-omit-frame-pointer -g -std=gnu++11 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_MESSAGELOGCONTEXT -DQT_QML_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\..\..\..\Software\src\libs\vwidgets -I. -I..\..\..\..\Software\src\libs\vtools -I..\..\..\..\Software\src\libs\vwidgets -I..\..\..\..\Software\src\libs\vformat -I..\..\..\..\Software\src\libs\vpatterndb -I..\..\..\..\Software\src\libs\fervor -I..\..\..\..\Software\src\libs\vmisc -I..\..\..\..\Software\src\libs\vgeometry -I..\..\..\..\Software\src\libs\ifc -I..\..\..\..\Software\src\libs\vlayout -I..\..\..\..\Software\src\libs\qmuparser -I..\..\..\..\Software\src\libs\vpropertyexplorer -IC:\Qt\5.8\mingw53_32\include -IC:\Qt\5.8\mingw53_32\include\QtPrintSupport -IC:\Qt\5.8\mingw53_32\include\QtWidgets -IC:\Qt\5.8\mingw53_32\include\QtGui -IC:\Qt\5.8\mingw53_32\include\QtANGLE -IC:\Qt\5.8\mingw53_32\include\QtCore -Imoc -IC:\Qt\5.8\mingw53_32\mkspecs\win32-g++  -o obj\fancytabbar.o ..\..\..\..\Software\src\libs\vwidgets\fancytabbar\fancytabbar.cpp
Makefile:2961: recipe for target 'obj/vpiecenode.o' failed

#6

Don’t switch. Use OS you like. We have a Wiki page that describes how to build code.

The one annoying thing about C++ compilers on Windows it that they very often can’t find headers where on Linux you don’t have such a problem.

I just searched in Google your error “ambiguous overload for ‘operator>>’ (operand types are ‘QDataStream’ and ‘quint32 {aka unsigned int}’)” and found this bug report. And looks like we are dealing with missed header.:slight_smile: Patch already in the repository.


#7

HI @pvd! So glad you’re interested in becoming a Valentina contributor!