Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 151089 - kde-base/kopete-3.5.5-r1 fails to compile with USE="kdeenablefinal jingle"
Summary: kde-base/kopete-3.5.5-r1 fails to compile with USE="kdeenablefinal jingle"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL: http://bugs.kde.org/show_bug.cgi?id=1...
Whiteboard:
Keywords:
: 154548 156117 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-12 17:04 UTC by Hanno Böck
Modified: 2007-07-08 10:31 UTC (History)
13 users (show)

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


Attachments
kopete-3.5.5-enable-final-redefines.patch (kopete-3.5.5-enable-final-redefines.patch,4.80 KB, patch)
2006-12-23 00:01 UTC, Thomas S. Howard
Details | Diff
kopete-shadowing (kopete-shadowing,13.00 KB, text/plain)
2006-12-23 13:58 UTC, Thomas S. Howard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Böck gentoo-dev 2006-10-12 17:04:45 UTC
cc
In file included from libcricketbase_la.all_cc.cc:2:
socketaddress.cc:256:5: warning: "WIN32" is not defined
In file included from ./../../talk/base/messagequeue.h:32,
                 from messagequeue.cc:31,
                 from libcricketbase_la.all_cc.cc:5:
./../../talk/base/criticalsection.h:43:5: warning: "CS_TRACK_OWNER" is not defined
socketaddress.cc:212: warning: unused parameter 'len'
socketaddress.cc:220: warning: unused parameter 'len'
./../../talk/base/asyncsocket.h:81: warning: unused parameter 'socket'
./../../talk/base/asyncsocket.h:82: warning: unused parameter 'socket'
./../../talk/base/asyncsocket.h:83: warning: unused parameter 'socket'
./../../talk/base/asyncsocket.h:84: warning: unused parameter 'socket'
asyncudpsocket.cc:66: warning: unused parameter 'socket'
physicalsocketserver.cc:212: warning: unused parameter 'opt'
physicalsocketserver.cc:430: warning: unused parameter 'ff'
physicalsocketserver.cc:442: warning: unused parameter 'ff'
physicalsocketserver.cc:442: warning: unused parameter 'err'
physicalsocketserver.cc:491: warning: unused parameter 'ff'
physicalsocketserver.cc:536: warning: unused parameter 'ff'
physicalsocketserver.cc:756: warning: unused parameter 'ff'
physicalsocketserver.cc:756: warning: unused parameter 'err'
asynctcpsocket.cc:55: error: conflicting declaration 'const size_t cricket::BUF_SIZE'
asyncudpsocket.cc:51: error: 'cricket::BUF_SIZE' has a previous declaration as 'const int cricket::BUF_SIZE'
asynctcpsocket.cc:160: warning: unused parameter 'socket'
asynctcpsocket.cc:164: warning: unused parameter 'socket'
asynctcpsocket.cc:185: warning: unused parameter 'socket'
asynctcpsocket.cc:193: warning: unused parameter 'socket'
socketadapters.cc: In member function 'virtual void cricket::AsyncSSLSocket::OnConnectEvent(cricket::AsyncSocket*)':
socketadapters.cc:174: warning: unused variable 'res'
socketadapters.cc: At global scope:
socketadapters.cc:170: warning: unused parameter 'socket'
socketadapters.cc: In static member function 'static cricket::AsyncHttpsProxySocket::AuthResult cricket::AsyncHttpsProxySocket::Authenticate(const char*, size_t, const cricket::SocketAddress&, const std::string&, const std::string&, const std::string&, const buzz::XmppPassword&, cricket::AsyncHttpsProxySocket::AuthContext*&, std::string&, std::string&)':
socketadapters.cc:338: warning: format '%d' expects type 'int', but argument 3 has type 'time_t'
socketadapters.cc: At global scope:
socketadapters.cc:284: warning: unused parameter 'server'
socketadapters.cc: In member function 'void cricket::AsyncHttpsProxySocket::ProcessLine(char*, size_t)':
socketadapters.cc:790: warning: use of assignment suppression and length modifier together in scanf format
socketadapters.cc:790: warning: use of assignment suppression and length modifier together in scanf format
socketadapters.cc: At global scope:
socketadapters.cc:886: warning: unused parameter 'socket'
host.cc:52: warning: unused parameter 'err'
Comment 1 Yann Lugrin 2006-10-13 05:43:42 UTC
I Have same probleme, but emerge work without kdeenablefinal USE flag (or without jingle...)

----

Portage 2.1.1 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.5
Last Sync: Fri, 13 Oct 2006 11:00:08 +0000
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.6-r1, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon64 -funroll-all-loops -funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=athlon64 -funroll-all-loops -funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en fr fr_CH"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/sunrise /usr/portage/local/layman/liquid-concept"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X aac alsa bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli crypt cups dbus dlloader dri dvd dvdr elibc_glibc emboss encode fam firefox flac foomaticdb fortran gdbm gif glibc-omitfp gs gstreamer hal input_devices_keyboard input_devices_mouse isdnlog jpeg kde kdeenablefinal kernel_linux kipi libg++ linguas_en linguas_fr linguas_fr_CH logitech-mouse mad mikmod mmx mp3 mpeg ncurses nls no-old-linux nojoystick nptl nptlonly nsplugin ogg opengl pam pcre pdf perl png ppds pppd python qt qt3 qt4 quicktime readline real reflection ruby samba sdl session spell spl sse sse2 ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_nvidia vorbis win32codecs xcomposite xinerama xml xorg xscreensaver xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-13 05:51:46 UTC
Hanno can you confirm it's related to kdeenablefinal? In that case, I'd say to just ask upstream about this, as they might have left --enable-final usable when they cannot use it for libjingle (it's likely the case).
Comment 3 didier fabert 2006-10-13 10:44:26 UTC
i confirm it compile on amd64 with all options exept : jingle kdeenablefinal kdehiddenvisibility xinerama xmms
Comment 4 Gabriel Devenyi 2006-10-13 10:46:57 UTC
On amd64, I can confirm, fails with kdeenablefinal with the same error, works without it.

[ebuild   R   ] kde-base/kopete-3.5.5-r1  USE="autoreplace crypt history irc jingle kdehiddenvisibility latex nowlistening ssl texteffect xinerama -addbookmarks -alias -arts -connectionstatus -contactnotes -debug -gadu -groupwise -highlight -kdeenablefinal -netmeeting -sametime -slp -sms -statistics -translator -webpresence -winpopup -xmms -xscreensaver -yahoo" 0 kB
Comment 5 Hanno Böck gentoo-dev 2006-10-14 13:52:30 UTC
You're right, combination of kdeenablefinal and jingle causes this. There's already a bug upstream:
http://bugs.kde.org/show_bug.cgi?id=133074
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-16 04:42:31 UTC
Let's see, if Matt isn't keen on fixing this, I *might* give a try to fix it...
Comment 7 Sam 2006-10-24 10:33:48 UTC
Same here. At first i thought it was my cflags, but disabling almost all of them didnt help. Luckely i found this thread after noticing it's always crashing in jingle use flag. 
Comment 8 Richard Benjamin Voigt 2006-11-04 20:56:29 UTC
It's clearly a 64-bit cleanliness problem, int and size_t are not the same size on amd64.

The two constants are only in scope at the same time for kdeenablefinal I guess (they're in different source files, don't know why they should be combined at all).  But in any case the int should probably be changed to size_t.
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-11-05 02:18:20 UTC
(In reply to comment #8)
> The two constants are only in scope at the same time for kdeenablefinal I guess
> (they're in different source files, don't know why they should be combined at
> all).  But in any case the int should probably be changed to size_t.
Please, don't comment when you don't have a clue of what's going on, and don't enable features "just because it looks funny".

If you don't know why they should be combined at all, then you have no clue at all of what kdeenablefinal does.
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-11-09 05:23:36 UTC
*** Bug 154548 has been marked as a duplicate of this bug. ***
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-11-24 04:11:36 UTC
*** Bug 156117 has been marked as a duplicate of this bug. ***
Comment 12 Simon Ruggier 2006-11-27 13:18:55 UTC
(In reply to comment #9)
> If you don't know why they should be combined at all, then you have no clue at
> all of what kdeenablefinal does.
> 

In his defense, I found it hard to figure out what kdeenablefinal did when I first was deciding whether to use it ;)

I'm not much more than clueless, but for anyone who has no idea, kdeenablefinal basically combines lots of source files (per-library, I'm guessing?) into one big file during compilation, for speed and optimisation improvements.
Comment 13 Richard Benjamin Voigt 2006-12-04 20:33:22 UTC
Passing multiple files to the compiler in a single pass allows further optimizations including cross-file inlining, custom calling conventions passing arguments in registers and not preserving registers, etc., because a lot of information is available at compile time that isn't written into object files.  MS uses an alternative method of doing this, called "Link Time Code Generation", which stores all the extra metadata in the object files and runs an additional compile pass in the linker.

But, compiling a bunch of files in the same pass should not break scoping rules.  Does enable-final actually concatenate the files instead of passing multiple filenames on the command line?
Comment 14 Régis Décamps 2006-12-16 06:41:04 UTC
(In reply to comment #4)
> On amd64, I can confirm, fails with kdeenablefinal with the same error, works
> without it.
> 
> [ebuild   R   ] kde-base/kopete-3.5.5-r1  USE="autoreplace crypt history irc
> jingle kdehiddenvisibility latex nowlistening ssl texteffect xinerama
> -addbookmarks -alias -arts -connectionstatus -contactnotes -debug -gadu
> -groupwise -highlight -kdeenablefinal -netmeeting -sametime -slp -sms
> -statistics -translator -webpresence -winpopup -xmms -xscreensaver -yahoo" 0 kB
> 

Well removing only kdeenablefinal is not enough for me. This ebuild fails:
[ebuild     U ] kde-base/kopete-3.5.5-r2 [3.5.2] USE="arts crypt%* jingle%* ssl xscreensaver%* -addbookmarks% -alias% -autoreplace% -connectionstatus% -contactnotes% -debug -gadu% -groupwise% -highlight% -history% -irc% -kdeenablefinal* -kdehiddenvisibility -latex% -netmeeting% -nowlistening% -sametime -slp% -sms% -statistics% -texteffect% -translator% -webpresence% -winpopup% -xinerama -yahoo% (-xmms%)" 0 kB
Comment 15 Thomas S. Howard 2006-12-23 00:01:31 UTC
Created attachment 104620 [details, diff]
kopete-3.5.5-enable-final-redefines.patch

The problem comes down to a namespace issue. In  asynctcpsocket.cc we have this:

const size_t BUF_SIZE = MAX_PACKET_SIZE + PKT_LEN_SIZE;

and in asyncudpsocket.cc we have this:

const int BUF_SIZE = 64 * 1024;

Both consts are declared in the same namespace, 'cricket'. I'm not so into C++, but shouldn't this cause problems even without kdeenablefinal? Anyway, giving each a unique name and recompiling uncovers another error:

stunport.cc:51: error: redefinition of 'const int cricket::KEEPALIVE_DELAY'
relayport.cc:55: error: 'const int cricket::KEEPALIVE_DELAY' previously defined here
stunport.cc:52: error: redefinition of 'const int cricket::RETRY_DELAY'
relayport.cc:56: error: 'const int cricket::RETRY_DELAY' previously defined here
stunport.cc:53: error: redefinition of 'const uint32 cricket::RETRY_TIMEOUT'
relayport.cc:57: error: 'const uint32 cricket::RETRY_TIMEOUT' previously defined here

Again with the namespaces...

In this case though, the latter two variables are re-defined, but with the exact same definition each time. Since this is the case, I gave them an extern declaration in the "port.h" header and deleted one set of definitions. Then there's the first variable, KEEPALIVE_DELAY, which is "really" redefined, so that was split into two with different names, as with BUF_SIZE.

Ok, great, but this just uncovers yet another jingle error, this time with a template definition. Again, I don't know why this would work without kdeenablefinal, since it's just broken as far as I can tell, being that it redefines one of the STL classes by way of  using a template parameter that doesn't exist. Looking at the gcc libstdc++ docs, it appears this usage was allowed at one time, but actually violates the C++ standard. 
I didn't find any deque instances that used it, so I took it out.

And thus did it compile, and there was much rejoicing throughout the land. Of course, I may have broken something, but it seems alright.

Patch attached.
Comment 16 Thomas S. Howard 2006-12-23 03:34:27 UTC
Oh, yeah, I should probably mention, though it compiles with the patch, kdeenablefinal causes a lot of variable shadowing.  I haven't looked at it much yet, so I don't know what sort of scope problems there may or may not be.
Comment 17 Thomas S. Howard 2006-12-23 13:58:35 UTC
Created attachment 104656 [details]
kopete-shadowing

OK, I've just finished trawling through all the shadow warnings. The short version: I'm pretty certain everything's cool. I'm also pretty certain I'm not doing that again. For the long version, see the attachment.
Comment 18 Matthias Vill 2007-02-16 14:04:43 UTC
Isn't this also an upstream bug?
Comment 19 Wulf Krueger (RETIRED) gentoo-dev 2007-07-08 10:31:36 UTC
It is an upstream bug, yes, but one that upstream doesn't want to fix. Thanks for the patch, Thomas.

Fixed in CVS.