conda build 0.19.19784 with linker errors

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

conda build 0.19.19784 with linker errors

Postby UR_ » Mon Mar 02, 2020 3:43 pm

Since some days, I got linker errors with conda build on win 10, concerning tbb

Code: Select all

10>   Creating library C:/Users/aio/Miniconda3/envs/freecad/Library/src/Mod/Import/App/Release/Import.lib and object C:/Users/aio/Miniconda3/envs/freecad/Library/src/Mod/Import/App/Release/Import.exp
10>ImportOCAF.obj : error LNK2019: unresolved external symbol "public: static void __cdecl tbb::interface5::internal::task_base::destroy(class tbb::task &)" (?destroy@task_base@internal@interface5@tbb@@SAXAEAVtask@4@@Z) referenced in function "public: __cdecl tbb::internal::task_group_base::~task_group_base(void)" (??1task_group_base@internal@tbb@@QEAA@XZ)
10>ImportOCAF.obj : error LNK2019: unresolved external symbol "public: class tbb::task & __cdecl tbb::internal::allocate_root_with_context_proxy::allocate(unsigned __int64)const " (?allocate@allocate_root_with_context_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z) referenced in function "private: void __cdecl Import::ImportOCAF::createShape(class TDF_Label const &,class TopLoc_Location const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class App::DocumentObject *,class std::allocator<class App::DocumentObject *> > &,bool)" (?createShape@ImportOCAF@Import@@AEAAXAEBVTDF_Label@@AEBVTopLoc_Location@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV?$vector@PEAVDocumentObject@App@@V?$allocator@PEAVDocumentObject@App@@@std@@@6@_N@Z)
10>ImportOCAF.obj : error LNK2001: unresolved external symbol "public: void __cdecl tbb::internal::allocate_root_with_context_proxy::free(class tbb::task &)const " (?free@allocate_root_with_context_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z)
10>ImportOCAF.obj : error LNK2019: unresolved external symbol "public: __cdecl tbb::task_group_context::~task_group_context(void)" (??1task_group_context@tbb@@QEAA@XZ) referenced in function "public: __cdecl tbb::internal::task_group_base::~task_group_base(void)" (??1task_group_base@internal@tbb@@QEAA@XZ)
10>ImportOCAF.obj : error LNK2019: unresolved external symbol "public: bool __cdecl tbb::task_group_context::cancel_group_execution(void)" (?cancel_group_execution@task_group_context@tbb@@QEAA_NXZ) referenced in function "public: __cdecl tbb::internal::task_group_base::~task_group_base(void)" (??1task_group_base@internal@tbb@@QEAA@XZ)
10>ImportOCAF.obj : error LNK2019: unresolved external symbol "public: bool __cdecl tbb::task_group_context::is_group_execution_cancelled(void)const " (?is_group_execution_cancelled@task_group_context@tbb@@QEBA_NXZ) referenced in function "public: __cdecl tbb::internal::task_group_base::~task_group_base(void)" (??1task_group_base@internal@tbb@@QEAA@XZ)
10>ImportOCAF.obj : error LNK2019: unresolved external symbol "protected: void __cdecl tbb::task_group_context::init(void)" (?init@task_group_context@tbb@@IEAAXXZ) referenced in function "private: void __cdecl Import::ImportOCAF::createShape(class TDF_Label const &,class TopLoc_Location const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class App::DocumentObject *,class std::allocator<class App::DocumentObject *> > &,bool)" (?createShape@ImportOCAF@Import@@AEAAXAEBVTDF_Label@@AEBVTopLoc_Location@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV?$vector@PEAVDocumentObject@App@@V?$allocator@PEAVDocumentObject@App@@@std@@@6@_N@Z)
10>ImportOCAF.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl tbb::task::note_affinity(unsigned short)" (?note_affinity@task@tbb@@UEAAXG@Z)
10>ImportOCAF.obj : error LNK2019: unresolved external symbol "void __cdecl tbb::internal::throw_exception_v4(enum tbb::internal::exception_id)" (?throw_exception_v4@internal@tbb@@YAXW4exception_id@12@@Z) referenced in function "public: __cdecl tbb::internal::task_group_base::~task_group_base(void)" (??1task_group_base@internal@tbb@@QEAA@XZ)
10>C:\Users\aio\Miniconda3\envs\freecad\Library\Mod\Import\Import.pyd : fatal error LNK1120: 9 unresolved externals
10>Done building project "Import.vcxproj" -- FAILED.
tbb and tbb-devel is installed :roll:

Code: Select all

(base) C:\Users\aio\Miniconda3>activate freecad

(freecad) C:\Users\aio\Miniconda3>conda list
# packages in environment at C:\Users\aio\Miniconda3\envs\freecad:
#
# Name                    Version                   Build  Channel
boost-cpp                 1.72.0               h0caebb8_0    conda-forge
bzip2                     1.0.8                hfa6e2cd_2    conda-forge
ca-certificates           2019.11.28           hecc5488_0    conda-forge
certifi                   2019.11.28               py38_0    conda-forge
coin3d                    4.0.0             h93788fa_1008    conda-forge
curl                      7.68.0               h4496350_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
eigen                     3.3.7             he980bc4_1001    conda-forge
expat                     2.2.9                he025d50_2    conda-forge
flann                     1.9.1             h69e8c9e_1006    conda-forge
fontconfig                2.13.1            hb964e45_1001    conda-forge
freecad                   0.19.pre        py38hab69001_105    freecad/label/dev
freetype                  2.10.0               h563cfd7_1    conda-forge
future                    0.18.2                   py38_0    conda-forge
gitdb                     4.0.2                      py_0    conda-forge
gitpython                 3.1.0                      py_0    conda-forge
hdf4                      4.2.13            hf8e6fe8_1003    conda-forge
hdf5                      1.10.5          nompi_ha405e13_1104    conda-forge
icu                       64.2                 he025d50_1    conda-forge
intel-openmp              2020.0                      166
jpeg                      9c                hfa6e2cd_1001    conda-forge
jsoncpp                   1.8.4             h1ad3211_1002    conda-forge
kiwisolver                1.1.0            py38he980bc4_0    conda-forge
krb5                      1.16.4               hdd46e55_0    conda-forge
libblas                   3.8.0                    15_mkl    conda-forge
libcblas                  3.8.0                    15_mkl    conda-forge
libclang                  9.0.1           default_hf44288c_0    conda-forge
libcurl                   7.68.0               h4496350_0    conda-forge
libiconv                  1.15              hfa6e2cd_1005    conda-forge
liblapack                 3.8.0                    15_mkl    conda-forge
libnetcdf                 4.7.3           nompi_hc957ea6_101    conda-forge
libpng                    1.6.37               h7602738_0    conda-forge
libssh2                   1.8.2                h642c060_2    conda-forge
libtiff                   4.1.0                h21b02b4_3    conda-forge
libxml2                   2.9.10               h9ce36c8_0    conda-forge
libxslt                   1.1.33               heafd4d3_0    conda-forge
lz4-c                     1.8.3             he025d50_1001    conda-forge
matplotlib-base           3.1.3            py38h2981e6d_0    conda-forge
mkl                       2020.0                      166
netgen                    6.2.1808        py38hb990d29_1007    conda-forge
numpy                     1.18.1           py38hc71023c_0    conda-forge
occt                      7.4.0                h823b557_2    conda-forge
openssl                   1.1.1d               hfa6e2cd_0    conda-forge
pcl                       1.9.1             h674dfd5_1005    conda-forge
pip                       20.0.2                     py_2    conda-forge
pivy                      0.6.5            py38h5c3084f_0    conda-forge
ply                       3.11                       py_1    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pybind11                  2.4.3            py38he980bc4_1    conda-forge
pyparsing                 2.4.6                      py_0    conda-forge
pyside2                   5.13.2           py38hfa7ce6d_2    conda-forge
python                    3.8.2           h5fd99cc_1_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
pyyaml                    5.3              py38hfa6e2cd_0    conda-forge
qhull                     2015.2            he980bc4_1000    conda-forge
qt                        5.12.5               h7ef1ec2_0    conda-forge
setuptools                45.2.0                   py38_0    conda-forge
six                       1.14.0                   py38_0    conda-forge
smesh                     8.3.0.3          py38h662e0ea_8    conda-forge
smmap                     3.0.1                      py_0    conda-forge
soqt                      1.6.0                h5c3084f_0    conda-forge
sqlite                    3.30.1               hfa6e2cd_0    conda-forge
swig                      4.0.1                         0    conda-forge
tbb                       2019.9               he980bc4_1    conda-forge
tbb-devel                 2019.9               he980bc4_1    conda-forge
tk                        8.6.10               hfa6e2cd_0    conda-forge
tornado                   6.0.3            py38hfa6e2cd_4    conda-forge
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.16.27012          hf0eaf9b_1
vtk                       8.2.0           py38h4a1a8eb_208    conda-forge
wheel                     0.34.2                     py_1    conda-forge
wincertstore              0.2                   py38_1003    conda-forge
xerces-c                  3.2.2             h6538335_1004    conda-forge
xz                        5.2.4             h2fa13f4_1001    conda-forge
yaml                      0.2.2                hfa6e2cd_1    conda-forge
zlib                      1.2.11            h2fa13f4_1006    conda-forge
zstd                      1.4.4                hd8a0e53_1    conda-forge
User avatar
looo
Posts: 3431
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda build 0.19.19784 with linker errors

Postby looo » Mon Mar 02, 2020 3:58 pm

Thanks for reporting.

I added some changes to the occt-feedstock recently:
https://github.com/conda-forge/occt-fee ... 0ce8e95f98

In theory, this allows removing the tbb-dependency of the freecad-build. But actually we would have to do the same for the vtk-package. So the tbb-devel-package still must be installed.

Anyway, I do not experience any difficulties with the azure builds, but I haven't tried the resulting package yet.
UR_
Posts: 1189
Joined: Tue Jan 03, 2017 8:42 pm

Re: conda build 0.19.19784 with linker errors

Postby UR_ » Mon Mar 02, 2020 4:09 pm

looo wrote:
Mon Mar 02, 2020 3:58 pm
So the tbb-devel-package still must be installed.
tbb-devel is installed:

Code: Select all

tbb-devel                 2019.9               he980bc4_1    conda-forge
User avatar
looo
Posts: 3431
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda build 0.19.19784 with linker errors

Postby looo » Mon Mar 02, 2020 4:57 pm

have you tried rerunning cmake?

I have no problems with the latest package available from freecad/label/dev:

Code: Select all

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19758 (Git)
Build type: Release
Branch: master
Hash: c165edd52c7f06ac09f992e5b5bf1d37661a8c0f
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Austria (de_AT)

 occt               conda-forge/win-64::occt-7.4.0-h823b557_2
 boost-cpp          conda-forge/win-64::boost-cpp-1.72.0-h0caebb8_0
 freecad            freecad/label/dev/win-64::freecad-0.19.pre-py38hab69001_105