Automoc issue with cmake

Laszlo Papp lpapp at kde.org
Sat Nov 17 19:36:37 UTC 2012


Can we make the automoc4 executable finding smarter? It is not actually an
Arch issue, but at least certain Arch and KDE contributors would be
potentially happier.

Thank you for your help ! A long issue has just moved forward! :)

On Sat, Nov 17, 2012 at 7:31 PM, Alexander Neundorf <neundorf at kde.org>wrote:

> On Saturday 17 November 2012, Laszlo Papp wrote:
> > It seems the issue is that "/bin" is before in my PATH than "/usr/bin".
> > Once the order swapper, it works fine.
> >
> > I believe, cmake should be smarter without depending on path order. If
> > cmake does not find anything in /bin, it should look for the next entry
> in
> > the PATH environment variable. Currently, this is not happening for
> unknown
> > reason for me. Hard coding "/usr/bin" before "/bin" may cause failure for
> > other projects.
> >
> > Perhaps, the issue is coming from here?
> > get_filename_component(_AUTOMOC4_CURRENT_DIR
>  "${CMAKE_CURRENT_LIST_FILE}"
> > PATH)
>
> Well, it is related.
>
> The automoc executable is searched using this call:
> find_program(AUTOMOC4_EXECUTABLE automoc4 PATHS  "${_AUTOMOC4_BIN_DIR}/bin"
>              NO_DEFAULT_PATH)
>
> Due to the NO_DEFAULT_PATH this should search only in the directories
> listed,
> i.e. only in "${_AUTOMOC4_BIN_DIR}/bin", which is "/bin" in your case, but
> should be "/usr/lib/bin/".
>
> If automoc would be installed with CMAKE_INSTALL_PREFIX=/, it would work.
> It works also if CMAKE_INSTALL_PREFIX=/usr/, but then it fails (e.g. for
> you)
> if /lib/ points into the /usr/ tree.
>
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20121117/ae4fd575/attachment-0001.html>


More information about the Kde-buildsystem mailing list