QtXmlPatterns Available in Travis Win Build?

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

QtXmlPatterns Available in Travis Win Build?

Post by wandererfan »

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
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: QtXmlPatterns Available in Travis Win Build?

Post by sgrogan »

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.
"fight the good fight"
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: QtXmlPatterns Available in Travis Win Build?

Post by abdullah »

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: 60
Joined: Sun Jan 07, 2018 2:15 am

Re: QtXmlPatterns Available in Travis Win Build?

Post by tpavlicek »

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
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: QtXmlPatterns Available in Travis Win Build?

Post by wmayer »

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?
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: QtXmlPatterns Available in Travis Win Build?

Post by wandererfan »

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: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: QtXmlPatterns Available in Travis Win Build?

Post by apeltauer »

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: 60
Joined: Sun Jan 07, 2018 2:15 am

Re: QtXmlPatterns Available in Travis Win Build?

Post by tpavlicek »

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
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: QtXmlPatterns Available in Travis Win Build?

Post by wandererfan »

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: 60
Joined: Sun Jan 07, 2018 2:15 am

Re: QtXmlPatterns Available in Travis Win Build?

Post by tpavlicek »

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.
Post Reply