Gentoo -9999 ebuild since Jan 20 2017 fails

Having trouble installing or compiling FreeCAD? Get help here.
treslah
Posts: 11
Joined: Wed Sep 14, 2016 1:31 pm

Gentoo -9999 ebuild since Jan 20 2017 fails

Postby treslah » Mon Jan 30, 2017 10:07 am

Hi everybody,
Changes to the ebuild on the offical ::gentoo overlay have been made on Jan 20.
Since then freecad-9999 did not build for me anymore.

Had a look and discovered that
S="${WORKDIR}/FreeCAD-${PV}"
should be
S="${WORKDIR}/freecad-${PV}"

So I changed that locally, so this compiles but now the src_install() script-part still fails:

/var/tmp/portage/media-gfx/freecad-9999/image/usr/share
contains no freecad-9999 folder but leads straight to [./applications/ , ./doc/ , ./mime/]

I attached the build.log file below.

May be some more intelligent than me can have a look at this again? @wmayer @sgrogan ???

Thanks a lot!
Attachments
build.log.7z
(114.65 KiB) Downloaded 10 times
Last edited by treslah on Tue Jan 31, 2017 6:54 pm, edited 1 time in total.
wmayer
Site Admin
Posts: 11352
Joined: Thu Feb 19, 2009 10:32 am

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Postby wmayer » Mon Jan 30, 2017 11:44 am

Building the source code works 100% and also installing the files works 100%. Then an error is raised which I have no clue about
/var/tmp/portage/media-gfx/freecad-9999/temp/environment: line 4936: pushd: /var/tmp/portage/media-gfx/freecad-9999/image/usr/share/freecad-9999: No such file or directory
* ERROR: media-gfx/freecad-9999::local failed (install phase):
* (no error message)
*
* Call stack:
* ebuild.sh, line 115: Called src_install
* environment, line 4936: Called die
* The specific snippet of code:
* pushd "${ED%/}"/usr/share/${P} || die;
*
* If you need support, post the output of `emerge --info '=media-gfx/freecad-9999::local'`,
* the complete build log and the output of `emerge -pqv '=media-gfx/freecad-9999::local'`.
* The complete build log is located at '/var/tmp/portage/media-gfx/freecad-9999/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/media-gfx/freecad-9999/temp/environment'.
* Working directory: '/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999'
* S: '/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999'

But this looks Gentoo-specific to me.
treslah
Posts: 11
Joined: Wed Sep 14, 2016 1:31 pm

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Postby treslah » Mon Jan 30, 2017 6:40 pm

Hi,

@wmayer: agreed, sure it's gentoo specific but it's a distribution script what else should it be?

ED% is set to /var/tmp/portage/media-gfx/freecad-9999/image okay, but there is no subfolder ED%/usr/share/freecad-9999 YET!!!
So the pushd command triggers an exit ... so far that's plausible
But ../usr/share/freecad-9999 is never been created before
Do you know at what stage this should have been done?

# install icons to correct place rather than /usr/share/freecad
pushd "${ED%/}"/usr/share/${P} || die
local size
for size in 16 32 48 64; do
newicon -s ${size} freecad-icon-${size}.png freecad.png

Shouldn't this already be done if cmake arguments (DCMAKE_INSTALL_DATADIR) are set correctly?
Could this be the problem?

Beside the $S typo I'm at a loss on how to fix this!??
Any ideas?
wmayer
Site Admin
Posts: 11352
Joined: Thu Feb 19, 2009 10:32 am

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Postby wmayer » Tue Jan 31, 2017 8:47 am

According to the log file cmake is called with these arguments:

Code: Select all

cmake
-C /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/gentoo_common_config.cmake
-G Unix Makefiles
-DCMAKE_INSTALL_PREFIX=/usr
-DOCC_INCLUDE_DIR=/usr/lib64/opencascade-6.9.0/ros/lin/inc
-DOCC_LIBRARY_DIR=/usr/lib64/opencascade-6.9.0/ros/lin/lib64
-DCMAKE_INSTALL_DATADIR=share/freecad-9999
-DCMAKE_INSTALL_DOCDIR=share/doc/freecad-9999
-DCMAKE_INSTALL_INCLUDEDIR=include/freecad-9999
-DFREECAD_USE_EXTERNAL_KDL=OFF
-DCMAKE_BUILD_TYPE=Gentoo
-DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/gentoo_rules.cmake
-DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/gentoo_toolchain.cmake
/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999


But then right before the install starts these lines appear in the log:
>>> Install freecad-9999 into /var/tmp/portage/media-gfx/freecad-9999/image/ category media-gfx
>>> Working in BUILD_DIR: "/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build"
make -j9 -l4 install


How is this new sub-directory "image" made known to make? Over DESTDIR?
treslah
Posts: 11
Joined: Wed Sep 14, 2016 1:31 pm

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Postby treslah » Tue Jan 31, 2017 11:36 am

@wmayer
Guess I'm not the right person to ask for technical details, but as far I understand it right, it should go like this:

[1} In src_install() the command 'cmake-utils_src_install'
runs cmake make and install and puts the output into ./image which is assumed by portage as a virtual "root-folder"
AFAIK is ./image a fixed subfolder of an ebuild.

[2] Next step can be some manipulation to that "root-folder".

[3] The after src_install() finishes "portage" does it's magic and installs the content of ./image to / (into slots) but that's really portage's job.

I think the real question is not about ./image but if cmake should create ./image/usr/share/freecad-9999 or it needs to be done in step [2] in the script/

@wmayer Who's the maintainer of the ebuild script?
wmayer
Site Admin
Posts: 11352
Joined: Thu Feb 19, 2009 10:32 am

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Postby wmayer » Tue Jan 31, 2017 12:58 pm

@wmayer Who's the maintainer of the ebuild script?

I suggest to ask directly in the Gentoo forum.
treslah
Posts: 11
Joined: Wed Sep 14, 2016 1:31 pm

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Postby treslah » Tue Jan 31, 2017 6:38 pm

Hi Werner,

thanks for your feedback.
To conclude this thread: it's a classic case where one doesn't exactly know what he's doing.
My solution: disregard the ebuilds published on Jan 20 completely!
Instead check out the previous freecad-9999.ebuild form git: Still works like a charm.

The new version IMHO fucks up the cmake paths. They need to be patched - but in the new version that isn't done properly.
:twisted:
Cheers!
wmayer
Site Admin
Posts: 11352
Joined: Thu Feb 19, 2009 10:32 am

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Postby wmayer » Wed Feb 01, 2017 8:47 am

Good to know. Can you please give the link to the working script in case somebody else runs into the same problem?
nougat
Posts: 1
Joined: Mon Apr 10, 2017 7:51 pm

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Postby nougat » Mon Apr 10, 2017 8:19 pm

treslah wrote:Instead check out the previous freecad-9999.ebuild form git: Still works like a charm.


Hi treslah,

I have the same problem building freecad-9999 but as Gentoo beginner, I wonder how one checks out and uses an older *.ebuild file. Just replacing the broken /usr/portage/media-gfx/freecad/freecad-9999.ebuild is detected by emerge and causes a file verification error.


Best,

nougat
simonvanderveldt
Posts: 61
Joined: Tue Mar 14, 2017 2:11 pm

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Postby simonvanderveldt » Wed Apr 12, 2017 8:59 pm

For the initial issue there's already a PR to fix the path of the temporary workdir https://github.com/gentoo/gentoo/pull/4048

This also kind of answers the question about old ebuilds, just get it from the git repo, in the case of FreeCAD, this directory https://github.com/gentoo/gentoo/tree/m ... fx/freecad

I've got a working ebuild locally, but I'm trying to update all the deps as well, similarly to the work done for Ubuntu, which means it depends on packages that are not (yet) in the main Gentoo tree, so can't be merged yet.
See https://bugs.gentoo.org/show_bug.cgi?id=596958 for more info.