Bug 132431 - ktorrent-2.0 fails to compile due to possible parallel-unfriendly makefile
Summary: ktorrent-2.0 fails to compile due to possible parallel-unfriendly makefile
Status: RESOLVED WORKSFORME
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-15 02:21 UTC by Deathwing00
Modified: 2006-09-25 18:10 UTC (History)
0 users

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 Deathwing00 2006-08-15 02:21:36 UTC
Version:           ktorrent-2.0 (using KDE KDE 3.5.4)
Installed from:    Gentoo Packages
Compiler:          gcc-4.1.1 glibc-2.4
OS:                Linux

One of out users was unable to compile ktorrent-2.0. So far, after analyzing the situation, we have observed that there might be a problem with a parallel-unfriendly makefile, however none of us was able to reproduce this bug for ourselves. 

The user provided us with the following information:

net-p2p/ktorrent-2.0 fails to merge, due to a compile error in the ipfilter
plugin:

Making all in ipfilter
make[3]: Entering directory
`/var/tmp/portage/ktorrent-2.0/work/ktorrent-2.0/plugins/ipfilter'
/usr/qt/3/bin/uic -L /usr/kde/3.5/lib/kde3/plugins/designer -nounload -o
ipblockingpref.h ./ipblockingpref.ui
/usr/qt/3/bin/uic -L /usr/kde/3.5/lib/kde3/plugins/designer -nounload -o
convert_dlg.h ./convert_dlg.ui
/usr/kde/3.5/bin/kconfig_compiler ./ktipfilterplugin.kcfg
./ipfilterpluginsettings.kcfgc; ret=$?; \
        if test "$ret" != 0; then rm -f ipfilterpluginsettings.h ; exit $ret ; 
fi
/usr/qt/3/bin/moc ./convertdialog.h -o convertdialog.moc
/usr/qt/3/bin/moc ./ipfilterplugin.h -o ipfilterplugin.moc.cpp
/bin/sh ../../libtool --silent --mode=compile --tag=CXX i686-pc-linux-gnu-g++
-DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/3.5/include -I/usr/qt/3/include -I. 
-I/usr/kde/3.5/include -I./../../libktorrent  -DQT_THREAD_SUPPORT  -D_REENTRANT
 -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W
-Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O2
-pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions
-fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL
-DQT_NO_COMPAT -DQT_NO_TRANSLATION -fexceptions   -c -o ipfilterplugin.moc.lo
`test -f 'ipfilterplugin.moc.cpp' || echo './'`ipfilterplugin.moc.cpp
/bin/sh ../../libtool --silent --mode=compile --tag=CXX i686-pc-linux-gnu-g++
-DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/3.5/include -I/usr/qt/3/include -I. 
-I/usr/kde/3.5/include -I./../../libktorrent  -DQT_THREAD_SUPPORT  -D_REENTRANT
 -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W
-Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O2
-pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions
-fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL
-DQT_NO_COMPAT -DQT_NO_TRANSLATION -fexceptions   -c -o
ipfilterpluginsettings.lo `test -f 'ipfilterpluginsettings.cpp' || echo
'./'`ipfilterpluginsettings.cpp
In file included from ipfilterplugin.h:27,
                 from ipfilterplugin.moc.cpp:11:
ipblockingprefpage.h:25:28: error: ipblockingpref.h: No such file or directory
ipblockingprefpage.h:42: error: expected class-name before '{' token
ipblockingprefpage.h:42: warning: 'class kt::IPBlockingPrefPageWidget' has
virtual functions but non-virtual destructor
distcc[26326] ERROR: compile ipfilterplugin.moc.cpp on localhost failed
make[3]: *** [ipfilterplugin.moc.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
Session management error: Could not open network socket
Session management error: Could not open network socket
make[3]: Leaving directory
`/var/tmp/portage/ktorrent-2.0/work/ktorrent-2.0/plugins/ipfilter'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/ktorrent-2.0/work/ktorrent-2.0/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/ktorrent-2.0/work/ktorrent-2.0'
make: *** [all] Error 2



I asked the user to disable distcc and to use MAKEOPTS="-j1". After doing some checks, we noticed that it is not a distcc problem because the failure is at localhost, which is a straight passthrough. The user was only able to compile ktorrent-2.0 with MAKEOPTS="-j1", not being able to increase it for a successful compilation. That lead us to think that it could be a problem with a parallel-unfriendly makefile.

For additional details, you can find all the information that we have collected at the following URL: https://bugs.gentoo.org/show_bug.cgi?id=143799
Comment 1 Joris Guisson 2006-08-15 10:17:36 UTC
The header file ipblockingpref.h is generated from ipblockingpref.ui. Normally automake should handle this so that make first generates the header and then proceeds to compile anything which includes this header. 

Is that the only place it fails ? We use .ui files all over the project, so if this were the only place, it would be very strange.
Comment 2 Deathwing00 2006-08-15 15:07:17 UTC
I know that ipblockingpref.h is generated from ipblockingpref.ui at the beginning, but as I stated before we were unable to reproduce this bug. I personally still think that there is something wrong with the users system configuration, however a race condition might occur as well.
Comment 3 Joris Guisson 2006-08-15 16:07:46 UTC
I will see if I can reproduce it.
Comment 4 Joris Guisson 2006-08-15 16:24:36 UTC
Tried compiling with make -j5, problem does not happen. Maybe this is an obscure bug in make ?
Comment 5 Deathwing00 2006-08-15 16:42:03 UTC
If you have a look at https://bugs.gentoo.org/show_bug.cgi?id=143799, you will see additional details. I am here using distcc and -j5 and -j4 and it works correctly. I have asked the user to post his information to this bug.
Comment 6 Joris Guisson 2006-08-20 14:17:28 UTC
Can't reproduce, so closed.
Comment 7 Simon Farnsworth 2006-09-25 15:22:30 UTC
Sorry for the long delay in getting back to you; I had a mailserver crash (hardware failed completely), and I've only just finished recovering old mail.

For referenc, I've found the cause of the problem, but not a permanent solution.

I have net-misc/ntp syncing my time; at the moment, my PC's clock is running
fast (just enough to cause ntp to be occasionally stepping the time backwards),
due to the hot weather.

ntp's log shows that the failed compiles were occurring at a point when it was
stepping the time regularly. Waiting for cooler weather, when the clock was
staying within ntp's required 500 ppm stability was enough to fix the problem.

I'm now looking in ntp's documentation for a way to force it to never step the
clock, but only to slew the clock.
Comment 8 Joris Guisson 2006-09-25 18:10:25 UTC
Interesting, so NTP was causing this, can't you just decrease the NTP update interval, to prevent this backward stepping ?