ana(conda) windows packaging

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Post by DeepSOIC »

this appears to have worked, thanks peter!

Code: Select all

conda config --add channels conda-canary
conda update conda
Now to figure out how do I run FreeCAD...
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Post by DeepSOIC »

The instruction says to activate the environment using source activate <env-name>
Doesn't work.

Code: Select all

(T:\Py\Miniconda3) T:\Py\Miniconda3>source activate fc_test
"source" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом. 
(translate: "source" is not a command or an executable)
Sorry for being a conda noob, but I have no clue how to use it.
I also tried launching freecad.exe from explorer, it fired a few messageboxes telling python35.dll is missing.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Post by DeepSOIC »

RTFM'ed, I need to use activate fc_test on windows.

haha, running!

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10699 (Git)
Build type: Release
Branch: py3-25
Hash: b62c69aa62fa0714fc3f5b462817aaf0c8fe1cd0
Python version: 3.5.3
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Post by DeepSOIC »

Same problem with sketch. Can't create a sketch.

The only add-on workbench that made it to the list was Lattice2, which fails to activate. I'll try solving that ;)
Looking forward to fixes around sketcher. Reading the internet, I found that /GR- flag should be added to compiler for dynamic_casts to work.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Post by DeepSOIC »

Curious to know... can I use the installation as a "libpack" to compile FreeCAD?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Post by DeepSOIC »

Lattice2 fails to load resource py file. I don't know how to fix it, it looks like pyside-rcc isn't in conda installation. PySide's QtCore.qRegisterResourceData says it wants (int,unicode,unicode,unicode) but got (int,str,str,str). And AFAIK, unicode is no longer there in Py3, so everything is screwed?
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Post by peterl94 »

DeepSOIC wrote:can I use the installation as a "libpack" to compile FreeCAD?
Yes, if you want to do things manually. This is what needs to be done (not tested):

Code: Select all

set PREFIX=C:\path\to\Miniconda3\envs\your_env_name
set LIBRARY_PREFIX=%PREFIX%\Library
set PATH=%PREFIX%;%LIBRARY_PREFIX%;%PATH%

mkdir build
cd build

cmake .. -G "Visual Studio 14 2015 Win64" ^
      -DCMAKE_BUILD_TYPE=Release ^
      -DFREECAD_LIBPACK_USE=FALSE ^
      -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
      -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
      -DCMAKE_INCLUDE_PATH=%LIBRARY_PREFIX%/include ^
      -DCMAKE_LIBRARY_PATH=%LIBRARY_PREFIX%/lib ^
      -DNETGENDATA=%LIBRARY_PREFIX%/include ^
      -DNETGEN_INCLUDEDIR=%LIBRARY_PREFIX%/include/netgen ^
      -DNGLIB_INCLUDE_DIR=%LIBRARY_PREFIX%/include/nglib ^
      -DOCC_INCLUDE_DIR=%LIBRARY_PREFIX%/include/opencascade ^
      -DOCC_LIBRARY_DIR=%LIBRARY_PREFIX%/lib ^
      -DOCC_LIBRARIES=%LIBRARY_PREFIX%/lib CACHE ^
      -DFREECAD_USE_OCC_VARIANT="Official Version" ^
      -DOCC_OCAF_LIBRARIES=%LIBRARY_PREFIX%/lib ^
      -DSWIG_DIR=%LIBRARY_PREFIX%/share/swig/3.0.8 ^
      -DSWIG_EXECUTABLE=%LIBRARY_PREFIX%/bin/swig ^
      -DPYTHON_EXECUTABLE=%PYTHON% ^
      -DBUILD_REVERSEENGINEERING=NO
Note that only release (and maybe RelWithDebInfo) works at the moment.

Edit: and you have to use this branch: https://github.com/looooo/FreeCAD/tree/py3-25
Last edited by peterl94 on Tue Mar 28, 2017 12:22 am, edited 1 time in total.
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: ana(conda) windows packaging

Post by peterl94 »

DeepSOIC wrote:Reading the internet, I found that /GR- flag should be added to compiler for dynamic_casts to work
I saw that too, but I checked the compiler flags and /GR is present. I wonder if it is a problem with a 3rd party library.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: ana(conda) windows packaging

Post by DeepSOIC »

Could you try replacing all dynamic_cast with static_cast within sketcher? I've just tested that it works with static_casts. So if it fixes the RTTI error, it is freecad compile problem, otherwise it's a dependency...
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Post by sgrogan »

peterl94 wrote: DeepSOIC wrote:
can I use the installation as a "libpack" to compile FreeCAD?
Yes, if you want to do things manually. This is what needs to be done (not tested):
@DeepSOIC, you need VC14
"fight the good fight"
Post Reply