Gentoo -9999 ebuild since Jan 20 2017 fails

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
treslah
Posts: 11
Joined: Wed Sep 14, 2016 1:31 pm

Gentoo -9999 ebuild since Jan 20 2017 fails

Post by treslah »

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 72 times
Last edited by treslah on Tue Jan 31, 2017 6:54 pm, edited 1 time in total.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Post by wmayer »

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
[31;01m*[0m ERROR: media-gfx/freecad-9999::local failed (install phase):
[31;01m*[0m (no error message)
[31;01m*[0m
[31;01m*[0m Call stack:
[31;01m*[0m ebuild.sh, line 115: Called src_install
[31;01m*[0m environment, line 4936: Called die
[31;01m*[0m The specific snippet of code:
[31;01m*[0m pushd "${ED%/}"/usr/share/${P} || die;
[31;01m*[0m
[31;01m*[0m If you need support, post the output of `emerge --info '=media-gfx/freecad-9999::local'`,
[31;01m*[0m the complete build log and the output of `emerge -pqv '=media-gfx/freecad-9999::local'`.
[31;01m*[0m The complete build log is located at '/var/tmp/portage/media-gfx/freecad-9999/temp/build.log'.
[31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/media-gfx/freecad-9999/temp/environment'.
[31;01m*[0m Working directory: '/var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999'
[31;01m*[0m 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

Post by treslah »

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
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Post by wmayer »

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

Post by treslah »

@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
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Post by wmayer »

@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

Post by treslah »

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 word censored up the cmake paths. They need to be patched - but in the new version that isn't done properly.
:twisted:
Cheers!
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Post by wmayer »

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

Post by nougat »

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: 62
Joined: Tue Mar 14, 2017 2:11 pm

Re: Gentoo -9999 ebuild since Jan 20 2017 fails

Post by simonvanderveldt »

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.
Post Reply