QtXmlPatterns Available in Travis Win Build?

Having trouble installing or compiling FreeCAD? Get help here.
wandererfan
Posts: 3088
Joined: Tue Nov 06, 2012 5:42 pm

QtXmlPatterns Available in Travis Win Build?

Postby wandererfan » Sat Jun 08, 2019 10:18 pm

We're having some trouble debugging PR 2238. Builds & tests fine in Linux, but we get a failure for Win:

Code: Select all

c:\users\travis\build\freecad\freecad\src\mod\techdraw\app\qdomnodemodel.h(4): fatal error C1083: Cannot open include file: 'QAbstractXmlNodeModel': No such file or directory [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\TechDraw\App\TechDraw.vcxproj]
Does anybody know how to tell if Qt XML Patterns is available in Travis Win builds?

Thanks,
wf
User avatar
sgrogan
Posts: 5425
Joined: Wed Oct 22, 2014 5:02 pm

Re: QtXmlPatterns Available in Travis Win Build?

Postby sgrogan » Sun Jun 09, 2019 4:37 pm

wandererfan wrote:
Sat Jun 08, 2019 10:18 pm
el': No such file or directory [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\TechDraw\App\TechDraw.vcxproj]

Does anybody know how to tell if Qt XML Patterns is available in Travis Win builds?
Yes, it's in the Libpack used.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: QtXmlPatterns Available in Travis Win Build?

Postby abdullah » Sun Jun 09, 2019 5:15 pm

wandererfan wrote:
Sat Jun 08, 2019 10:18 pm
We're having some trouble debugging PR 2238. Builds & tests fine in Linux, but we get a failure for Win:

Code: Select all

c:\users\travis\build\freecad\freecad\src\mod\techdraw\app\qdomnodemodel.h(4): fatal error C1083: Cannot open include file: 'QAbstractXmlNodeModel': No such file or directory [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\TechDraw\App\TechDraw.vcxproj]
Does anybody know how to tell if Qt XML Patterns is available in Travis Win builds?

Thanks,
wf
This is the content of the freecadlibs library:

Code: Select all

FreeCADLibs/include/QtXmlPatterns$ ls
5.12.1                     qabstractxmlnodemodel.h  qsourcelocation.h       qtxmlpatternsversion.h  QXmlNamePool        qxmlresultitems.h      qxmlserializer.h
QAbstractMessageHandler    QAbstractXmlReceiver     QtXmlPatterns           QXmlFormatter           qxmlnamepool.h      QXmlSchema
qabstractmessagehandler.h  qabstractxmlreceiver.h   qtxmlpatterns-config.h  qxmlformatter.h         QXmlNodeModelIndex  qxmlschema.h
QAbstractUriResolver       QSimpleXmlNodeModel      QtXmlPatternsDepends    QXmlItem                QXmlQuery           QXmlSchemaValidator
qabstracturiresolver.h     qsimplexmlnodemodel.h    qtxmlpatternsglobal.h   QXmlName                qxmlquery.h         qxmlschemavalidator.h
QAbstractXmlNodeModel      QSourceLocation          QtXmlPatternsVersion    qxmlname.h              QXmlResultItems     QXmlSerializer
May this be related to caps?

I see the build error in Travis:

Code: Select all

CMake does not need to re-run because C:/Users/travis/build/FreeCAD/FreeCAD/build/src/Mod/TechDraw/App/CMakeFiles/generate.stamp is up-to-date.
  QDomNodeModel.cpp
c:\users\travis\build\freecad\freecad\src\mod\techdraw\app\qdomnodemodel.h(4): fatal error C1083: Cannot open include file: 'QAbstractXmlNodeModel': No such file or directory [C:\Users\travis\build\FreeCAD\FreeCAD\build\src\Mod\TechDraw\App\TechDraw.vcxproj]
May this be cmake related?
tpavlicek
Posts: 27
Joined: Sun Jan 07, 2018 2:15 am

Re: QtXmlPatterns Available in Travis Win Build?

Postby tpavlicek » Sun Jun 09, 2019 6:35 pm

Hi to all,

sorry, I was without access to my computer during the weekend. @Abdullah Yes, I am quite sure the missing QAbstractXmlNodeModel header is the problem and as was pointed out, the QXmlPatterns library + all headers needed is present in the libpack. Maybe tomorrow I will be able to get my hands on a Windows machine with VS 2015 installed, so I will try the Windows build and hopefully find out what's going on.

Thanks to all of you for help and support, I am sorry for the inconvenience,

Tomas
wmayer
Site Admin
Posts: 14896
Joined: Thu Feb 19, 2009 10:32 am

Re: QtXmlPatterns Available in Travis Win Build?

Postby wmayer » Sun Jun 09, 2019 10:38 pm

wandererfan wrote:
Sat Jun 08, 2019 10:18 pm
Does anybody know how to tell if Qt XML Patterns is available in Travis Win builds?
As it OK to merge the PR as soon as the Win issues are fixed?
wandererfan
Posts: 3088
Joined: Tue Nov 06, 2012 5:42 pm

Re: QtXmlPatterns Available in Travis Win Build?

Postby wandererfan » Mon Jun 10, 2019 12:32 am

wmayer wrote:
Sun Jun 09, 2019 10:38 pm
As it OK to merge the PR as soon as the Win issues are fixed?
Better to wait. Still some minor issues - https://forum.freecadweb.org/viewtopic. ... 43#p313088
User avatar
apeltauer
Posts: 212
Joined: Fri Aug 11, 2017 2:19 pm

Re: QtXmlPatterns Available in Travis Win Build?

Postby apeltauer » Mon Jun 10, 2019 3:47 am

Just a hint from my side.
Do we need to add the xml stuff by the cmake config??

Ps: right know I have no access to my machine, just cell phone, otherwise I just looked by myself...
tpavlicek
Posts: 27
Joined: Sun Jan 07, 2018 2:15 am

Re: QtXmlPatterns Available in Travis Win Build?

Postby tpavlicek » Mon Jun 10, 2019 11:38 am

Hello,

finally, the Windows build is successful :-) Thanks all of you for helping hands!

There were several problems, but the important ones were:

  • There is a difference in CMake treatment between Qt4 and Qt5. Qt4 uses QT_QTXMLPATTERNS_INCLUDE_DIR + QT_QTXMLPATTERNS_LIBRARY, while Qt5 sets Qt5XmlPatterns_INCLUDE_DIRS and Qt5XmlPatterns_LIBRARIES.
  • Windows DLLs require __declspec(dllexport) / __declspec(dllimport) depending on whether the DLL functions are exported resp. imported.This needs to be declared directly in the class definition.
Once again thanks and sorry for inconvenience,


Tomas
wandererfan
Posts: 3088
Joined: Tue Nov 06, 2012 5:42 pm

Re: QtXmlPatterns Available in Travis Win Build?

Postby wandererfan » Mon Jun 10, 2019 11:59 am

tpavlicek wrote:
Mon Jun 10, 2019 11:38 am
finally, the Windows build is successful :-) Thanks all of you for helping hands!
Terrific!

I've pushed a fix for Annotations to your branch and Travis is running now. Maybe we want to squash some commits to make the history cleaner?

I don't have a solution for existing custom Templates. They need to have their font sizes adjusted, yes? Can we write a little script to do this?
tpavlicek
Posts: 27
Joined: Sun Jan 07, 2018 2:15 am

Re: QtXmlPatterns Available in Travis Win Build?

Postby tpavlicek » Mon Jun 10, 2019 12:06 pm

Hi WandererFan,

sure no problem with squashing the commits - at least for these with CMake changes this is more than desirable. As for the custom templates, let me take a look on them, definitely the new Russian templates must be updated as well and have the xml:space="preserve" attribute removed from the <text> elements.

Kind regards,

Tomas

PS: Thanks for Your additional fixes!
Last edited by tpavlicek on Mon Jun 10, 2019 12:09 pm, edited 1 time in total.