build.make:263: /solver_3d_ext1.cpp.o] Error 1

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: build.make:263: /solver_3d_ext1.cpp.o] Error 1

Post by jmaustpc »

Kunda1 wrote: Sat Oct 10, 2020 1:54 pm wmayer is patching master to be compatible with OCC 7.5 Beta
thanks for the link. :)

MasterCATZ wrote: Thu Oct 08, 2020 11:42 pm CMake Error at /SnapRaidArray/DATA/git/occt/occt-278da16/build/OpenCASCADEConfig.cmake:101 (include):
include could not find load file:
i have thought about this again, I think I might know what is going on, a guess anyway. this was following was correct a few years ago so I guess it still is. You have to first configure OCC, then compile it, which you seem to have done but you also must "install" the compiled occ before it will be useable "make install".

It looks above like you have compiled OCC in a directory and then tried to configure FreeCAD's Cmake to look at the build directory rather than the install directory.
sgrogan wrote: Thu Oct 08, 2020 11:55 pm jmaustpc, can you help here for linux/ubuntu? It should be the same as you taught me for oce,
I think that needing to install occ might have caught you as well back then, did it? I know it confused me when I first started compiling OCC.

Note that in the cmake config step you must set custom install paths so that you can have multiple OCC versions on your system without over writing each other. There is a cmake setting named something like "install prefix", from memory I just added a directory name that described the ooc version in that install prefix which otherwise keeps the default directories/structure under that name. But be aware that there were I think 3 directories to consider so make sure it effects them all.
sgrogan wrote: Thu Oct 08, 2020 11:55 pm Did you install OCC?
Actually I see now that you already alluded to this.
sgrogan wrote: Thu Oct 08, 2020 11:55 pm I'm win only at the moment.
Fool! Luke, If once you start down the dark path it will forever dominate your destiny! I bet you are now breath heavily through a non COVID mask! :lol:
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: build.make:263: /solver_3d_ext1.cpp.o] Error 1

Post by jmaustpc »

jmaustpc wrote: Sun Oct 11, 2020 3:31 am
Kunda1 wrote: Sat Oct 10, 2020 1:54 pm wmayer is patching master to be compatible with OCC 7.5 Beta
thanks for the link. :)

MasterCATZ wrote: Thu Oct 08, 2020 11:42 pm CMake Error at /SnapRaidArray/DATA/git/occt/occt-278da16/build/OpenCASCADEConfig.cmake:101 (include):
include could not find load file:
i have thought about this again, I think I might know what is going on, a guess anyway. this was following was correct a few years ago so I guess it still is. You have to first configure OCC, then compile it, which you seem to have done but you also must "install" the compiled occ before it will be useable "make install".

It looks above like you have compiled OCC in a directory and then tried to configure FreeCAD's Cmake to look at the build directory rather than the install directory.
sgrogan wrote: Thu Oct 08, 2020 11:55 pm jmaustpc, can you help here for linux/ubuntu? It should be the same as you taught me for oce,
I think that needing to install occ might have caught you as well back then, did it? I know it confused me when I first started compiling OCC.

Note that in the cmake config step you must set custom install paths so that you can have multiple OCC versions on your system without over writing each other. There is a cmake setting named something like "install prefix", from memory I just added a directory name that described the ooc version in that install prefix which otherwise keeps the default directories/structure under that name. But be aware that there were I think 3 directories to consider so make sure it effects them all.
sgrogan wrote: Thu Oct 08, 2020 11:55 pm Did you install OCC?
Actually I see now that you already alluded to this.
sgrogan wrote: Thu Oct 08, 2020 11:55 pm I'm win only at the moment.
Fool! Luke, If once you start down the dark path it will forever dominate your destiny! I bet you are now breathing heavily through a non COVID mask! :lol:
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: build.make:263: /solver_3d_ext1.cpp.o] Error 1

Post by jmaustpc »

I got this to compile on Kubuntu 18.04, i.e. both OCC master (7.5) and then FreeCAD master against that self compiled OCC 7.5.

I have had some bugs, not sure if it's to do with how I configured/compiled or if its just due to occ7.5. For example I get an error if I run the PartDesign WB shaft wizard.
MasterCATZ wrote: Thu Oct 08, 2020 11:42 pm
CMake Error at /SnapRaidArray/DATA/git/occt/occt-278da16/build/OpenCASCADEConfig.cmake:101 (include):
include could not find load file:
The trick to get Cmake to find the installed self compiled OCC was to tick the box in the option you can see 4 down from the top in your Cmake-gui screen shot, its called OCCT_CMAKE_FALLBACK, you will then get three new occt directory options, they will be pointing to the correct directories for the installed default OCCT so you have to change them to the correct sub directories under the custom "install directory" that you set when you compiled OCCT.

So in summary again, to compile Occ,
build out of tree (meaning not in the sourcecode directory),
run cmake gui,
make sure you set a new custom install directory (best to simple add a new directory name to the end of the default directory, you create the name but do not have to create the directory as "Make install" will do that for you at install time)
Decide if you want to use TBB or not (the mouse pop up says OCCT will still run in multi threaded mode even without TBB selected)
run "make" to compile occ
then run "sudo make install"

When configuring FreeCAD,
click on OCCT_CMAKE_FALLBACK
then find and select the correct subdirectories for the three OCCT directory settings that show up.
On Ubuntu 18.04, you have to specifically select Python 3 as by default it finds Python 2.7, don't know about on 20.04.
Select TBB if you want it.
Unlike OCC FreeCAD does not need to be installed after compilation, it will run as and where compiled. However if you do want ot install FreECAD for some reason then don't forget top consider changing the default install path.


These are some screen shots of my cmake-gui when configuring to compile FreeCAD, not the settings, for Opencascade and OCCT, I selected OCCT offical rather than OCE community edition in the appropriate setting.
Screenshot_20201012_152633.png
Screenshot_20201012_152633.png (37.47 KiB) Viewed 458 times
and these directory settings, plus another, need to be set to your previous configured non-default occt install directory, as you can see I used the default install directory but added another subdirector to the end of it, this makes finding the correct subdirectories easier. Two are shown here the third is further down named "opencascade directory". The default "install directory" for OCCT when you configured OCC is /usr/local so I just added "/occt_mnaster" to the end so that my occ compiled from occ master would then install every thing into subdirecotries under "/usr/local/occt_master", you can see this isn these pictures.
Screenshot_20201012_152816.png
Screenshot_20201012_152816.png (15.5 KiB) Viewed 458 times
I did a search for OCCT so that you can see all occ directory path settings
Screenshot_20201012_152938.png
Screenshot_20201012_152938.png (42.47 KiB) Viewed 458 times
This is the fiorst time that I have compiled OCC fror many years so it always possible that I have missed something and also thta there are changes made over the years as well.

I hope this helps.

Jim
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: build.make:263: /solver_3d_ext1.cpp.o] Error 1

Post by sgrogan »

jmaustpc wrote: Mon Oct 12, 2020 4:44 am I hope this helps.
Thanks!
EDIT: I just saw this https://forum.freecadweb.org/viewtopic. ... 14#p438773
"fight the good fight"
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: build.make:263: /solver_3d_ext1.cpp.o] Error 1

Post by jmaustpc »

sgrogan wrote: Wed Oct 14, 2020 8:16 pm
jmaustpc wrote: Mon Oct 12, 2020 4:44 am I hope this helps.
Thanks!
EDIT: I just saw this https://forum.freecadweb.org/viewtopic. ... 14#p438773
Yes, that is something I need to chase up, because the problem is not, or at least not exactly, what Werner thought
I assume you built and installed OCCT 7.5 somewhere in your home directory and you didn't install it over the system version.
I have to check but I think there is something missing or some version difference or something with the libTK related packages.

I didn't ask Werner any more partly because I don't want to waste any of his time and I have not yet had the time to look into it yet.

:)

I said that you used to have to install OCC before compiling FreeCAD, that I assume is for the reason that Werner is explaining, I didn't know why I only knew that you have to install it first. Needing to click on that OCC option in order to get the three options to set the OCC directories is a new thing I found when trying to compile the other day, that was not there years ago when I showed you haw to do this. From memory, I think I have not compiled OCC since I bought this farm and that is now 4 years ago, how time flies.

Jim
Post Reply