FS#31105 - [cmake] automoc4 not found

Attached to Project: Arch Linux
Opened by Dominic Tubach (dotub) - Saturday, 11 August 2012, 13:54 GMT
Last edited by Andrea Scarpino (BaSh) - Saturday, 17 November 2012, 19:11 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andrea Scarpino (BaSh)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

I tried to build KDevelop4 using the PKGBUILD loaded with abs.
Though automoc4 was not found despite it is installed. This is the message I got:
CMake Error at /usr/share/apps/cmake/modules/FindPackageHandleStandardArgs.cmake:198 (MESSAGE):
Did not find automoc4 (Automoc4Config.cmake, install
git://anongit.kde.org/automoc). (missing: AUTOMOC4_EXECUTABLE)
Call Stack (most recent call first):
/usr/share/apps/cmake/modules/FindAutomoc4.cmake:49 (find_package_handle_standard_args)
/usr/share/apps/cmake/modules/FindKDE4Internal.cmake:423 (find_package)
/usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (FIND_PACKAGE)
CMakeLists.txt:12 (find_package)

I fixed this be removing NO_DEFAULT_PATH in line 65 in /usr/lib/automoc4/Automoc4Config.cmake
old: find_program(AUTOMOC4_EXECUTABLE automoc4 PATHS "${_AUTOMOC4_BIN_DIR}/bin" NO_DEFAULT_PATH)
new: find_program(AUTOMOC4_EXECUTABLE automoc4 PATHS "${_AUTOMOC4_BIN_DIR}/bin")

I don't know if this is the right place to fix the issue, but at least it works for me now.
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Saturday, 17 November 2012, 19:11 GMT
Reason for closing:  Not a bug
Additional comments about closing:  User used a different $PATH, check my last comment
Comment by Andrea Scarpino (BaSh) - Saturday, 11 August 2012, 16:22 GMT
Works for me.

Are you using the official cmake and automoc4 packages? Did you install something in /usr/local?
Be sure your system is up-to-date and you didn't modify any cmake module.
Comment by kachelaqa (kachelaqa) - Saturday, 11 August 2012, 17:35 GMT
I have this same problem (and, yes, I do have the official cmake and automoc4 packages installed).

The problem started after the recent update to kde-4.9, and appears to be related to the /lib changes.

Arch Forum Thread: https://bbs.archlinux.org/viewtopic.php?id=145612
Comment by Andrea Scarpino (BaSh) - Saturday, 11 August 2012, 17:41 GMT
I'm sorry, but I've to insist; I tried to build kdevelop on several machines and cmake finds automoc4 on each of those machines.

Is /lib a symlink to /usr/lib/?
Is /lib64 a symlink to /usr/lib/?

In the build dir, what `grep -i automoc4 CMakeCache.txt` returns?
Comment by kachelaqa (kachelaqa) - Saturday, 11 August 2012, 17:55 GMT
Yes, /lib is a symlink to /usr/lib (but I'm not on 64bit machine).

I should also clarify that I'm not personally trying to build KDevelop (I'm trying to build fsview from konq-plugins).

So this seems to be a general problem with kde/automoc4/cmake - did you read the forum thread?

BTW: I'm able to workaround this issue by adding "-DAutomoc4_DIR=/usr/lib/automoc4" to the cmake command in my pkgbuild.
Comment by Andrea Scarpino (BaSh) - Saturday, 11 August 2012, 18:01 GMT
Yes, of course this is a global issue with cmake and automoc4 and not related to Kdevelop.

Yes I read that, but there's nothing relevant.

In the build dir, what `grep -i automoc4 CMakeCache.txt` returns?
Comment by kachelaqa (kachelaqa) - Saturday, 11 August 2012, 18:13 GMT
Sorry, I meant to say that the relevant part of the forum thread was that cmake is looking in / rather than /usr (as you probably already guessed).

$ grep -i automoc4 CMakeCache.txt
AUTOMOC4_EXECUTABLE:FILEPATH=AUTOMOC4_EXECUTABLE-NOTFOUND
//The directory containing a CMake configuration file for Automoc4.
Automoc4_DIR:PATH=/lib/automoc4
//ADVANCED property for variable: AUTOMOC4_EXECUTABLE
AUTOMOC4_EXECUTABLE-ADVANCED:INTERNAL=1
Comment by Dominic Tubach (dotub) - Sunday, 12 August 2012, 17:40 GMT
/lib and /lib64 are symlinks to /usr/lib
The official cmake and automoc4 packages are installed.

$ grep -i automoc4 CMakeCache.txt
AUTOMOC4_EXECUTABLE:FILEPATH=AUTOMOC4_EXECUTABLE-NOTFOUND
//The directory containing a CMake configuration file for Automoc4.
Automoc4_DIR:PATH=/lib64/automoc4
//ADVANCED property for variable: AUTOMOC4_EXECUTABLE
AUTOMOC4_EXECUTABLE-ADVANCED:INTERNAL=1

So basically the same as kachelaqa.
Comment by Andrea Scarpino (BaSh) - Saturday, 17 November 2012, 19:10 GMT
check your $PATH.

/usr/bin MUST preecede /bin (this is the default)

.../usr/bin:/bin...

Loading...