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 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.
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?
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.
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.
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.
>>> 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.
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...