The compile fails with: x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -fomit-frame-pointer -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -I/usr/include/freetype2 -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-shared -I../3rdparty/xorg -Iimage -I/usr/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I/usr/X11R6/include -I.uic/release-shared -o .obj/release-shared/qdnd_x11.o kernel/qdnd_x11.cpp kernel/qapplication_x11.cpp: In function ‘void qt_x11_create_intern_atoms()’: kernel/qapplication_x11.cpp:843:68: error: invalid conversion from ‘char**’ to ‘const char**’ kernel/qapplication_x11.cpp:843:68: error: initializing argument 2 of ‘int XInternAtoms(Display*, const char**, int, int, Atom*)’ x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -fomit-frame-pointer -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -I/usr/include/freetype2 -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-shared -I../3rdparty/xorg -Iimage -I/usr/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I/usr/X11R6/include -I.uic/release-shared -o .obj/release-shared/qsound_x11.o kernel/qsound_x11.cpp make: *** [.obj/release-shared/qapplication_x11.o] Error 1 make: *** Waiting for unfinished jobs.... emake failed I use a current git version of all X11 components, and compiler is gcc-4.5.1-r1. Reproducible: Always root@thinkpad> emerge --info /usr/src Portage 2.2.0_alpha6 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.1, glibc-2.12.1-r3, 2.6.37-rc4+ x86_64) ================================================================= System uname: Linux-2.6.37-rc4+-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8100_@_2.10GHz-with-gentoo-2.0.1 Timestamp of tree: Thu, 02 Dec 2010 19:00:23 +0000 app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r2 dev-lang/python: 2.6.6-r1, 2.7.1, 3.1.3 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 2.0.1-r1 sys-apps/openrc: 0.6.6 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.68 sys-devel/automake: 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.5.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers) Repositories: gentoo emacs sunrise kde x11 Tassilos-Overlay ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FSF-APPROVED @OSI-APPROVED ANTLR freedist TeX LGPL-2 BitstreamVera BZIP2 FLEX FDL-1.1 LPPL-1.3c OFL libstdc++ GPL-2-with-linking-exception fontconfig sun-j2sl-6 popt Info-ZIP MOTIF adobe-ps libgcc gcc-runtime-library-exception-3.1 gsm nosell FDL-1.3 w3m LPPL-1.3 GPL-1 ZSH FDL-1.2 CRACKLIB DB OpenSoftware PAM tcp_wrappers_license Subversion POSTGRESQL" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv" GENTOO_MIRRORS="http://64.50.236.52/ http://mirror.opteamax.de/gentoo/ http://ftp.gentoo.bg/ rsync://mirror.leaseweb.com/gentoo/ http://gentoo.mneisen.org/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/emacs /var/lib/layman/sunrise /var/lib/layman/kde /var/lib/layman/x11 /usr/local/overlays/private" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acpi akonadi alsa amd64 aspell avahi berkdb bluetooth branding bzip2 cairo caps cdda cdr cleartype cli consolekit cracklib crypt cups curl cxx dbus device-mapper dhcpcd djvu dri dts dvd dvdr dvi emacs emboss encode exif ffmpeg firefox flac fontconfig fontforge fortran fuse gallium gdbm gif gmp gnutls gpg gpm gs gstreamer gtk hal iconv idn imagemagick inotify ioctl ipv6 jpeg kde kpathsea lame laptop lastfm lcms ldap lzma mad mikmod mmap mmx mng modules mp3 mp4 mpeg mudflap multilib musicbrainz mysql nautilus ncurses networkmanager nls nptl nptlonly nsplugin ntp ogg opengl openmp openvg pam pango pcre pdf perl phonon png policykit ppds pppd pulseaudio python qt3support qt4 raw readline samba schroedinger sdl semantic-desktop session slp smp sqlite sse sse2 ssh ssl ssse3 startup-notification svg sysfs syslog t1lib taglib tcpd theora threads tiff truetype udev unicode upnp usb vorbis webkit wifi x264 xcb xcomposite xetex xft xine xinerama xml xmp xorg xpm xrandr xv xvid zeroconf zlib zsh-completion" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="i965 intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Full build.log please
Created attachment 256242 [details] The complete build.log
I've "fixed" it by changing the (char **) cast to (const char **), so at least it compiles then...
Are you sure you didn't update the gcc active version since you last build the X11 libs? I finished 2 days ago a rebuild of my whole world after updating to gcc-4.5.1-r1 and Qt build fine.
(In reply to comment #4) > Are you sure you didn't update the gcc active version since you last build the > X11 libs? Yes, after I switched my gcc active profile to 4.5 using gcc-config, I've rebuild all X11 stuff. > I finished 2 days ago a rebuild of my whole world after updating to > gcc-4.5.1-r1 and Qt build fine. Most probably you are using the X11 ebuilds from the portage tree. I follow X11 development and thus use the x11 overlay and compile directly from the git repository. In my /usr/include/X11/Xlib.h I have this definition: extern Status XInternAtoms( Display* /* dpy */, _Xconst char** /* names */, int /* count */, Bool /* onlyIfExists */, Atom* /* atoms_return */ ); _Xconst is typedefed to const, so indeed a const char** is expected here. But qt-gui-4.7.1-r1 (and kdelibs-4.5.4, kwin, plasma-workspace, and some others) provide a char** to that function. While compiling, everytime it failed, I remerged the package, stopped the build, grepped the sources, fixed all function calls, and then continued. But I'm not sure if that's a real change in the Xlib interface only existing in the git repository, or if gcc 4.5 is just more picky than 4.4...
This looks like an interface change, done after the release of libX11-1.4.0. Could you ask upstream if they really intended to change libX11 API please?
(In reply to comment #6) > This looks like an interface change, done after the release of libX11-1.4.0. > Could you ask upstream if they really intended to change libX11 API please? This is still in flux. Here's the upstream "bug": https://bugs.freedesktop.org/show_bug.cgi?id=32098
I've CCed myself on the upstream bug, let's see what they say. Maybe reverting is a good solution for now, unless some C++ wizard comes along to magically make it work as intended for both C and C++. Cheers
Upstream reverted the change in libX11: http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=d2714d65e85b44abedf5f82e1a31506dba397ef2 Closing, thanks.