Ubuntu PPA Maintenance Coordination

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: Ubuntu PPA Maintenance Coordination

Post by f3nix »

NormandC wrote:Find a workaround in xenial for liboce-visualization-dev not linking libfreeimage-dev properly. It's a Multi-Arch support issue. This prevents FreeCAD from building on the Daily PPA thus we have the same problem with the 0.16 release. (NormandC)
Hi,
as promised I have played a bit with this issue.

I think the easiest solution would be to insert something like this between cmake command and make command:

Code: Select all

grep -rl '/usr/lib/libfreeimage.so' ./ | xargs sed -i 's/\/usr\/lib\/libfreeimage.so/\/usr\/lib\/x86_64-linux-gnu\/libfreeimage.so/g
It replaces all wrong generated paths with correct ones.

I have checked this and it links ok. Didn't finish the build. Too slow in my VM.

Proof of correct linking:

Code: Select all

f3nix@xenial-vm:~/devel/freecad/FreeCAD/build-qt5-debug-5/lib$ ldd libStdMeshers.so | grep freeimage
        libfreeimage.so.3 => /usr/lib/x86_64-linux-gnu/libfreeimage.so.3 (0x00007f0fbdbca000)
f3nix@xenial-vm:~/devel/freecad/FreeCAD/build-qt5-debug-5/lib$ 
Files generated before issuing this command:

Code: Select all

f3nix@xenial-vm:~/devel/freecad/FreeCAD/build-qt5-debug-5$ grep -r freeimage.so
src/3rdParty/salomesmesh/CMakeFiles/DriverDAT.dir/build.make:lib/libDriverDAT.so: /usr/lib/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/SMESHDS.dir/build.make:lib/libSMESHDS.so: /usr/lib/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/StdMeshers.dir/build.make:lib/libStdMeshers.so: /usr/lib/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/NETGENPlugin.dir/build.make:lib/libNETGENPlugin.so: /usr/lib/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/SMDS.dir/build.make:lib/libSMDS.so: /usr/lib/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/DriverUNV.dir/build.make:lib/libDriverUNV.so: /usr/lib/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/MEFISTO2.dir/build.make:lib/libMEFISTO2.so: /usr/lib/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/build.make:lib/libDriver.so: /usr/lib/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/build.make:lib/libSMESH.so: /usr/lib/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/DriverSTL.dir/build.make:lib/libDriverSTL.so: /usr/lib/libfreeimage.so
src/Mod/Fem/Gui/CMakeFiles/FemGui.dir/build.make:Mod/Fem/FemGui.so: /usr/lib/libfreeimage.so
src/Mod/Fem/App/CMakeFiles/Fem.dir/build.make:Mod/Fem/Fem.so: /usr/lib/libfreeimage.so
src/Mod/PartDesign/Gui/CMakeFiles/PartDesignGui.dir/build.make:Mod/PartDesign/PartDesignGui.so: /usr/lib/libfreeimage.so
src/Mod/PartDesign/App/CMakeFiles/PartDesign.dir/build.make:Mod/PartDesign/_PartDesign.so: /usr/lib/libfreeimage.so
src/Mod/Path/Gui/CMakeFiles/PathGui.dir/build.make:Mod/Path/PathGui.so: /usr/lib/libfreeimage.so
src/Mod/Path/App/CMakeFiles/Path.dir/build.make:Mod/Path/Path.so: /usr/lib/libfreeimage.so
src/Mod/Draft/App/CMakeFiles/DraftUtils.dir/build.make:Mod/Draft/DraftUtils.so: /usr/lib/libfreeimage.so
src/Mod/Raytracing/Gui/CMakeFiles/RaytracingGui.dir/build.make:Mod/Raytracing/RaytracingGui.so: /usr/lib/libfreeimage.so
src/Mod/Raytracing/App/CMakeFiles/Raytracing.dir/build.make:Mod/Raytracing/Raytracing.so: /usr/lib/libfreeimage.so
src/Mod/MeshPart/Gui/CMakeFiles/MeshPartGui.dir/build.make:Mod/MeshPart/MeshPartGui.so: /usr/lib/libfreeimage.so
src/Mod/MeshPart/App/CMakeFiles/MeshPart.dir/build.make:Mod/MeshPart/MeshPart.so: /usr/lib/libfreeimage.so
src/Mod/Sketcher/Gui/CMakeFiles/SketcherGui.dir/build.make:Mod/Sketcher/SketcherGui.so: /usr/lib/libfreeimage.so
src/Mod/Sketcher/App/CMakeFiles/Sketcher.dir/build.make:Mod/Sketcher/Sketcher.so: /usr/lib/libfreeimage.so
src/Mod/Robot/Gui/CMakeFiles/RobotGui.dir/build.make:Mod/Robot/RobotGui.so: /usr/lib/libfreeimage.so
src/Mod/Robot/App/CMakeFiles/Robot.dir/build.make:Mod/Robot/Robot.so: /usr/lib/libfreeimage.so
src/Mod/Part/Gui/CMakeFiles/PartGui.dir/build.make:Mod/Part/PartGui.so: /usr/lib/libfreeimage.so
src/Mod/Part/App/CMakeFiles/Part.dir/build.make:Mod/Part/Part.so: /usr/lib/libfreeimage.so
src/Mod/Inspection/Gui/CMakeFiles/InspectionGui.dir/build.make:Mod/Inspection/InspectionGui.so: /usr/lib/libfreeimage.so
src/Mod/Inspection/App/CMakeFiles/Inspection.dir/build.make:Mod/Inspection/Inspection.so: /usr/lib/libfreeimage.so
src/Mod/Import/Gui/CMakeFiles/ImportGui.dir/build.make:Mod/Import/ImportGui.so: /usr/lib/libfreeimage.so
src/Mod/Import/App/CMakeFiles/Import.dir/build.make:Mod/Import/Import.so: /usr/lib/libfreeimage.so
src/Mod/Drawing/Gui/CMakeFiles/DrawingGui.dir/build.make:Mod/Drawing/DrawingGui.so: /usr/lib/libfreeimage.so
src/Mod/Drawing/App/CMakeFiles/Drawing.dir/build.make:Mod/Drawing/Drawing.so: /usr/lib/libfreeimage.so
src/Mod/ReverseEngineering/Gui/CMakeFiles/ReverseEngineeringGui.dir/build.make:Mod/ReverseEngineering/ReverseEngineeringGui.so: /usr/lib/libfreeimage.so
src/Mod/ReverseEngineering/App/CMakeFiles/ReverseEngineering.dir/build.make:Mod/ReverseEngineering/ReverseEngineering.so: /usr/lib/libfreeimage.so
f3nix@xenial-vm:~/devel/freecad/FreeCAD/build-qt5-debug-5$ 

And after:

Code: Select all

f3nix@xenial-vm:~/devel/freecad/FreeCAD/build-qt5-debug-5$ grep -r freeimage.so
src/3rdParty/salomesmesh/CMakeFiles/DriverDAT.dir/build.make:lib/libDriverDAT.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/SMESHDS.dir/build.make:lib/libSMESHDS.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/StdMeshers.dir/build.make:lib/libStdMeshers.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/SMDS.dir/build.make:lib/libSMDS.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/DriverUNV.dir/build.make:lib/libDriverUNV.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/MEFISTO2.dir/build.make:lib/libMEFISTO2.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/build.make:lib/libDriver.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/build.make:lib/libSMESH.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/3rdParty/salomesmesh/CMakeFiles/DriverSTL.dir/build.make:lib/libDriverSTL.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Fem/Gui/CMakeFiles/FemGui.dir/build.make:Mod/Fem/FemGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Fem/App/CMakeFiles/Fem.dir/build.make:Mod/Fem/Fem.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/PartDesign/Gui/CMakeFiles/PartDesignGui.dir/build.make:Mod/PartDesign/PartDesignGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/PartDesign/App/CMakeFiles/PartDesign.dir/build.make:Mod/PartDesign/_PartDesign.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Path/Gui/CMakeFiles/PathGui.dir/build.make:Mod/Path/PathGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Path/App/CMakeFiles/Path.dir/build.make:Mod/Path/Path.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Draft/App/CMakeFiles/DraftUtils.dir/build.make:Mod/Draft/DraftUtils.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Raytracing/Gui/CMakeFiles/RaytracingGui.dir/build.make:Mod/Raytracing/RaytracingGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Raytracing/App/CMakeFiles/Raytracing.dir/build.make:Mod/Raytracing/Raytracing.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/MeshPart/Gui/CMakeFiles/MeshPartGui.dir/build.make:Mod/MeshPart/MeshPartGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/MeshPart/App/CMakeFiles/MeshPart.dir/build.make:Mod/MeshPart/MeshPart.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Sketcher/Gui/CMakeFiles/SketcherGui.dir/build.make:Mod/Sketcher/SketcherGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Sketcher/App/CMakeFiles/Sketcher.dir/build.make:Mod/Sketcher/Sketcher.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Robot/Gui/CMakeFiles/RobotGui.dir/build.make:Mod/Robot/RobotGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Robot/App/CMakeFiles/Robot.dir/build.make:Mod/Robot/Robot.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Part/Gui/CMakeFiles/PartGui.dir/build.make:Mod/Part/PartGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Part/App/CMakeFiles/Part.dir/build.make:Mod/Part/Part.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Inspection/Gui/CMakeFiles/InspectionGui.dir/build.make:Mod/Inspection/InspectionGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Inspection/App/CMakeFiles/Inspection.dir/build.make:Mod/Inspection/Inspection.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Import/Gui/CMakeFiles/ImportGui.dir/build.make:Mod/Import/ImportGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Import/App/CMakeFiles/Import.dir/build.make:Mod/Import/Import.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Drawing/Gui/CMakeFiles/DrawingGui.dir/build.make:Mod/Drawing/DrawingGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/Drawing/App/CMakeFiles/Drawing.dir/build.make:Mod/Drawing/Drawing.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/ReverseEngineering/Gui/CMakeFiles/ReverseEngineeringGui.dir/build.make:Mod/ReverseEngineering/ReverseEngineeringGui.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
src/Mod/ReverseEngineering/App/CMakeFiles/ReverseEngineering.dir/build.make:Mod/ReverseEngineering/ReverseEngineering.so: /usr/lib/x86_64-linux-gnu/libfreeimage.so
f3nix@xenial-vm:~/devel/freecad/FreeCAD/build-qt5-debug-5$ 
So to sum up the build procedure would look like this:

Code: Select all

$ cmake with options
$ grep -rl '/usr/lib/libfreeimage.so' ./ | xargs sed -i 's/\/usr\/lib\/libfreeimage.so/\/usr\/lib\/x86_64-linux-gnu\/libfreeimage.so/g
$ make -j?
HTH. :)

Cheers,
Mateusz
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

Thanks, I like this, but how do I apply this method to a debian package where the binary building is automated?

What controls the build is the debian/rules file.

http://bazaar.launchpad.net/~freecad-ma ... bian/rules

Edit: https://www.debian.org/doc/manuals/maint-guide/
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: Ubuntu PPA Maintenance Coordination

Post by f3nix »

Do you have your Xenial packaging stuff somewhere online so I can check this locally?

EDIT:
It will probably go in the override_dh_auto_configure: section...

Cheers,
Mateusz
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

Sorry no, and I'm still at work for a couple of hours.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

Actually, you can download the files freecad_0.16.6700.orig.tar.gz and freecad_0.16.6700-1ppa1~wily1.debian.tar.gz for the wily package from here:

https://launchpad.net/~freecad-maintain ... /+packages

Extract both, then place the debian folder in the freecad-0.16.6700 folder.

Then in changelog, you only have to replace

Code: Select all

freecad (1:0.16.6700-1ppa1~wily1) wily; urgency=low
with

Code: Select all

freecad (1:0.16.6700-1ppa1~xenial1) xenial; urgency=low
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Ubuntu PPA Maintenance Coordination

Post by sgrogan »

The windows stuff should be out of the way, so I will try to push a git master branch and then a git packaging branch to my LP PPA.
I'm starting from roughly here: viewtopic.php?f=4&t=13871&start=30#p120926
I will endeavor not to detach my head :lol:
"fight the good fight"
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: Ubuntu PPA Maintenance Coordination

Post by f3nix »

Ok, checked it. It works. Did not wait for the build to complete...

Code: Select all

--- CUT ---
override_dh_auto_configure:
        dh_auto_configure -- $(extra_flags)
        cp -f src/Build/Version.h obj-$(DEB_BUILD_GNU_TYPE)/src/Build/Version.h
        # fix for Ubuntu bug - 1556680
        # https://bugs.launchpad.net/ubuntu/+source/oce/+bug/1556680
ifeq ($(DEB_TARGET_ARCH),amd64)
        grep -rl '/usr/lib/libfreeimage.so' obj-$(DEB_BUILD_GNU_TYPE)/ |\
        xargs sed -i 's/\/usr\/lib\/libfreeimage.so/\/usr\/lib\/x86_64-linux-gnu\/libfreeimage.so/g'
endif
--- CUT ---
HTH! :)

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

Re: Ubuntu PPA Maintenance Coordination

Post by sgrogan »

sgrogan wrote:The windows stuff should be out of the way, so I will try to push a git master branch
Got it!

Code: Select all

git push git+ssh://clhclh@git.launchpad.net/~freecad-maintainers/+git/gitmaster master
I had to run this twice, the first creates an empty repo the second with a HEAD pointed at master.
https://code.launchpad.net/~freecad-mai ... /gitmaster
This can be set as a remote later

Code: Select all

git+ssh://clhclh@git.launchpad.net/~freecad-maintainers/+git/gitmaster
origin for me is "https://github.com/FreeCAD/FreeCAD.git"
I'll later add a remote called PPA.
I now need to push a git packaging branch. I will try to convert my local packaging.trusty from bzr to git, and then push that.
"fight the good fight"
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

Awesome. I had found a solution, but it involved repackaging liboce with freeimage support turned off. Your solution is better since it lets us use the existing oce package despite the bug.

I'll upload the xenial package with these changes and then we'll only have the fun, detaching head stuff to work on. :D

Many thanks for your help Mateusz!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Ubuntu PPA Maintenance Coordination

Post by NormandC »

sgrogan,

What about what I suggested just a few posts back: viewtopic.php?f=4&t=15222#p121911

I think you are still going the bazaar way rather than the git way...
Post Reply