ana(conda) windows packaging

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
sgrogan
Posts: 5547
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Wed Mar 22, 2017 6:27 pm

looo wrote:So we have to create a new UseLibPackXX.cmake file to build with conda? or can we use an old one?
Don't know, if the conda directory structure is the same as the libpack then we may be ok. If not we probably don't build with a libpack, but then we would probably need to set a lot of paths manually.
Anyway the error is because a libpack could be found, so we need to set the path

Code: Select all

-DFREECAD_LIBPACK_DIR=$PREFIX
If it doesn't work, then we can try without a libpack

Code: Select all

-DFREECAD_LIBPACK_USE=FALSE
User avatar
looo
Posts: 3031
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Mar 22, 2017 8:20 pm

thanks, -DFREECAD_LIBPACK_USE=FALSE worked. Now I am stuck with vtk.

Code: Select all

CMake Error at CMakeLists.txt:631 (find_package):
  Could not find a configuration file for package "VTK" that is compatible
  with requested version "".

  The following configuration files were considered but not accepted:

    C:/Users/fc_builder/Miniconda3/conda-bld/freecad_1490210124892/_b_env/Library/lib/cmake/vtk-7.1/
VTKConfig.cmake, version: 7.1.0 (64bit)
strange. I thought 7.1 is quite new.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
peterl94
Posts: 999
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Postby peterl94 » Wed Mar 22, 2017 8:35 pm

Hey guys, sorry for my absence. I haven't read through this thread, but to me that vtk message seems like the version number it is checking is an empty string so it can't find any files that match. Is the requested version specified with a variable?
User avatar
looo
Posts: 3031
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Mar 22, 2017 9:14 pm

ah I missed the line above:

Code: Select all

-- VTK components: not found or used
So the propbem is with this: https://github.com/FreeCAD/FreeCAD/blob ... t#L638L639 . there is no requested version I think.
the libraries are all suffixed with -7.1.

ps.: Thanks for the help and welcome back. :D
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
peterl94
Posts: 999
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Postby peterl94 » Wed Mar 22, 2017 9:30 pm

The check for the components is wrapped in "if(UNIX)". Maybe try changing it to "if(UNIX or windows and not use libpack)"?
User avatar
looo
Posts: 3031
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Mar 22, 2017 9:59 pm

same problem some lines above.

Code: Select all

CMake Error at CMakeLists.txt:615 (find_package):
  Could not find a configuration file for package "VTK" that is compatible
  with requested version "".
If anyone wants to make further experiments: current state of the recipe can be found here:
https://github.com/looooo/FreeCAD_Conda ... ng/FreeCAD

good night :D
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
sgrogan
Posts: 5547
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Wed Mar 22, 2017 10:25 pm

peterl94 wrote:The check for the components is wrapped in "if(UNIX)". Maybe try changing it to "if(UNIX or windows and not use libpack)"?
Is it?
I don't have this problem with VTK7.0, but I'm using CLbundler libpack with the VTK inserted into the libpack. I haven't found where an empty string should be passed.
peterl94
Posts: 999
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Postby peterl94 » Wed Mar 22, 2017 11:38 pm

I was talking about the if statement right above the code that looo highlighted: https://github.com/FreeCAD/FreeCAD/blob ... t#L622L631

I looked at the documentation for find_package and it says that when a version is passed to find_package, cmake defines PACKAGE_FIND_VERSION which is used in the config cmake files. Since we are not specifying a version, PACKAGE_FIND_VERSION would not be defined and so that is why no version is displayed in the error message. That is what it seems like anyway. I don't know how it works elsewhere, but I wonder if specifying a version would fix the problem.
peterl94
Posts: 999
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Postby peterl94 » Thu Mar 23, 2017 2:32 am

No, the version is not the issue. I discovered that the actual problem is that CMAKE_SIZEOF_VOID_P is set to 4 (on my system anyway) somehow even though we are clearly building 64bit (which means it is supposed to be 8). There is a check for this in the vtk (and hdf5) version config files to make sure the installed lib is the same architecture as the calling project. I have no idea how CMAKE_SIZEOF_VOID_P is not set to 8.
User avatar
looo
Posts: 3031
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Thu Mar 23, 2017 4:43 am

Seems there is something wrong on windows? Setting CMAKE_SIZEOF_VOID_P = "" worked for me. After adding the lib-dir and include-dir to coin search path, now pyside makes big problems. In there config they use unix like filepaths with "/" and not "\". Seems we have to write a patch for https://github.com/conda-forge/pyside-feedstock
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/