conda build win 10 stopped working since Link merge

Having trouble installing or compiling FreeCAD? Get help here.
UR_
Posts: 1013
Joined: Tue Jan 03, 2017 8:42 pm

conda build win 10 stopped working since Link merge

Postby UR_ » Mon Aug 19, 2019 9:59 am

Since this commit

https://github.com/FreeCAD/FreeCAD/comm ... c8e2dfb544

conda build throws this error: :disappointed:

Screenshot 001.png
Screenshot 001.png (10.84 KiB) Viewed 1263 times

TopShape.cpp, line 456

Code: Select all

TopAbs_ShapeEnum TopoShape::shapeType(const char *type, bool silent) {
    if(type) {
        initShapeNameMap();
        for(size_t idx=0;idx<_ShapeNames.size();++idx) {
            if(_ShapeNames[idx].size() && boost::starts_with(type,_ShapeNames[idx]))
                return (TopAbs_ShapeEnum)idx;
        }
    }


using boost 1.70.0

complete list:

Code: Select all

(freecad-dev) C:\Users\aio>conda list
# packages in environment at C:\Users\aio\Miniconda3\envs\freecad-dev:
#
# Name                    Version                   Build  Channel
boost-cpp                 1.70.0               h6a4c333_2    conda-forge
bzip2                     1.0.8                hfa6e2cd_0    conda-forge
ca-certificates           2019.6.16            hecc5488_0    conda-forge
certifi                   2019.6.16                py37_1    conda-forge
clang_variant             1.0                     default    conda-forge
clangdev                  5.0.0             hb6fa290_1003    conda-forge
coin3d                    4.0.0             h1df4a3b_1006    conda-forge
curl                      7.65.3               h4496350_0    conda-forge
cycler                    0.10.0                     py_1    conda-forge
eigen                     3.3.7             he980bc4_1000    conda-forge
expat                     2.2.5             habb2df7_1003    conda-forge
freecad                   0.19.pre        py37h206906e_34    freecad/label/dev
freetype                  2.10.0               h563cfd7_1    conda-forge
future                    0.17.1                py37_1000    conda-forge
gitdb2                    2.0.5                      py_0    conda-forge
gitpython                 3.0.1                      py_0    conda-forge
hdf4                      4.2.13            hf8e6fe8_1002    conda-forge
hdf5                      1.10.5          nompi_hcc15c50_1100    conda-forge
icu                       64.2                 he025d50_0    conda-forge
intel-openmp              2019.4                      245
jpeg                      9c                hfa6e2cd_1001    conda-forge
jsoncpp                   1.8.4             h1ad3211_1001    conda-forge
kiwisolver                1.1.0            py37he980bc4_0    conda-forge
krb5                      1.16.3            hdd46e55_1001    conda-forge
libblas                   3.8.0                    12_mkl    conda-forge
libcblas                  3.8.0                    12_mkl    conda-forge
libcurl                   7.65.3               h4496350_0    conda-forge
libiconv                  1.15              hfa6e2cd_1005    conda-forge
liblapack                 3.8.0                    12_mkl    conda-forge
libllvm8                  8.0.1                         0    conda-forge
libnetcdf                 4.6.2             ha953453_1002    conda-forge
libpng                    1.6.37               h7602738_0    conda-forge
libssh2                   1.8.2                h642c060_2    conda-forge
libtiff                   4.0.10            h6512ee2_1003    conda-forge
libxml2                   2.9.9                h9ce36c8_2    conda-forge
libxslt                   1.1.32            heafd4d3_1004    conda-forge
llvm-tools                8.0.1                he980bc4_0    conda-forge
llvmdev                   8.0.1                he980bc4_0    conda-forge
lz4-c                     1.8.3             he025d50_1001    conda-forge
matplotlib                3.1.1                    py37_1    conda-forge
matplotlib-base           3.1.1            py37h2852a4a_1    conda-forge
mkl                       2019.4                      245
netgen                    6.2.1808        py37h58e452a_1006    conda-forge
numpy                     1.17.0           py37hc71023c_0    conda-forge
occt                      7.3.0             hd7db75f_1004    conda-forge
openssl                   1.1.1c               hfa6e2cd_0    conda-forge
pip                       19.2.2                   py37_0    conda-forge
pivy                      0.6.5a2          py37h729ed8e_3    freecad
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pybind11                  2.3.0            py37he980bc4_1    conda-forge
pyparsing                 2.4.2                      py_0    conda-forge
pyqt                      5.9.2            py37h6538335_2    conda-forge
pyside2                   5.9.0a1          py37h0555040_0    conda-forge
python                    3.7.3                h510b542_1    conda-forge
python-dateutil           2.8.0                      py_0    conda-forge
pyyaml                    5.1.2            py37hfa6e2cd_0    conda-forge
qt                        5.9.7                h506e8af_3    conda-forge
setuptools                41.0.1                   py37_0    conda-forge
sip                       4.19.8          py37h6538335_1000    conda-forge
six                       1.12.0                py37_1000    conda-forge
smesh                     8.3.0.2              h90a28c1_6    conda-forge
smmap2                    2.0.5                      py_0    conda-forge
soqt                      1.6.0a            h729ed8e_1002    conda-forge
sqlite                    3.29.0               hfa6e2cd_0    conda-forge
swig                      4.0.0                         0    conda-forge
tbb                       2019.7               he980bc4_0    conda-forge
tbb-devel                 2019.7               he980bc4_0    conda-forge
tk                        8.6.9             hfa6e2cd_1002    conda-forge
tornado                   6.0.3            py37hfa6e2cd_0    conda-forge
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.15.26706          h3a45250_4
vtk                       8.2.0           py37hf8bee71_203    conda-forge
wheel                     0.33.4                   py37_0    conda-forge
wincertstore              0.2                   py37_1002    conda-forge
xerces-c                  3.2.2             h6538335_1004    conda-forge
xz                        5.2.4             h2fa13f4_1001    conda-forge
yaml                      0.1.7             hfa6e2cd_1001    conda-forge
zlib                      1.2.11            h2fa13f4_1005    conda-forge
zstd                      1.4.0                hd8a0e53_0    conda-forge
wmayer
Site Admin
Posts: 14988
Joined: Thu Feb 19, 2009 10:32 am

Re: conda build win 10 stopped working since Link merge

Postby wmayer » Tue Aug 20, 2019 1:11 pm

Does replacing

Code: Select all

#include <boost/algorithm/string/predicate.hpp>
with

Code: Select all

#include <boost/algorithm/string.hpp>
change anything?

I don't have boost 1.70 to check the behaviour but according to the error message the functions boost::starts_with still seem to be the same. What could have changed is that parts of the implementation have been moved to other files.
User avatar
easyw-fc
Posts: 2689
Joined: Thu Jul 09, 2015 9:34 am

Re: conda build win 10 stopped working since Link merge

Postby easyw-fc » Tue Aug 20, 2019 1:28 pm

Assembly3 has Conda builds too...
Maybe @eealthundef could chime in...
wmayer
Site Admin
Posts: 14988
Joined: Thu Feb 19, 2009 10:32 am

Re: conda build win 10 stopped working since Link merge

Postby wmayer » Tue Aug 20, 2019 1:33 pm

According to this code snippet https://thispointer.com/c-check-if-a-st ... en-string/ the header file should be boost/algorithm/string.hpp
UR_
Posts: 1013
Joined: Tue Jan 03, 2017 8:42 pm

Re: conda build win 10 stopped working since Link merge

Postby UR_ » Tue Aug 20, 2019 2:53 pm

wmayer wrote:
Tue Aug 20, 2019 1:11 pm
Does replacing
#include <boost/algorithm/string/predicate.hpp>
with
#include <boost/algorithm/string.hpp>
change anything?
Unfortunately, no.
Same error message :disappointed:
User avatar
Kunda1
Posts: 5912
Joined: Thu Jan 05, 2017 9:03 pm

Re: conda build win 10 stopped working since Link merge

Postby Kunda1 » Thu Aug 22, 2019 4:32 pm

Should x-post to the link3 merge thread for more visibility

Edit: Done
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
realthunder
Posts: 1229
Joined: Tue Jan 03, 2017 10:55 am

Re: conda build win 10 stopped working since Link merge

Postby realthunder » Thu Aug 22, 2019 10:32 pm

UR_ wrote:
Mon Aug 19, 2019 9:59 am
Since this commit
Can you please manually change the boost::start_with line to the following and try again? The error message does not make sense to me. The two argument version of starts_with() should clearly work. Are there any other warning or errors?

Code: Select all

if(_ShapeNames[idx].size() && boost::starts_with(type,_ShapeNames[idx].c_str()))
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
looo
Posts: 2948
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda build win 10 stopped working since Link merge

Postby looo » Fri Aug 23, 2019 5:57 am

I can confirm:

https://ci.appveyor.com/project/looooo/ ... tock-8jh14

Code: Select all

C:\PROGRA~2\MI0E91~1.0\VC\bin\amd64\cl.exe  /nologo /TP -DFCAppPart -DFCUseFreeType -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_SNPRINTF -DPart_EXPORTS -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_XML_LIB -D_OCC64 -I%PREFIX%\Library\cmake\..\include\smesh -Isrc -I..\src -I. -Isrc\Mod\Part\App -I..\src\Mod\Part\App -I%PREFIX%\Library\include -I%PREFIX%\Library\include\opencascade -I%PREFIX%\include -I%PREFIX%\Library\include\qt -I%PREFIX%\Library\include\qt\QtCore -I%PREFIX%\Library\.\mkspecs\win32-msvc -I%PREFIX%\Library\include\qt\QtXml /DWIN32 /D_WINDOWS /W3 /GR  /MD /O2 /Ob2 /DNDEBUG /Zm150 /bigobj /Zi /EHa /showIncludes /Fosrc\Mod\Part\App\CMakeFiles\Part.dir\TopoShape.cpp.obj /Fdsrc\Mod\Part\App\CMakeFiles\Part.dir\ /FS -c ..\src\Mod\Part\App\TopoShape.cpp
..\src\Mod\Part\App\TopoShape.cpp(414): error C2079: '_ShapeNames' uses undefined class 'std::array<std::string,8>'
..\src\Mod\Part\App\TopoShape.cpp(417): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(417): error C2228: left of '.empty' must have class/struct/union
..\src\Mod\Part\App\TopoShape.cpp(418): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(419): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(420): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(421): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(422): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(423): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(424): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(425): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(455): error C2027: use of undefined type 'std::array<std::string,8>'
..\src\Mod\Part\App\TopoShape.cpp(414): note: see declaration of 'std::array<std::string,8>'
..\src\Mod\Part\App\TopoShape.cpp(455): error C2228: left of '.size' must have class/struct/union
..\src\Mod\Part\App\TopoShape.cpp(456): error C2088: '[': illegal for class
..\src\Mod\Part\App\TopoShape.cpp(456): error C2228: left of '.size' must have class/struct/union
..\src\Mod\Part\App\TopoShape.cpp(456): error C2672: 'boost::starts_with': no matching overloaded function found
..\src\Mod\Part\App\TopoShape.cpp(456): error C2780: 'bool boost::algorithm::starts_with(const Range1T &,const Range2T &,PredicateT)': expects 3 arguments - 1 provided
%PREFIX%\Library\include\boost/algorithm/string/predicate.hpp(57): note: see declaration of 'boost::algorithm::starts_with'
..\src\Mod\Part\App\TopoShape.cpp(456): error C2780: 'bool boost::algorithm::starts_with(const Range1T &,const Range2T &)': expects 2 arguments - 1 provided
%PREFIX%\Library\include\boost/algorithm/string/predicate.hpp(91): note: see declaration of 'boost::algorithm::starts_with'
..\src\Mod\Part\App\TopoShape.cpp(494): error C2027: use of undefined type 'std::array<std::string,8>'
..\src\Mod\Part\App\TopoShape.cpp(414): note: see declaration of 'std::array<std::string,8>'
..\src\Mod\Part\App\TopoShape.cpp(494): error C2228: left of '.size' must have class/struct/union

please help with my conda-packaging efforts: https://liberapay.com/looooo/
UR_
Posts: 1013
Joined: Tue Jan 03, 2017 8:42 pm

Re: conda build win 10 stopped working since Link merge

Postby UR_ » Fri Aug 23, 2019 11:01 am

Both patches applied

wmayer:
TopoShape.cpp line 185

Code: Select all

#include <boost/algorithm/string.hpp>
realthunder:
TopoShape.cpp line 456

Code: Select all

if(_ShapeNames[idx].size() && boost::starts_with(type,_ShapeNames[idx].c_str()))
Sorry, no success :(

Screenshot 002.png
Screenshot 002.png (79.75 KiB) Viewed 1076 times
UR_
Posts: 1013
Joined: Tue Jan 03, 2017 8:42 pm

Re: conda build win 10 stopped working since Link merge

Postby UR_ » Sat Aug 24, 2019 7:52 am

looo wrote: *ping*
Last build finished without error message.

I need to patch TopoShape.cpp

Code: Select all

diff C3 C:/Users/aio/FreeCADcode/src/Mod/Part/App/TopoShape.cpp C:/Users/aio/Desktop/TopoShape.cpp
*** C:/Users/aio/FreeCADcode/src/Mod/Part/App/TopoShape.cpp	Sat Aug 24 09:37:55 2019
--- C:/Users/aio/Desktop/TopoShape.cpp	Sat Aug 24 09:33:54 2019
***************
*** 28,33 ****
--- 28,34 ----
  # include <cstdlib>
  # include <sstream>
  # include <QString>
+ # include <array>
  
  # include <BRepLib.hxx>
  # include <BSplCLib.hxx>
TopoShape.diff.txt
(449 Bytes) Downloaded 23 times