Linux package maintainers: How to improve maintenance of FreeCAD packages?

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Linux package maintainers: How to improve maintenance of FreeCAD packages?

Post by wmayer »

I don't mind to invest some time to try and fix some of the issues with the CMakeLists, but I would like to know up front if these changes would be accepted. It'll take a bit of time and I'd hate to see that wasted
As long as FreeCAD still works correctly by running only cmake and make without a make install and without the need to override any CMAKE_INSTALL_* variables I don't see a problem.

FYI, when self-compiling FreeCAD then it was always sufficient to run cmake once (where you maybe have to switch on/off certain modules and paths for 3rd party libs) and then after running make you could directly start the application without doing a make install first.
simonvanderveldt
Posts: 62
Joined: Tue Mar 14, 2017 2:11 pm

Re: Linux package maintainers: How to improve maintenance of FreeCAD packages?

Post by simonvanderveldt »

wmayer wrote:
I don't mind to invest some time to try and fix some of the issues with the CMakeLists, but I would like to know up front if these changes would be accepted. It'll take a bit of time and I'd hate to see that wasted
As long as FreeCAD still works correctly by running only cmake and make without a make install and without the need to override any CMAKE_INSTALL_* variables I don't see a problem.

FYI, when self-compiling FreeCAD then it was always sufficient to run cmake once (where you maybe have to switch on/off certain modules and paths for 3rd party libs) and then after running make you could directly start the application without doing a make install first.
I'll make sure the copy during build to the CMAKE_BINARY_DIR keeps working.
Actually I expect almost all of the changes to be separate from the copy during build by default since they only impact the INSTALL step.
lordeldor
Posts: 5
Joined: Sun Jun 18, 2017 4:40 am

Re: Linux package maintainers: How to improve maintenance of FreeCAD packages?

Post by lordeldor »

Hopefully nobody minds me resurrecting this dead thread. I am a Gentoo user and I have been using a Freecad git build for a little while now, albeit with some issues.

While doing research trying to debug the ebuild to resolve some of the issues I have encountered I discovered this thread.

I have encountered an issue that I think might be an issue in freecad's build system. Either that, or I am missing something very simple...

When compiling from git using the 9999 ebuild on gentoo I get the same behavior as I do just fetching the git repo and manually building for installation into target directories.

It looks like cmake is not honoring some of the parameters that I am passing.

The following are a subset of the parameters that are passed when building with the ebuild:
-DCMAKE_INSTALL_DATADIR=share/${P}
-DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
-DCMAKE_INSTALL_INCLUDEDIR=include/${P}
Both P and PF are defined by the gentoo build system. They both, under this circumstance, translate to freecad-9999.

When running a manual cmake I passed these parameters:
-DCMAKE_INSTALL_DATADIR=share/freecad-9999
-DCMAKE_INSTALL_DOCDIR=share/doc/freecad-9999
-DCMAKE_INSTALL_INCLUDEDIR=include/freecad-9999

However the resulting configuration looks like this for the ebuild:
-- datadir: /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/share/freecad-9999
-- docdir: /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/share/doc/freecad-9999
-- includedir: /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/include/freecad-9999

or this for my manual build:
-- datadir: /home/username/freecad/build/share/freecad-9999
-- docdir: /home/username/freecad/build/share/doc/freecad-9999
-- includedir: /home/username/freecad/build/include/freecad-9999

These are different paths only because I have the source checked out to a different path for my manual build attempt.

I am working with a copy of master checked out today.
d28bae3f5 (HEAD -> master, origin/master, origin/HEAD)

Is there something I am missing that is causing these path issues, or is this a bug in the current master?
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Linux package maintainers: How to improve maintenance of FreeCAD packages?

Post by sgrogan »

lordeldor wrote: Sun Jun 18, 2017 5:27 am Is there something I am missing that is causing these path issues, or is this a bug in the current master?
These paths are relative to the CMAKE_INSTALL_PREFIX. Can you check what this is set to in your local build? It seems it's being set to the build directory, I thought the default should be usr.
"fight the good fight"
lordeldor
Posts: 5
Joined: Sun Jun 18, 2017 4:40 am

Re: Linux package maintainers: How to improve maintenance of FreeCAD packages?

Post by lordeldor »

Thanks for the reply sgrogan.

The ebuild CMakeCache.txt shows:
CMAKE_INSTALL_PREFIX:PATH=/usr/lib/freecad

And the one I compiled outside of portage shows:
CMAKE_INSTALL_PREFIX:PATH=/usr/local

If I run freecad from the directory I compiled in everything is fine, but installing it with portage or without leaves paths that are relative to the build directory for a handful of files.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Linux package maintainers: How to improve maintenance of FreeCAD packages?

Post by sgrogan »

lordeldor wrote: Wed Jun 28, 2017 9:46 pm If I run freecad from the directory I compiled in everything is fine, but installing it with portage or without leaves paths that are relative to the build directory for a handful of files.
Ok, maybe the problem is

Code: Select all

make
vs

Code: Select all

make
make install
are you running make or make + install locally?
"fight the good fight"
lordeldor
Posts: 5
Joined: Sun Jun 18, 2017 4:40 am

Re: Linux package maintainers: How to improve maintenance of FreeCAD packages?

Post by lordeldor »

are you running make or make + install locally?
I ran make then make install when I did the manual build, and reviewing the ebuild log file it seems that it executed make then make install as well:

Code: Select all

>>> Source configured.
>>> Compiling source in /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999 ...
>>> Working in BUILD_DIR: "/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build"
make -j4 VERBOSE=1
I will try running make install without running make first, but it will be an hour or so before that finishes.
Last edited by lordeldor on Thu Jun 29, 2017 6:34 pm, edited 1 time in total.
lordeldor
Posts: 5
Joined: Sun Jun 18, 2017 4:40 am

Re: Linux package maintainers: How to improve maintenance of FreeCAD packages?

Post by lordeldor »

Ok,

I did a manual build with the following options:

Code: Select all

cmake -DCMAKE_INSTALL_DATADIR=share/freecad-9999 -DCMAKE_INSTALL_DOCDIR=share/doc/freecad-9999 -DCMAKE_INSTALL_INCLUDEinclude/freecad-9999 -DOCC_INCLUDE_DIR="${CASROOT}"/inc -DOCC_LIBRARY_DIR="${CASROOT}"/lib64 ../
Followed directly by make install.

The results are the same as using make then make install.

When executing FreeCAD from the command line I get these errors:

Code: Select all

Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Arch/Resources/icons/ArchWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Complete/Resources/icons/CompleteWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Draft/Resources/icons/DraftWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Drawing/Resources/icons/DrawingWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Fem/Resources/icons/FemWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Image/Resources/icons/ImageWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Inspection/Resources/icons/InspectionWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Mesh/Resources/icons/MeshWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/OpenSCAD/Resources/icons/OpenSCADWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/PartDesign/Resources/icons/PartDesignWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Part/Resources/icons/PartWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Path/Resources/icons/PathWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Plot/resources/icons/PlotWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Points/Resources/icons/PointsWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Raytracing/Resources/icons/RaytracingWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/ReverseEngineering/Resources/icons/ReverseEngineeringWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Robot/Resources/icons/RobotWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Ship/resources/icons/ShipWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Sketcher/Resources/icons/SketcherWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Spreadsheet/Resources/icons/SpreadsheetWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Start/Resources/icons/StartWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/TechDraw/Resources/icons/preferences-techdraw.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Test/Resources/icons/TestWorkbench.svg
Cannot find icon: /home/username/freecad/build/share/freecad-9999/Mod/Web/Resources/icons/WebWorkbench.svg
(2, 'No such file or directory', u'/home/username/freecad/build/share/freecad-9999/Mod/Start/StartPage/StartPage.html')
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Linux package maintainers: How to improve maintenance of FreeCAD packages?

Post by Kunda1 »

Looks like the packman-suse folks are messing up downstream. We need to contact them and tell them to fix this issue:
I really think, the problem is not in the source code of FreeCad, but in the build process of the packman-suse-packages:
If You look at
http://packman.links2linux.org/package/FreeCAD
they were newly uploaded today. But they are - like the version number shows - still based on the source code of the date 2017-02-22. So, the distro recognizes the new package but installs a build of the old git status again and again...
Reference links:
https://www.freecadweb.org/tracker/view ... 2963#c9748
http://packman.links2linux.org/package/FreeCAD
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply