compile FreeCAD 0.17 with occt 7.1.0 and netgen, script for Xenial and Jessie
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
If you guys don't know already (doubtful since I'm trumpeting it every chance I get ), I'm a GUI guy. Yes, I did take care of the Launchpad PPA for 4 years and doing so, I had to use the terminal. But I don't like it, and I'll never be comfortable with it.
When using such scripts that play in the system, I never know if I should run them with sudo or not. When running with sudo, all folders and files created in my home folder are owned by root and I can't delete them from the GUI using the Nautilus file manager and I hate that.
Out of curiosity I ran it without sudo permissions with bash, since that's apparently what Jee-Bee did.
I don't understand how it could create a FreeCAD0.17 folder in /opt/local/ without expressly asking for my password! Shouldn't this path require root access?!?
And at the same time, it failed to install system libraries such as libhdf5-dev.
And when ready to do sudo make install, it finally asked for my password!
So in the end, the compilation failed and I have a big mess with which I don't know what to do, as I'd prefer not to start from scratch.
Anyway.
When using such scripts that play in the system, I never know if I should run them with sudo or not. When running with sudo, all folders and files created in my home folder are owned by root and I can't delete them from the GUI using the Nautilus file manager and I hate that.
Out of curiosity I ran it without sudo permissions with bash, since that's apparently what Jee-Bee did.
I don't understand how it could create a FreeCAD0.17 folder in /opt/local/ without expressly asking for my password! Shouldn't this path require root access?!?
And at the same time, it failed to install system libraries such as libhdf5-dev.
And when ready to do sudo make install, it finally asked for my password!
So in the end, the compilation failed and I have a big mess with which I don't know what to do, as I'd prefer not to start from scratch.
Anyway.
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
I took the most recent discussions from the Porting to Python 3 discussion and modified Bernd's installation script to compile the current work in the Python 3 port. The script is here:
https://gist.github.com/kkremitzki/324f ... cad_all-sh
I tested it on a fresh Ubuntu 16.04 desktop VM. Let me know how it works!
https://gist.github.com/kkremitzki/324f ... cad_all-sh
I tested it on a fresh Ubuntu 16.04 desktop VM. Let me know how it works!
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
That's quite odd! One thing that might have happened is this: if you recently did sudo something, Ubuntu by default won't ask again for 15 minutes. The script should be ran as your user, and it has several uses of sudo throughout, where necessary. Perhaps the first few actions were within 15 minutes of the last sudo and the later ones were after?NormandC wrote:If you guys don't know already (doubtful since I'm trumpeting it every chance I get ), I'm a GUI guy. Yes, I did take care of the Launchpad PPA for 4 years and doing so, I had to use the terminal. But I don't like it, and I'll never be comfortable with it.
When using such scripts that play in the system, I never know if I should run them with sudo or not. When running with sudo, all folders and files created in my home folder are owned by root and I can't delete them from the GUI using the Nautilus file manager and I hate that.
Out of curiosity I ran it without sudo permissions with bash, since that's apparently what Jee-Bee did.
I don't understand how it could create a FreeCAD0.17 folder in /opt/local/ without expressly asking for my password! Shouldn't this path require root access?!?
And at the same time, it failed to install system libraries such as libhdf5-dev.
And when ready to do sudo make install, it finally asked for my password!
So in the end, the compilation failed and I have a big mess with which I don't know what to do, as I'd prefer not to start from scratch.
Anyway.
If you run ls -la /opt/local, you can verify whether your user can normally write that folder. Look for:
Code: Select all
drwxr-xr-x 3 root root 4.0K Jan 26 03:23 ./
The script should normally go to your home directory, go into the Documents folder, and create a build_FreeCAD folder which has all the downloaded source code. But, if you run it again, it automatically deletes the build folder and grabs everything again before reinstalling into /opt/local.
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
Possibly, but I just realized I had left Synaptic opened when I ran the script , which is probably the reason the installation of libhdf5-dev (which I don't have since I hadn't compiled for more than 9 months) failed, packages can't be installed from apt-get if a package manager is running.kkremitzki wrote:That's quite odd! One thing that might have happened is this: if you recently did sudo something, Ubuntu by default won't ask again for 15 minutes.
Yeah, I get the exact same permissions, so it must be that the terminal remembered the last sudo command I made.kkremitzki wrote:If you run ls -la /opt/local
That's exactly what I wish I could avoid. My build_FreeCAD folder takes up 2.1GB and downloading again OCCT, FreeCAD and the other stuff takes time, not to mention the whole compilation process...kkremitzki wrote:But, if you run it again, it automatically deletes the build folder and grabs everything again before reinstalling into /opt/local.
I think I'll try to compile FreeCAD manually assuming compilation of OCCT, VTK and Netgen succeeded (which it seemed).
Thanks for the info.
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
My adapted script for the Python 3 build includes checks to prevent re-downloading those libraries, I'm sure we can get something "upstreamed" with Bernd's script.
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
Sure there is a special reason for this. I have'nt had the time trying to compile ooct 7.1.NormandC wrote:OCC 7.1.0 was published November 25th 2016. Is there a reason why your script uses 7.0.0 rather than the latest release?
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
I made the script for my own. I use vagrant to test FreeCAD in a fresh installed Xenial or Jessie with fresh compiled FreeCAD. For setting up the environment I use this script. I fully understand your opinion.NormandC wrote:So in the end, the compilation failed and I have a big mess with which I don't know what to do, as I'd prefer not to start from scratch.
bernd
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
wow cool, since I haven't compiled FreeCAD with python3 so far I will give it a try for sure. I may udate my ones with your changes int the regard of re- downloading. But all this will take some days ...kkremitzki wrote:My adapted script for the Python 3 build includes checks to prevent re-downloading those libraries, I'm sure we can get something "upstreamed" with Bernd's script.
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
Would you translate the french in english?sodelo wrote:Code: Select all
[ 13%] Built target FreeCADApp [ 13%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/Application.cpp.o /home/dominique/Documents/build_FreeCAD/freecad/FreeCAD/src/Gui/Application.cpp:41:22: fatal error: QGLFormat: Aucun fichier ou dossier de ce type compilation terminated. src/Gui/CMakeFiles/FreeCADGui.dir/build.make:1135 : la recette pour la cible « src/Gui/CMakeFiles/FreeCADGui.dir/Application.cpp.o » a échouée make[2]: *** [src/Gui/CMakeFiles/FreeCADGui.dir/Application.cpp.o] Erreur 1 CMakeFiles/Makefile2:4903 : la recette pour la cible « src/Gui/CMakeFiles/FreeCADGui.dir/all » a échouée make[1]: *** [src/Gui/CMakeFiles/FreeCADGui.dir/all] Erreur 2 Makefile:127 : la recette pour la cible « all » a échouée make: *** [all] Erreur 2
Re: compile FreeCAD 0.17 with occt 7.0.0 and netgen, script for Xenial and Jessie
Code: Select all
/home/dominique/Documents/build_FreeCAD/freecad/FreeCAD/src/Gui/Application.cpp:41:22: fatal error: QGLFormat: Aucun fichier ou dossier de ce type
Code: Select all
src/Gui/CMakeFiles/FreeCADGui.dir/build.make:1135 : la recette pour la cible « src/Gui/CMakeFiles/FreeCADGui.dir/Application.cpp.o » a échouée
Code: Select all
Erreur 1
Code: Select all
CMakeFiles/Makefile2:4903 : la recette pour la cible « src/Gui/CMakeFiles/FreeCADGui.dir/all » a échouée
Code: Select all
Makefile:127 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
make: *** [all] Error 2