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

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

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

Post by NormandC »

looo wrote:I wouldn't split the package, if it makes that much headache.
What? And waste all that I've done so far? :D

I've been thinking about it from the start you know... but
looo wrote:On conda the full package is about 38 mb.
How can that be? :shock:

The whole set of liboce packages on Ubuntu takes a lot more disk space! Or is that compressed? What does it weigh when decompressed?

On our PPA, the liboce-* combined binary packages are 16.7MB while the liboce-*-dev development packages (which are not installed with FreeCAD and are only necessary for users who want to compile themselves) are about 5.31MB. But once decompressed, the liboce-* packages are 64MB and the liboce-*-dev packages are another 41MB. That's a lot more than your conda package...
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

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

Post by looo »

I was referring to the compressed package. I really don't see the advantages of splitting. But as you have sorted it out anyway, maybe it's the better solution. ;)

the uncompressed conda packages have:
occt 164 mb
freecad 140 mb
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

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

Post by NormandC »

looo wrote:But as you have sorted it out anyway, maybe it's the better solution. ;)
I have sorted out the listing of files, but not the rest of packaging! I don't know if it's the better solution, but it's the Debian-compliant one. ;)

I'll look into splitting Open Cascade into two packages instead, the main one and one for the development files which would only be needed if users want to compile FreeCAD. It may be simpler to implement, and mostly to maintain. I just checked the FreeCAD dependencies again: all the packages (foundation, modeling, ocaf, ocaf-lite and even visualization which isn't used) are installed anyway.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

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

Post by NormandC »

Well, completely by accident, I realized that my lists of files were not complete. I was missing files ending with *.h.

Since it would have meant changing yet again a bash command that I do not understand fully, I decided to give the single package approach a go. Actually, I went with two: libopencascade-7.0-0 and libopencascade-dev. It does make things much simpler (I think).

I'm taking a chance on the rules file, another Debian packaging element I have only a superficial knowledge of... :roll:

I'm currently running

Code: Select all

debuild
which will produce source and binary packages, if it works.

Not knowing if compiling OCCT brings an easy way to uninstall it afterwards, I decided to forego this step and see if I can get valid .deb packages...
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

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

Post by NormandC »

Well the compilation process of debuild worked until the end, then the binary package building failed miserably. :(

Code: Select all

-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKXDEDRAW.so.7
-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKXDEDRAW.so
-- Removed runtime path from "/home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKXDEDRAW.so.7.0.0"
-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKTObjDRAW.so.7.0.0
-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKTObjDRAW.so.7
-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKTObjDRAW.so
-- Removed runtime path from "/home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKTObjDRAW.so.7.0.0"
-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKQADraw.so.7.0.0
-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKQADraw.so.7
-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKQADraw.so
-- Removed runtime path from "/home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/lib/libTKQADraw.so.7.0.0"
-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/bin/DRAWEXE-7.0.0
-- Installing: /home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/bin/DRAWEXE
-- Removed runtime path from "/home/normand2/compilation/OCCT/opencascade-7.0.0/debian/tmp/usr/bin/DRAWEXE-7.0.0"
make[1]: quittant le répertoire « /home/normand2/compilation/OCCT/opencascade-7.0.0/obj-x86_64-linux-gnu »
   dh_install -O--buildsystem=cmake -O--parallel
dh_install: libopencascade-7.0.0 missing files (usr/lib/*/*.so.*), aborting
make: *** [binary] Erreur 20
dpkg-buildpackage: erreur: fakeroot debian/rules binary a produit une erreur de sortie de type 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
It's most probably due to my libopencascade-7.0.0.install file. Apparently using * doesn't

Code: Select all

usr/lib/*/*.so.*
usr/lib/*/*.so.*

usr/share/opencascade/7.0.0/src/OS/*
usr/share/opencascade/7.0.0/src/StdResource/*
usr/share/opencascade/7.0.0/src/UnitsAPI/*
usr/share/opencascade/7.0.0/src/SHMessage/*
usr/share/opencascade/7.0.0/src/XSMessage/*
usr/share/opencascade/7.0.0/src/XSTEPResource/*
usr/share/opencascade/7.0.0/src/XmlOcafResource/*
usr/share/opencascade/7.0.0/src/Textures/*
usr/share/opencascade/7.0.0/src/Shaders/*
I thought this syntax would be recognized, even if the * is used before the file extension.

I guess I'll have to list all the library names.

EDIT: I never noticed the duplicate "usr/lib/*/*.so.*" line. :roll: Maybe that's the problem. Testing again...

EDIT #2: no show. I think it's a MultiArch problem and it must be fixed in the rules file but I have no idea how. :evil:
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

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

Post by sgrogan »

NormandC wrote:Sorry for pushing but you have got to document this as we previously discussed... Don't fret about putting it on the wiki, I can take care of that.
Guilty as charged :oops:
I propose 4 new repos
OCCT7-source
OCCT7-packaging
NetGen-source
NetGen-packaging

I'm totally open to the naming. I will document here how to set up initially and how to clone and use (including naming the remotes)
I've posted on the OCCT site https://www.opencascade.com/forums/freecad, waiting for my post to be approved.

It will take me some time to digest what you have already posted.
NormandC wrote:EDIT #2: no show. I think it's a MultiArch problem and it must be fixed in the rules file but I have no idea how. :evil:
I think I have seen similar on Stack Overflow before, but it will probably take time to find it again.

Sorry for pulling you back in again Norm, but honestly it's probably not going to happen without your expertise :oops: THANKS :)
"fight the good fight"
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

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

Post by NormandC »

sgrogan wrote:I propose 4 new repos
(...)
I'm totally open to the naming.
I'm fine with them.
sgrogan wrote:
NormandC wrote:EDIT #2: no show. I think it's a MultiArch problem and it must be fixed in the rules file but I have no idea how. :evil:
I think I have seen similar on Stack Overflow before, but it will probably take time to find it again.
I found quite a few pages mentioning what to do. I read all of them many times and my head keeps spinning.

The problem is that they assume the reader has an understanding of how debian/rules and make files work. That isn't my case. Quite the expert I am. :roll:

https://www.debian.org/doc/manuals/debm ... #multiarch
https://wiki.debian.org/Multiarch/Implementation#CMake

According to the second link, the CMake method would be the way to go. I think I can easily patch occt's CMakeLists.txt file, if only I knew how exactly to modify it. I tried to add only "include(GNUInstallDirs)" in it, it is not enough. Then there's the question that there are many more CMakeLists.txt files all over the place (99 to be exact). Would some of them need to be modified too... :?

I'm currently building a package without MultiArch support (in other words, to be installed in /usr/lib/ instead of /usr/lib/<arch>/. At least if it works, I'll be able to delude myself into thinking I'm making progress... :roll:

EDIT: nope, can't even get this small reprieve. :roll:

Code: Select all

dh_install: libopencascade-7.0.0 missing files (usr/share/opencascade/7.0.0/src/OS/*), aborting
make: *** [binary] Erreur 2
dpkg-buildpackage: erreur: fakeroot debian/rules binary a produit une erreur de sortie de type 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
sgrogan wrote:honestly it's probably not going to happen without your expertise
That's assuming that I won't throw the towel in disgust. :evil:
gdo35
Posts: 189
Joined: Wed Jan 25, 2012 7:25 pm

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

Post by gdo35 »

Hi NormandC,

debian/rules and bash are part of my job. Maybe I could provide you some help to achieve OCCT packaging.

I carefully read the 4 pages of this post but at end, hard to compute all :mrgreen: . Could you just please resume : gdo
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

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

Post by NormandC »

Hello gdo,
gdo35 wrote:debian/rules and bash are part of my job. Maybe I could provide you some help to achieve OCCT packaging.
I would gladly welcome your help! :D
gdo35 wrote:Is this the OCCT commit you used :
Yes, I've been doing my tests with the snapshot I downloaded from this commit, but we've been discussing of building the packages from the latest master.
gdo35 wrote:Where can I find the debian packaging files you work on ?
They are only on my desktop at the moment since I didn't think they were worth putting online. But I can push to a Git repo on Launchpad, I'll try to do this tonight.
gdo35 wrote:What is your status about it ?
Stalled since my last reply here, mostly. I've been taking a break for the past couple of days.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

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

Post by sgrogan »

NormandC wrote:They are only on my desktop at the moment since I didn't think they were worth putting online. But I can push to a Git repo on Launchpad, I'll try to do this tonight.
@NormandC, I created the repo. git wouldn't let me push an empty debian folder so I copied the copyright file from the gitpackaging repo's debian folder. You can just overwrite it. I think if you clone with ssh

Code: Select all

git clone git+ssh://git.launchpad.net/~freecad-maintainers/+git/OCCT7-packaging
Your local repo should be good to go and you can push with

Code: Select all

git push origin master
If this works I will post the procedure here.

@gdo35 , Welcome :D Thanks for the offer to help, it is very much appreciated!
Last edited by sgrogan on Thu Sep 29, 2016 9:04 pm, edited 1 time in total.
"fight the good fight"
Post Reply