Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407255 - media-video/qx11grab-0.4.1 CMake Error at ffpresets/CMakeLists.txt
Summary: media-video/qx11grab-0.4.1 CMake Error at ffpresets/CMakeLists.txt
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-07 10:49 UTC by Nikoli
Modified: 2012-03-17 19:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (qx11grab-0.4.1_build.log,9.15 KB, text/plain)
2012-03-07 10:49 UTC, Nikoli
Details
build.log (qx11grab-0.4.1_build.log,6.09 KB, text/plain)
2012-03-08 03:17 UTC, Nikoli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2012-03-07 10:49:36 UTC
Created attachment 304525 [details]
build.log

Build fails if use kde is enabled and automoc is not installed:
-- Did not find automoc4 (Automoc4Config.cmake, install git://anongit.kde.org/automoc).  (missing:  AUTOMOC4_EXECUTABLE) 
-- Found Perl: /usr/bin/perl 
-- KDE4 not found, because Automoc4 not found.
...
-- Configuring incomplete, errors occurred!
 * ERROR: media-video/qx11grab-0.4.1 failed (configure phase):
 *   cmake failed

But installing automoc does not solve problem for me:
CMake Error at ffpresets/CMakeLists.txt:11 (INSTALL):
  install FILES given no DESTINATION!
...
-- Configuring incomplete, errors occurred!
 * ERROR: media-video/qx11grab-0.4.1 failed (configure phase):
 *   cmake failed
Comment 1 Davide Pesavento (RETIRED) gentoo-dev 2012-03-08 00:38:20 UTC
Actually, there's no support for kde4 in the code afaics. I've therefore removed the kde USE flag completely.
Thanks for reporting!
Comment 2 Nikoli 2012-03-08 03:16:57 UTC
Not fixed, src_configure fails.
Comment 3 Nikoli 2012-03-08 03:17:20 UTC
Created attachment 304583 [details]
build.log
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2012-03-08 10:31:24 UTC
CMake Error at ffpresets/CMakeLists.txt:11 (INSTALL):
  install FILES given no DESTINATION!

mmm...I can't reproduce... do you have ffmpeg or libav installed?
Comment 5 Nikoli 2012-03-08 15:32:16 UTC
libav-0.8
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2012-03-08 16:29:27 UTC
Do you have /usr/share/ffmpeg on your system?
Comment 7 Nikoli 2012-03-08 16:36:02 UTC
No, presets are in /usr/share/avconv dir:
/usr/share/avconv/libvpx-1080p.avpreset
/usr/share/avconv/libvpx-1080p50_60.avpreset
...
/usr/share/avconv/libx264-veryslow_firstpass.avpreset
Comment 8 Davide Pesavento (RETIRED) gentoo-dev 2012-03-08 18:14:20 UTC
Unfortunately CMakeLists.txt hardcodes the path like this:

IF (_ffmpeg_sharedir)
  SET (FFMPEG_SHAREDIR "${_ffmpeg_sharedir}/ffmpeg" CACHE PATH
    "FFmpeg data directory for ffpreset files (PATH)")
ENDIF (_ffmpeg_sharedir)

where _ffmpeg_sharedir is /usr/share. Any suggestions about how to fix this?
Comment 9 Ian Delaney (RETIRED) gentoo-dev 2012-03-10 09:52:35 UTC
Just help me catch up here.  Where does this dir come from? 

/usr/share/avconv/

I also can't replicate but I can't figure how your system manages to install the presets into a different folder. 
Is it that IF (_ffmpeg_sharedir) evaluates to false in your build?

These IF ENDIF keywords are uppercase, suggesting they cmake code.
Can you not insert an else, ie an ELSE assign _ffmpeg_sharedir = "/usr/share"

This is assuming that if IF (_ffmpeg_sharedir) evaluates to false, it then sets a deafault or backup path which becomes /usr/share/avconv/.
Comment 10 Ben de Groot 2012-03-10 10:06:31 UTC
(In reply to comment #9)
> Just help me catch up here.  Where does this dir come from? 
> 
> /usr/share/avconv/

libav-0.8
Comment 11 Ian Delaney (RETIRED) gentoo-dev 2012-03-10 10:39:15 UTC
(In reply to comment #8)
> Unfortunately CMakeLists.txt hardcodes the path like this:
> 
> IF (_ffmpeg_sharedir)
>   SET (FFMPEG_SHAREDIR "${_ffmpeg_sharedir}/ffmpeg" CACHE PATH
>     "FFmpeg data directory for ffpreset files (PATH)")
> ENDIF (_ffmpeg_sharedir)
> 
> where _ffmpeg_sharedir is /usr/share. Any suggestions about how to fix this?

I don't think the problem is that it hard sets the path.

In the log, it errors at line 11 of ffpresets/CMakeLists.txt.

ELSE (INSTALL_FFPRESETS AND FFMPEG_SHAREDIR)
  FILE(GLOB FFPRESET_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*QX11Grab.ffpreset")
  INSTALL (FILES ${FFPRESET_FILES}
    DESTINATION ${FFMPEG_SHAREDIR}
    COMPONENT ffpreset
  )
this is in an else clause.  That means the conditions in 
IF (INSTALL_FFPRESETS AND FFMPEG_SHAREDIR)
were not evelauated to true or met if you like.  That tells me that 
FFMPEG_SHAREDIR is not yet set.  The error is that 
DESTINATION ${FFMPEG_SHAREDIR}
comes up blank.  I just need be set before that point.
Why it fails in tour system I have no clue.

Can you set it in a CMakeLists.txt file?
Can you shift the position of the check to install destination to later in the configure script at a point where the required FFMPEG_SHAREDIR is set?
Comment 12 Ian Delaney (RETIRED) gentoo-dev 2012-03-10 10:59:58 UTC
alternately; IF (INSTALL_FFPRESETS AND FFMPEG_SHAREDIR) may mean
these system folders are no found, rather than not set.

they DESTINATION could instead be changed
    INSTALL (FILES ${FFPRESET_FILES}
    DESTINATION ${FFMPEG_SHAREDIR}
    COMPONENT ffpreset
to 
    INSTALL (FILES ${FFPRESET_FILES}
    DESTINATION ${INSTALL_FFPRESETS}
    COMPONENT ffpreset
It appears that having installed libav has made the folder /usr/share/avconv/.
For the above to hold, INSTALL_FFPRESETS need be == avconv, which seems to me an unlikely match.
Alternately, you could change it to;
if !(FFMPEG_SHAREDIR)
then install it there anyway.  A fix lies between these possibilities
Comment 13 Davide Pesavento (RETIRED) gentoo-dev 2012-03-10 11:16:43 UTC
(In reply to comment #11)
> (In reply to comment #8)
> > Unfortunately CMakeLists.txt hardcodes the path like this:
> > 
> > IF (_ffmpeg_sharedir)
> >   SET (FFMPEG_SHAREDIR "${_ffmpeg_sharedir}/ffmpeg" CACHE PATH
> >     "FFmpeg data directory for ffpreset files (PATH)")
> > ENDIF (_ffmpeg_sharedir)
> > 
> > where _ffmpeg_sharedir is /usr/share. Any suggestions about how to fix this?
> 
> I don't think the problem is that it hard sets the path.
> 
> In the log, it errors at line 11 of ffpresets/CMakeLists.txt.
> 
> ELSE (INSTALL_FFPRESETS AND FFMPEG_SHAREDIR)
>   FILE(GLOB FFPRESET_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*QX11Grab.ffpreset")
>   INSTALL (FILES ${FFPRESET_FILES}
>     DESTINATION ${FFMPEG_SHAREDIR}
>     COMPONENT ffpreset
>   )
> this is in an else clause.  That means the conditions in 
> IF (INSTALL_FFPRESETS AND FFMPEG_SHAREDIR)
> were not evelauated to true or met if you like.  That tells me that 
> FFMPEG_SHAREDIR is not yet set.  The error is that 
> DESTINATION ${FFMPEG_SHAREDIR}
> comes up blank.  I just need be set before that point.

Yeah, correct, ${FFMPEG_SHAREDIR} is blank at that point.
It needs to be set to /usr/share/ffmpeg for ffmpeg (this part already works) or to /usr/share/avconv for libav (this one does not work).

Is there a clean way to do that inside the ebuild? Apart from a has_version call which would be rather ugly.
Comment 14 Ian Delaney (RETIRED) gentoo-dev 2012-03-11 07:23:19 UTC
Davide,
is it that it is not set as in it has not yet been assigned?
Then what file in the source does the assigning?
Is it being called too early in ./configure?
Can its place be patched to later when it is assigned?

Why is it that it gets past that point on our systems in which (I assume both) /usr/share/ffmpeg exists. I don't get it because it's an AND. It would make sense if it were an OR.
IF (INSTALL_FFPRESETS AND FFMPEG_SHAREDIR) cannot be testing for their presence in the system otherwise our systems would fail because of the absence of /usr/share/aviconv.

can the ELSE clause take an assignment ;

ELSE FFMPEG_SHAREDIR="usr/share"
   (INSTALL_FFPRESETS AND FFMPEG_SHAREDIR)
   FILE(GLOB FFPRESET_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*QX11Grab.ffpreset")
   INSTALL (FILES ${FFPRESET_FILES}
     DESTINATION ${FFMPEG_SHAREDIR}
     COMPONENT ffpreset
My guess is the assignment belongs in some other file.  This maze of files is a bit much for a newbie.
Comment 15 Ian Delaney (RETIRED) gentoo-dev 2012-03-11 08:12:39 UTC
These;

FIND_PATH (_ffmpeg_sharedir
  NAMES ffmpeg

IF (_ffmpeg_sharedir)
  SET (FFMPEG_SHAREDIR "${_ffmpeg_sharedir}/ffmpeg" CACHE PATH
    "FFmpeg data directory for ffpreset files (PATH)")
ENDIF (_ffmpeg_sharedir)

indicate to me that the var is set on scanning the system (FIND_PATH)
in 'his' system, aviconv has already claimed the spot for the presets.

This is in the uppermost CMakeLists.txt.  This is where it is set.
_ffmpeg_sharedir comes up blank.  FFMPEG_SHAREDIR is NOT set.
So, in 'his' system the configure fails bcause the spot has been taken.  The cmake configure seems NOT to allow for the spot being taken by some other folder and only accounts for the preferred /usr/share/ffmpeg.

Either the configure need be adjusted to allow for the spot being taken and set install to /usr/share/<other dir>  (IF (INSTALL_FFPRESETS OR FFMPEG_SHAREDIR)
and add an ELSE clause to install to there

OR

hard set the folder to usr/share/ffmpeg.  make it unconditional. Make
IF (_ffmpeg_sharedir)
  SET (FFMPEG_SHAREDIR "${_ffmpeg_sharedir}/ffmpeg" CACHE PATH
    "FFmpeg data directory for ffpreset files (PATH)")
ENDIF (_ffmpeg_sharedir)

become

SET (FFMPEG_SHAREDIR "${_ffmpeg_sharedir}/ffmpeg" CACHE PATH
  "FFmpeg data directory for ffpreset files (PATH)")
Comment 16 Ian Delaney (RETIRED) gentoo-dev 2012-03-11 11:14:43 UTC
On testing some of the above,

INSTALL_FFPRESETS is a compile option; -DINSTALL_FFPRESETS:BOOL=ON
The code in ffpresets/CMakeLists.txt caters only to FFMPEG_SHAREDIR being set.
The package libav has pinched the spot with /usr/share/aviconv.
The package qx11grab's configure simply isn't prepared for this.  It does not scan for a _libav_sharedir ot a _aviconv_sharedir in its systems scanning.
In short libav has de-railed it with /use/share/aviconv.

These two packages it appears need to be 'synced', or the presence of an installed libav is written into the ebuild as a blocker, which offhand I don't know how to implement.  Hard setting the FFMPEG_SHAREDIR ought fail since it's assigned according to the presence of an installed folder.
Comment 17 Davide Pesavento (RETIRED) gentoo-dev 2012-03-17 17:17:19 UTC
Should be fixed in 0.4.1-r1. Please sync in a couple of hours and verify if it works for you. Thanks!
Comment 18 Nikoli 2012-03-17 18:37:28 UTC
Thanks, now it builds fine, but there is error during installing:
>>> /usr/share/doc/qx11grab-0.4.1-r1/AUTHORS.bz2
--- /usr/share/pixmaps/
 * 
 * Installation of a directory is blocked by a file:
 *   '/usr/share/pixmaps/qx11grab.png'
 * This file will be renamed to a different name:
 *   '/usr/share/pixmaps/qx11grab.png.backup.0000'
 * 
bak /usr/share/pixmaps/qx11grab.png /usr/share/pixmaps/qx11grab.png.backup
>>> /usr/share/pixmaps/qx11grab.png/
Comment 19 Davide Pesavento (RETIRED) gentoo-dev 2012-03-17 19:43:59 UTC
Fixed in -r2... I wonder if upstream actually test their stuff before releasing... :-/