conda build win 10 stopped working since Link merge

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda build win 10 stopped working since Link merge

Post by looo »

UR_ wrote: Tue Sep 03, 2019 5:07 pm
looo wrote: Tue Sep 03, 2019 2:45 pm qt5.12 environment for freecad shouldn't be a problem. Do you have any additional deps?
No additional deps - env used only for build

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                     8.0.1                he980bc4_0    conda-forge
clang-tools               8.0.1                he980bc4_0    conda-forge
clangdev                  8.0.1                         0    conda-forge
clangxx                   8.0.1                         0    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.2                      py_0    conda-forge
hdf4                      4.2.13            hf8e6fe8_1002    conda-forge
hdf5                      1.10.5          nompi_ha405e13_1103    conda-forge
icu                       64.2                 he025d50_1    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
libclang                  8.0.1                he980bc4_0    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                h21ff451_0    conda-forge
libnetcdf                 4.6.2             h376842a_1003    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_5    conda-forge
libxslt                   1.1.33               heafd4d3_0    conda-forge
llvm-tools                8.0.1                h1ad3211_0    conda-forge
llvmdev                   8.0.1                h1ad3211_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.1           py37hc71023c_0    conda-forge
occt                      7.3.0             hd7db75f_1004    conda-forge
openssl                   1.1.1c               hfa6e2cd_0    conda-forge
pip                       19.2.3                   py37_0    conda-forge
pivy                      0.6.5a2          py37h729ed8e_2    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pybind11                  2.3.0            py37he980bc4_2    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.2.0                   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_1    conda-forge
swig                      4.0.1                         0    conda-forge
tbb                       2019.8               he980bc4_0    conda-forge
tbb-devel                 2019.8               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.6                   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


but unfortunately troubles while upgrading qt

Code: Select all

(freecad-dev) C:\Users\aio>conda install qt=5.12.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

CondaError: KeyboardInterrupt

Terminate batch job (Y/N)? y
:shock:
I haven't uploaded a freecad qt5.12 win package yet, sry.

edit.: Now a win-qt5.12-freecad package is uploaded. Maybe you can give it another try.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda build win 10 stopped working since Link merge

Post by looo »

As there were time limitations with appveyor I tried to switch to azure, which allows 6 hours of build-time. Hopefully this allows to continue the weekly builds for some time. Time to do some more enjoyable things :D like trying to solve the pyside/shiboken configuration problem.

https://dev.azure.com/sppedflyer/feedst ... ?buildId=2
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: conda build win 10 stopped working since Link merge

Post by UR_ »

looo wrote: Fri Sep 06, 2019 8:55 am ... trying to solve the pyside/shiboken configuration problem.

Unfortunately latest build 0.19.pre py37ha28476b_41 suffers from this.

On lasted build (0.19.18110) bungled this by:

https://forum.freecadweb.org/viewtopic. ... 93#p332420

Perhaps a temporary fix until brain wrapping is completed :roll:
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda build win 10 stopped working since Link merge

Post by looo »

Thanks @
UR_ wrote: Sat Sep 07, 2019 6:34 am Perhaps a temporary fix until brain wrapping is completed
So all we need are 4 variables. I guess as a start we should make it possible to pass them via the cmake arguments, afterwards we can try to use some cmake magic to find them automatically.

But yes I will use a simple patch for the next builds. (Seems like the simplest fix :) )
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda build win 10 stopped working since Link merge

Post by looo »

Here is a little python script for pyside2 detection. I tested on conda-linux-py37-qt5.12 and conda-win-py37-qt5.12. Maybe others can test it in other envs too.

Code: Select all

import sysconfig
import glob
import os
import sys

info = sysconfig.get_paths()
library_path = os.path.dirname(info["stdlib"])
include_path = os.path.dirname(info["include"])

DEBUGGING = True
PYTHON_VERSION = str(sys.version_info.major) + str(sys.version_info.minor)

LIB_SUFFIX = ".so"
if sys.platform.startswith("win"):
    LIB_SUFFIX = "lib"
elif sys.platform == "darwin":
    LIB_SUFFIX = "dylib"

def debug_print(text):
    if DEBUGGING:
        print(text)

def find_path(directory, test, target_name, find_dir=True):
    """
    returns all paths in directory where test returns True
    test: function with args directory_path (root) and file name (fn)
    """
    found_files = []
    for root, dirs, files in os.walk(directory):
        for fn in files:
            if test(root, fn):
                if find_dir:
                    found_files.append(root)
                else:
                    found_files.append(os.path.join(root, fn))
    if len(found_files) == 0:
        result = None
        debug_print("{} not found in {}".format(target_name, directory))
    elif len(found_files) > 0:
        if len(found_files) > 1:
            found_files.sort()
            debug_print("{} paths possible for searchpath {}: {}".format(len(found_files), target_name, found_files))
            debug_print("choosing first")
        result = found_files[0]
        debug_print("{} found in\n{}".format(target_name, result))
    return result

def pyside2_lib_test(root, fn):
    return "pyside2" in fn and PYTHON_VERSION in fn and "packages" not in root and fn.endswith(LIB_SUFFIX)

def pyside2_include_test(root, fn):
    return "PySide2" in root and fn == "pyside.h"

def shiboken2_lib_test(root, fn):
    return "shiboken2" in fn and PYTHON_VERSION in fn and "packages" not in root and fn.endswith(LIB_SUFFIX)

def shiboken2_include_test(root, fn):
    return "shiboken2" in root and fn == "shiboken.h"

def find_pyside2_library():
    return find_path(library_path, pyside2_lib_test, "pyside2 library", find_dir=False)

def find_pyside2_includes():
    return find_path(include_path, pyside2_include_test, "pyside2 includes")

def find_shiboken2_library():
    return find_path(library_path, shiboken2_lib_test, "shiboken2 library", find_dir=False)

def find_shiboken2_includes():
    return find_path(include_path, shiboken2_include_test, "shiboken2 includes")
    
find_pyside2_library()
print()
find_pyside2_includes()
print()
find_shiboken2_library()
print()
find_shiboken2_includes()
print()

(I could not find the right topic, so I am posting this here for now)
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: conda build win 10 stopped working since Link merge

Post by UR_ »

win 10, conda, qt5.6.2, python 3.6.6
(without cmake pyside2/shiboken2 issue)
pyside2 library found in
C:\Users\aio\Miniconda3\envs\freecad\Library\lib\pyside2.cp36-win_amd64.lib

pyside2 includes found in
C:\Users\aio\Miniconda3\envs\freecad\Library\include\PySide2

shiboken2 library found in
C:\Users\aio\Miniconda3\envs\freecad\Library\lib\shiboken2.cp36-win_amd64.lib

shiboken2 includes found in
C:\Users\aio\Miniconda3\envs\freecad\Library\include\shiboken2


win 10, conda, qt5.12.1, python 3.7.3
(with cmake pyside2/shiboken2 issue)
pyside2 library found in
C:\Users\aio\Miniconda3\envs\freecad-dev\Library\lib\pyside2.cp37-win_amd64.lib

pyside2 includes found in
C:\Users\aio\Miniconda3\envs\freecad-dev\Library\include\PySide2

shiboken2 library found in
C:\Users\aio\Miniconda3\envs\freecad-dev\Library\lib\shiboken2.cp37-win_amd64.lib

shiboken2 includes found in
C:\Users\aio\Miniconda3\envs\freecad-dev\Library\include\shiboken2
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda build win 10 stopped working since Link merge

Post by looo »

Thanks for testing. Looks promising (at least for conda-environments). Now we need to pass the variables to cmake. let's see what the ci's say:
https://dev.azure.com/sppedflyer/feedst ... ?buildId=4
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda build win 10 stopped working since Link merge

Post by looo »

Should work now. Tested with conda environments and also with ubuntu qt5.11 py3.7
https://github.com/FreeCAD/FreeCAD/pull/2510
https://dev.azure.com/sppedflyer/feedst ... ?buildId=9
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: conda build win 10 stopped working since Link merge

Post by sgrogan »

UR_ wrote: Sun Sep 08, 2019 9:08 am win 10, conda, qt5.12.1, python 3.7.3
(with cmake pyside2/shiboken2 issue)
What is the latest to get this version?
I needs some conda powered build ;)
"fight the good fight"
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: conda build win 10 stopped working since Link merge

Post by UR_ »

sgrogan wrote: Fri Sep 13, 2019 10:13 pm What is the latest to get this version?
I needs some conda powered build
my workflow AFAICR:
- crate a new env in conda
- save .condarc into new env's root

.condarc

Code: Select all

channels:
  - freecad/label/dev
  - conda-forge
  - defaults
- install additional packages

Code: Select all

conda install freecad

That's it :nerd_face:
conda install eigen
conda install swig
conda install pybind11
conda install tbb-devel
conda install gitpython
conda install matplotlib-base
- patch CMakeLists.txt from freecad's source root by adding on top

Code: Select all

set(PYSIDE_INCLUDE_DIR "C:/Users/aio/Miniconda3/envs/freecad-dev/Library/include/PySide2")
set(SHIBOKEN_INCLUDE_DIR "C:/Users/aio/Miniconda3/envs/freecad-dev/Library/include/shiboken2")
set(PYSIDE_LIBRARY "C:/Users/aio/Miniconda3/envs/freecad-dev/Library/lib/pyside2.cp37-win_amd64.lib")
set(SHIBOKEN_LIBRARY "C:/Users/aio/Miniconda3/envs/freecad-dev/Library/lib/shiboken2.cp37-win_amd64.lib")
(please check pathes according your install)

- ensure PCH is deactivated inside CMake gui
FREECAD_USE_PCH:BOOL=OFF

That's it. :nerd_face:
Post Reply