Bug 248337 - PHP : unable to compile php plugin.
Summary: PHP : unable to compile php plugin.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: PHP (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 4.0.1
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-19 09:00 UTC by jay
Modified: 2011-06-03 21:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jay 2010-08-19 09:00:57 UTC
Version:           SVN (using KDE 4.4.2) 
OS:                Linux


If I try to compile on old .build folder, every thing compiles ok.
But then I have a BUG, not reproducible by Niko https://bugs.kde.org/show_bug.cgi?id=248071


In file included from /opt/kdev/kde4/php/duchain/tests/duchain.cpp:2664:
/opt/kdev/.build/kde4/php/duchain/tests/duchain.moc:209: error: ‘Php::Php’ has not been declared
...
In file included from /opt/kdev/kde4/php/duchain/tests/duchain_multiplefiles.cpp:237:
/opt/kdev/.build/kde4/php/duchain/tests/moc_duchain_multiplefiles.cpp:57: error: ‘Php::Php’ has not been declared





Reproducible: Didn't try

Steps to Reproduce:
then step by step:

rm .build/ -R
rm compiled/ -R

cs php && cmakekde 
//asks for kdevplatform

cs kdevplatform && cmakekde
cs php && cmakekde 
//asks for kdevelop

cs kdevelop && cmakekde
cs php && cmakekde 
//asks for kdevelop-qt-pg

cs kdevelop-qt-pg && cmakekde
cs php && cmakekde 

In file included from /opt/kdev/kde4/php/duchain/tests/duchain.cpp:2664:
/opt/kdev/.build/kde4/php/duchain/tests/duchain.moc:209: error: ‘Php::Php’ has not been declared
...
In file included from /opt/kdev/kde4/php/duchain/tests/duchain_multiplefiles.cpp:237:
/opt/kdev/.build/kde4/php/duchain/tests/moc_duchain_multiplefiles.cpp:57: error: ‘Php::Php’ has not been declared

rm .build/kde4/php/ -R
cs quanta && cmakekde
cs php && cmakekde 

same errors

cs php-docs && cmakekde
rm .build/kde4/php/ -R
cs php && cmakekde 

same errors
Comment 1 Niko Sams 2010-08-21 13:21:00 UTC
I can not reproduce - can anyone else?
Comment 2 Milian Wolff 2010-08-21 17:39:28 UTC
I can, it's a strange automoc bug. Or of the cmake macro for that. Happens to me when I switch branches.

have to find someone to report it to the authors of that tool.
Comment 3 jay 2010-11-20 21:50:47 UTC
well, very funny solution. (for me, you probably slap your forehead and say "of course!")...

.bash_setup_kde4_programming
line 94:
change:
        nice make -j3 && \
to
        nice make -j2 && \

First I thought that I have only 2 cores, so now it works. But on my second notebook I have 4 cores, and the same bug.
So it must by a bug of cmake on more than 2 threads.
Comment 4 Milian Wolff 2010-11-20 22:10:41 UTC
reopening, as it's a real problem. Our plugins are supposed to work with arbitrary -jXYZ.
Comment 5 Milian Wolff 2011-06-03 21:31:57 UTC
Git commit d27cb04382410c00912fe40775014c727416f314 by Milian Wolff.
Committed on 03/06/2011 at 21:30.
Pushed by mwolff into branch '1.2'.

remove custom target to track dependency on generated parser files

apparently it introduces the actual propblem - even though it was supposed to fix it.
maybe CMake behaves differently nowadays. Anyhow, I could not get it to generate the
files multiple times with -j5 anymore.

Thanks to Alexander Neundorf for his consultancy work ;-)

BUG: 248337

M  +0    -3    CMakeLists.txt     
M  +0    -3    duchain/CMakeLists.txt     
M  +1    -5    parser/CMakeLists.txt     

http://commits.kde.org/kdev-php/d27cb04382410c00912fe40775014c727416f314