Daily PPA 32-bit build failures

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Daily PPA 32-bit build failures

Post by kkremitzki »

The last few days there have been build failures:

Code: Select all

/<<PKGBUILDDIR>>/src/Mod/Path/App/VoronoiCellPyImp.cpp: In member function ‘Py::Long Path::VoronoiCellPy::getColor() const’:
/<<PKGBUILDDIR>>/src/Mod/Path/App/VoronoiCellPyImp.cpp:125:57: error: call of overloaded ‘Long(boost::polygon::voronoi_cell<double>::color_type)’ is ambiguous
     return Py::Long(c->ptr->color() & Voronoi::ColorMask);
                                                         ^
https://launchpad.net/~freecad-maintain ... ING.txt.gz
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Daily PPA 32-bit build failures

Post by mlampert »

I'm on it.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Daily PPA 32-bit build failures

Post by mlampert »

PR-3930
hope this does the trick
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Daily PPA 32-bit build failures

Post by kkremitzki »

Looks like it's still ongoing:

Code: Select all

/<<PKGBUILDDIR>>/src/Mod/Path/App/VoronoiCellPyImp.cpp: In member function ‘Py::Long Path::VoronoiCellPy::getColor() const’:
/<<PKGBUILDDIR>>/src/Mod/Path/App/VoronoiCellPyImp.cpp:126:26: error: call of overloaded ‘Long(Path::Voronoi::color_type&)’ is ambiguous
     return Py::Long(color);
                          ^
https://launchpadlibrarian.net/50125816 ... ING.txt.gz
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Daily PPA 32-bit build failures

Post by wmayer »

The overloaded constructors of Py::Long accept the types:
long, unsigned long, int, PY_LONG_LONG (which is defined as long long) and unsigned PY_LONG_LONG

For 32-bit std::size_t normally is a typedef of unsigned int. Now unsigned int doesn't appear in the above list and thus the compiler doesn't know which of the above types the argument should be converted to. So, it's probably best to do a static cast to unsigned long:

Code: Select all

Voronoi::color_type color = c->ptr->color() & Voronoi::ColorMask;
return Py::Long(static_cast<unsigned long>(color));
Alternatively, you can use the Python C API function PyLong_FromSize_t and do

Code: Select all

return Py::Long(PyLong_FromSize_t(color), true);
But you have to check if PyLong_FromSize_t is also available for Py2.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Daily PPA 32-bit build failures

Post by mlampert »

wmayer wrote: Fri Oct 09, 2020 6:12 pm But you have to check if PyLong_FromSize_t is also available for Py2.
Thanks Werner, will do - do we still support Py2 ?
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Daily PPA 32-bit build failures

Post by wmayer »

Thanks Werner, will do - do we still support Py2 ?
Well, we still have a travis build configuration using Qt4 + Py2. This is because on some systems Qt5 doesn't work so well and they still prefer Qt4. But as soon as v0.19 is out (~ end of this your I guess) Qt4 & Py2 support will definitely be dropped.

Btw, PyLong_FromSize_t is also available for Py2: https://docs.python.org/2/c-api/long.html
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Daily PPA 32-bit build failures

Post by kkremitzki »

I've set the 16.04 daily builds recipe to build-on-demand for now while this gets ironed out. (Forgot to mention BTW that this is specifically 32-bit builds on 16.04)

https://code.launchpad.net/~freecad-mai ... ily-xenial
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Daily PPA 32-bit build failures

Post by mlampert »

Post Reply