Closed looooo closed 6 years ago
I guess this is the relevant commit: https://github.com/solvespace/solvespace/commit/e127b28a2dcd4c7511eed7e881aa5c495cd392b1#diff-af3b638bc2a3e6c650974192a53c7291
I see, thanks. My problem are the gui dependencies which cmake tries to find. The origin project disable the find_package(xy)
when BUILD_GUI
is disabled.
The commit you mentioned is not in my branch, because I am not basing on upstream master. If you are on windows, I think checking out out all the submodules should be enough to satisfy all the dependency. That's what I did.
I am trying to create a conda-package for linux and windows. There are builds for most of the dependencies available but not for some gui-stuff. Thats why I am asking to add this option.
I guess adding this option is not too much work, and I can try to do that, but I need to know if it makes sense. Are the gui-dependencies relevant for freecad? What dependencies are relevant for freecad?
I see. And no, none of the gui stuff is needed.
what about libdxfrw?
Not used either. The python extension _slvs only uses a small part of the whole solvespace project, just the solver part, namly libslvs, which I changed to a static library, libslvs_static. The compiled _slvs.so, or _slvs.pyd has no external dependency.
With some patching it seems like cmake accepts my setup now.
But now I am stuck with a more difficult error. Maybe you have an idea whats wrong here:
In file included from /opt/conda/conda-bld/solvespace_1530429004042/work/src/solvespace.h:291:0,
from /opt/conda/conda-bld/solvespace_1530429004042/work/src/lib.cpp:7:
/opt/conda/conda-bld/solvespace_1530429004042/work/src/dsc.h:264:10: error: initializing argument 1 of ‘void SolveSpace::IdList<T, H>::Add(T*) [with T = SolveSpace::Constraint; H = SolveSpace::hConstraint]’ [-fpermissive]
void Add(T *t) {
^
/opt/conda/conda-bld/solvespace_1530429004042/work/src/lib.cpp:249:16: warning: missing initializer for member ‘SolveSpace::Group::tag’ [-Wmissing-field-initializers]
Group g = {};
I am using gcc4.8.2 from centos.
Which target are you compiling? The python extension target _slvs depends on my newly added target named slvs_static. It is similar to their original library target, slvs. When building SolveSpace as a library, you need to define a macro LIBRARY. See here. The error suggests you are missing this macro.
I am building the _slvs target. see this recipe: https://github.com/FreeCAD/FreeCAD_Conda/blob/master/solvespace/build.sh
Looking at the cmake, there seems to be a static library (static_slvs) and a shared library (slvs). And the python library also depends on slvs (the shared library). I am using now the master branch of this repo. Which branch should I use?
If you are cloning my fork, you can use the python
branch. But it seems you've already using this branch according to your meta.yaml file. I guess the install
target in your build.sh is causing the problem. Are there any wiki I can read about freecad conda setup? Maybe I'll give it a try.
https://github.com/FreeCAD/FreeCAD_Conda#how-to-install-freecad-with-conda but the docs are not in very good shape. Things are changing too fast. To install freecad with conda only the conda-forge channel is needed. (So do not add freecad-channel and cad-channel) I can also provide linux and windows builds for your FreeCAD-fork.
without the install target the recipe works, but nothing gets installed. to build the package everything should be installed to the host-env. Maybe we can simple copy the output of the build.
I was able to create the package with copying the _slvs.so file directly [1]. (not the best solution but at least it seems to work) I also removed the runtime-deps, so the build only depends on python. It seems to be importable in python and FreeCAD.
But the assembly3 modul still doesn't work with the python3 build of the freecad-link-fork.
also there is a build from your FreeCAD-fork available now. I couldn't upload to anaconda.org because my internet is too slow. But I was able to upload to github. The package is now available from https://github.com/FreeCAD/FreeCAD_Conda/releases (freecad_assembly). I guess you can install it by creating a freecad environment and uninstall freecad with (-f) option and install freecad_assembly by using the path to the package. (Not the best way. I will try improve this.)
So now we only have to get assembly3-wb python3 compatible (https://github.com/realthunder/FreeCAD_assembly3/issues/14)
I keep this Issue open because I think it's a good idea to have the no-gui option available. But this will be solved anyway once you rebase on the tip of the current project. (No idea if this will happen, or if the symp/scipy-solver is the more important goal.
I have successfully install freecad-conda on Linux with asm3, using your suggested method.
In case anyone want to try this now, here is what I did.
cd ~/freecad/lib
ln -s libCoin.so.4 libCoin.so.4.0.0
conda install xerces-c=3.2.1 boost-cpp=1.66.0 pyside2=5.6.0 solvespace
cd ~/freecad/Ext
git clone https://github.com/realthunder/FreeCAD_assembly3.git asm3
~/freecad/bin/FreeCAD
nice, but I think you have done it the hard way. I guess using some conda-commands will help with setting up the environment. The freecad-0.17 install was a test to check if it is easier to get freecad installed this way. But I still prefer installing miniconda and then creating a seperate freecad-environment... Once I upload the freecad_assembly-package things will get a bit more simple.
Also note that the libraries coming with freecad-0.17-conda-installer-Linux-x86_64.sh are outdated. I guess the linking you have done is not necessary with the newer packages.
@looooo I've made some change to SolveSpace code. Please update the conda package. Thanks!
Yes I will do. Can you:
Done at here
The origin project has an option to disable the gui [1]. Would it be possible to add such a feature to your fork. I guess most of the dificult dependecies are mainly for the gui. As the gui is not used for FreeCAD, it would be nice to build without it.
[1] https://github.com/solvespace/solvespace/blob/master/CMakeLists.txt#L37