[Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

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

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby sgrogan » Wed Mar 15, 2017 9:33 pm

NormandC wrote:I suspect that it's because C++11 isn't enabled. I don't know how to enable it in the debian/rules makefile.

I don't see why just appending the additional flags doesn't work.

From here Hardening it seems we could append the flags. See OCCT7-packaging/tree/debian/rules for the base implementation without extra flags. Also see how FreeCAD does it from CMake in the rules file.

gdo35 wrote:As you notice, I deactivate man pages install, due to missing files. It will need to be corrected later.

I think this is because of the missing -DNGLIB_EXPORTS?
gdo35 wrote:I also needed to reorder packages into debian/control file according to inter packages dependencies :

This make a lot of sense.

I'm short on time so I hope this makes sense. Will return ASAP.

Great job NormandC, sorry for the recent lack of participation, I've been fighting the weather in my locale. :(
User avatar
NormandC
Posts: 12080
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby NormandC » Wed Mar 15, 2017 11:14 pm

Hi gdo :D

gdo35 wrote:The sed command I added is to remove libFWOSPlugin.so dependency. I got an error at build telling me the lib cannot be found.

Now that is puzzling, because the /debian/patches/nglib-occt7.patch is already supposed to do that. :?

gdo35 wrote:As you notice, I deactivate man pages install, due to missing files. It will need to be corrected later.

Odd, I thought they were in /debian/, will check.

gdo35 wrote:I also needed to reorder packages into debian/control file according to inter packages dependencies :

Are you saying the order is which the packages are listed in debian/control is important? I never read anything about it...

Thanks for the assist! :)

sgrogan wrote:
gdo35 wrote:As you notice, I deactivate man pages install, due to missing files. It will need to be corrected later.

I think this is because of the missing -DNGLIB_EXPORTS?

Why would it be related?

sgrogan wrote:From here Hardening it seems we could append the flags. See OCCT7-packaging/tree/debian/rules for the base implementation without extra flags. Also see how FreeCAD does it from CMake in the rules file.

I repeatedly looked in those files and couldn't make sense of them. As I said, for me a makefile could as well be written in Chinese! Thanks for the "Hardening" link, I have no idea what the term even means. More reading to add to the pile...

sgrogan wrote:sorry for the recent lack of participation, I've been fighting the weather in my locale. :(

Snow?

I just came back from shovelling part of my driveway, and about 24" (60cm) of snow from my 10'x10' (3x3m) patio.
User avatar
NormandC
Posts: 12080
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby NormandC » Wed Mar 15, 2017 11:15 pm

HoWil wrote:Maybe one of the occ guys can have a look at ... https://forum.freecadweb.org/viewtopic. ... 54#p165574
Looks like it is a related Segmentation fault-prob.
Thanks in advance,

I dearly hope that it's an OCC issue rather than a packaging one. :?
gdo35
Posts: 173
Joined: Wed Jan 25, 2012 7:25 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby gdo35 » Thu Mar 16, 2017 9:34 am

NormandC wrote:
gdo35 wrote:The sed command I added is to remove libFWOSPlugin.so dependency. I got an error at build telling me the lib cannot be found.

Now that is puzzling, because the /debian/patches/nglib-occt7.patch is already supposed to do that. :?


It should but it does not since you patch configure file and not configure.ac file. ;)

Check first line of the patch file :

Code: Select all

diff --git a/configure b/configure


Autotools generate configure from configure.ac so your patch is overwritten. IMHO generated files should never be in source repository.

I will rebuild the patch and keep you in touch. What I did yesterday was just some quick and dirty tests, I want to make something a bite more serious.

++
gdo35
Posts: 173
Joined: Wed Jan 25, 2012 7:25 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby gdo35 » Thu Mar 16, 2017 3:43 pm

Why netgen version to use is 5.3.1 ?

What about last release 6.0 or 6.1 ?
User avatar
sgrogan
Posts: 3005
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby sgrogan » Thu Mar 16, 2017 9:08 pm

NormandC wrote:Why would it be related?

I see stl in one of the missing packages so maybe the libs (.so) are not being built so no man pages.
NormandC wrote:Snow?
I just came back from shovelling part of my driveway, and about 24" (60cm) of snow from my 10'x10' (3x3m) patio.

Yeah, only 16" here, but lots of wind so we've been getting power outages.
gdo35 wrote:Why netgen version to use is 5.3.1 ?

Mainly because we have a working patch, this is what the OSX builds are using. On Win NG 6.x uses C++ features not supported by our current VS2013 compiler. After FreeCAD is ported to Python3 in may make sense to upgrade because NG 6.x python bindings can be built. But that's a whole new can of worms :roll:
gdo35
Posts: 173
Joined: Wed Jan 25, 2012 7:25 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby gdo35 » Thu Mar 16, 2017 10:11 pm

sgrogan wrote:
gdo35 wrote:Why netgen version to use is 5.3.1 ?

Mainly because we have a working patch, this is what the OSX builds are using. On Win NG 6.x uses C++ features not supported by our current VS2013 compiler. After FreeCAD is ported to Python3 in may make sense to upgrade because NG 6.x python bindings can be built. But that's a whole new can of worms :roll:


Ok, just asking because netgen 6.X uses cmake. ;)
User avatar
sgrogan
Posts: 3005
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby sgrogan » Thu Mar 16, 2017 10:19 pm

gdo35 wrote:Ok, just asking because netgen 6.X uses cmake. ;)

That is how I found out windows can't support it. I think @looo got this working on his conda builds. There is no reason not to use it if we (read: someone smarter than me) can patch for occt 7.1
blacey
Posts: 337
Joined: Tue Dec 08, 2015 11:28 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby blacey » Thu Mar 16, 2017 10:49 pm

@normandc, @gdo35, in case it helps, I have updated the nglib-occt7.patch to include the patch for configure.ac.

To apply to a clean netgen 5.3.1 source tree, cd into the root of the source tree and issue the following command:

Code: Select all

curl -L https://github.com/FreeCAD/homebrew-freecad/releases/download/0/nglib-occt7.patch | patch -p1


Output

Code: Select all

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   596    0   596    0     0   1424      0 --:--:-- --:--:-- --:--:--  1425
100 13084  100 13084    0     0  15247      0 --:--:-- --:--:-- --:--:-- 59203
patching file configure
patching file configure.ac
patching file libsrc/meshing/improve2.hpp
patching file libsrc/meshing/meshclass.hpp
patching file libsrc/meshing/meshtype.hpp
patching file libsrc/occ/Partition_Inter2d.hxx
patching file libsrc/occ/Partition_Inter3d.hxx
patching file libsrc/occ/Partition_Loop.hxx
patching file libsrc/occ/Partition_Loop2d.cxx
patching file libsrc/occ/Partition_Loop2d.hxx
patching file libsrc/occ/Partition_Loop3d.hxx
patching file libsrc/occ/Partition_Spliter.hxx
patching file libsrc/occ/occgeom.cpp
patching file libsrc/occ/occgeom.hpp
patching file libsrc/occ/occmeshsurf.hpp
patching file libsrc/occ/vsocc.cpp
patching file ng/Makefile.in
patching file ng/ngpkg.cpp
User avatar
NormandC
Posts: 12080
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby NormandC » Fri Mar 17, 2017 2:44 am

@ gdo35

Just had a look at this again:
gdo35 wrote:As you notice, I deactivate man pages install, due to missing files. It will need to be corrected later.

Sorry, did you install the docbook-to-man package? It's needed to generate the netgen.1 manpage from the netgen.sgml file. I'm afraid I inadvertently removed it from control's Build Depends. :oops:

@ blacey
Thanks for the updated patch. FYI in debian packaging we are not applying it directly to the source before packaging. It's added in the /debian/patches folder and it's applied at compilation time so the source remains "untainted".

gdo35 wrote:There is no libnglib-*.so but there is several independant libs that were not installed but needed by netgen binaries. I install them all :

I believe the version number appended to libnglib-*.so is done through a patch. In the netgen-4.9.13 package from the Debian/Ubuntu repositories, there are a whole bunch of patches I didn't bother trying to port to 5.3.1. See https://anonscm.debian.org/cgit/debian-science/packages/netgen.git/tree/debian/patches?h=debian/4.9.13.dfsg-8

I'm thinking nglib-version.patch might be the one that does it. Do you think this is something we should replicate?

As I also mentioned previously, there is a 5.1 branch from 2013 that inexplicably never made it in the repositories.