Building the new boinc client version without clientgui fails with errors on strlcat. It seems not be declared in the current scope. --- Build Components: (client only) --- make make all-recursive make[1]: Entering directory `/var/tmp/portage/sci-misc/boinc-6.2.15/work/boinc-6.2.15' Making all in m4 make[2]: Entering directory `/var/tmp/portage/sci-misc/boinc-6.2.15/work/boinc-6.2.15/m4' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/var/tmp/portage/sci-misc/boinc-6.2.15/work/boinc-6.2.15/m4' Making all in api make[2]: Entering directory `/var/tmp/portage/sci-misc/boinc-6.2.15/work/boinc-6.2.15/api' x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I../lib -I../api -I../db -I../client -I../tools -I../sched -I../lib/mac -O2 -pipe -march=athlon64 -fstack-protector -I/usr/include -I/usr/include/openssl -MT boinc_api.o -MD -MP -MF .deps/boinc_api.Tpo -c -o boinc_api.o boinc_api.C boinc_api.C: In function ‘int setup_shared_mem()’: boinc_api.C:188: warning: deprecated conversion from string constant to ‘char*’ boinc_api.C: In function ‘bool update_app_progress(double, double)’: boinc_api.C:276: error: ‘strlcat’ was not declared in this scope boinc_api.C:282: error: ‘strlcat’ was not declared in this scope boinc_api.C:286: error: ‘strlcat’ was not declared in this scope boinc_api.C:290: error: ‘strlcat’ was not declared in this scope boinc_api.C:294: error: ‘strlcat’ was not declared in this scope boinc_api.C:298: error: ‘strlcat’ was not declared in this scope boinc_api.C: In member function ‘void GRAPHICS_APP::run(char*)’: boinc_api.C:738: warning: deprecated conversion from string constant to ‘char*’ boinc_api.C:740: warning: deprecated conversion from string constant to ‘char*’ make[2]: *** [boinc_api.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/sci-misc/boinc-6.2.15/work/boinc-6.2.15/api' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/sci-misc/boinc-6.2.15/work/boinc-6.2.15' make: *** [all] Error 2 Reproducible: Always Steps to Reproduce: 1. emerge sci-misc/boinc-6.2.15 USE="unicode -X -bindist -server" emerge --info Portage 2.2_rc16 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.26-gentoo x86_64) ================================================================= System uname: Linux-2.6.26-gentoo-x86_64-AMD_Turion-tm-_64_Mobile_Technology_MT-30-with-glibc2.2.5 Timestamp of tree: Tue, 25 Nov 2008 07:07:03 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p48 dev-lang/python: 2.5.2-r8 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.2 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.3.0-r1 sys-apps/sandbox: 1.3.0 sys-devel/autoconf: 2.63 sys-devel/automake: 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=athlon64 -fstack-protector" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -pipe -march=athlon64 -fstack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LC_ALL="en_GB.UTF-8" LDFLAGS="-Wl,-O1" PKGDIR="/usr/portage/packages" 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="/usr/portage/local/manual" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X509 acl acpi amd64 apache2 avahi bash-completion berkdb bzip2 caps chroot clamav cli cracklib crypt cups curl dbus dri enscript ffmpeg fortran gd gdbm gmp gpm iconv imagemagick ipv6 isdnlog ithreads jbig jpeg jpeg2k kerberos ldap mailwrapper mhash midi mmx mmxext mpeg mudflap multilib multiuser mysql mysqli ncurses nls nptl nptlonly openmp pam pcre perl pic png posix ppds pppd pthreads python readline reflection samba session sni snmp spl sse sse2 ssl sysfs tcpd threads tiff truetype unicode unzip urandom usb vhosts vorbis wmf xml xorg zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" FOO2ZJS_DEVICES="sa300" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Boinc Source version 6.2.15 fixed at http://olivier.mondoloni.free.fr/boinc_source/boinc-6.2.15.tar.bz2 try it please .
Nothing change with http://olivier.mondoloni.free.fr/boinc_source/boinc-6.2.15.tar.bz2: RMD160 7020b8b13556582d1a8cee0bec40a39b9a9ef7c4 SHA1 a6662f58641365e6bae78ec8b725145f97b5a599 SHA256 13313ba7ba8706f6f240a6978a869c3007af33fb50132ceb5c88319f4a9b2f99 Still get: boinc_api.C:276: error: ‘strlcat’ was not declared in this scope
Looks like a GCC 4.3 issue.
Uhm, gcc issue? But it compiles fine on a machine with the same profile, package versions (including compiler) and settings. Differs only on use flags active. On that machine I need also the GUI so I've emerged boinc with X use flag enabled. (sci-misc/boinc-6.2.15 USE="X unicode -bindist -server") Maybe an header gets included by the gui configuration options.
Same issue here, with USE="X server unicode -bindist%" on ~x86 with gcc-4.3.2 and glibc-2.8_p20080602-r0. It would be interesting to get a preprocessed version of the boinc_api.C from a system where the build succeeds. To do so, 1. ebuild /usr/portage/sci-misc/boinc/boinc-6.2.15.ebuild compile 2. cd /var/tmp/portage/sci-misc/boinc-6.2.15/work/boinc-6.2.15/api 3. copy the g++ invocation for boinc_api.C from the output/log of step 1 4. replace "-c" with "-E" and "-o boinc_api.o" with "-o boinc_api.pp.C" 5. run that command and attach the generated boinc_api.pp.C here The resulting file should contain all the information required to find out what header file declares strlcat and what chain of inclusions lead to that file.
Created attachment 173879 [details, diff] Use boinc's implementation of strlcat and strlcpy I investigated the issue some more. Boinc 6.2.15 ships its own implementation of strlcat and strlcpy, and uses configure to decide whether to use this implementation or an implementation already present in the system. The configure script only checks whether the symbol is present in one of the used libraries, not whether it is also declard in a header file. g++ 4.3.2 on the other hand seems to cause errors, not only warnings, when the program uses a function without prototype. So on my system, where the bug occurs, configure decided that strlcat and strlcpy were already present and should be used instead of the shipped implementation. Investigating the origin of these symbols, I found them in /usr/lib/libroken.so.18 which is a dependency of my /usr/lib/libcurl.so.4.1.1 and belongs to app-crypt/heimdal-1.2.1-r1, so steps to reproduce might be: 1. emerge app-crypt/heimdal 2. USE=kerberos emerge net-misc/curl 3. emerge =sci-misc/boinc-6.2.15 I think that boinc should rather use its own implementation than try to figure out the proper header for symbols from indirect dependencies. The attached patch aims at doing so by 1. overriding the results from the configure script and 2. renaming the symbols to avoid any conflicts when linking Compiles for me, will start using it at next reboot.
Created attachment 174075 [details] emerge --info on gcc-4.1.2 system where boinc does not compile The "boinc_api.C:282: error: 'strlcat' was not declared in this scope" error also occurs on *some* systems using gcc-4.1.2. I have a x86 where it compiles fine and another where it bombs on strlcat. The strange thing is these two systems are identical on all major base system software (e.g., Portage 2.1.4.5 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26-gentoo-r3 i686) for both). Included is the entire emerge --info for the system it fails on. The flags used are the same as well: "X unicode sv_SE" and both have the same wxwidgets installed: eselect wxwidgets list Available wxWidgets profiles: [1] gtk2-unicode-release-2.8 * If anyone has a suggestion where I can check next, please let me know. I have not tried Malcom's patch.
(In reply to comment #7) I meant Martin's patch, not Malcom's. Sorry.
Thanks for the patch Martin! It fixes the problem also on my system (I've the /usr/lib/libroken.so.18 as you). I see some troubles with start-stop-daemon: it keeps running after boinc_client is started. I've added ARGS="--daemon" in the /etc/conf.d/boinc configuration file to fix that but, on the other side, stdout/err redirection obviously goes on the default files (in /var/lib/boinc/) instead of /var/log/boinc.log.
(In reply to comment #9) > I see some troubles with start-stop-daemon: it keeps running after > boinc_client is started. I'm using a nonstandard init script for boinc, according to my suggestions in bug #243194, in order to control CPU scheduling, and didn't experience this issue. > I've added ARGS="--daemon" in the /etc/conf.d/boinc configuration > file to fix that but, on the other side, stdout/err redirection obviously goes > on the default files (in /var/lib/boinc/) instead of /var/log/boinc.log. I guess a --daemon switch together with proper logfile configuration would be preferable to both the init script currently in portage and the one on my system, both of which have the backgrounding external to boinc, and redirect output streams to log files. SHould be investigated in detail, but probably not in this bug report here. Feel free to cc me to any boinc init script reports.
# ChangeLog for sci-misc/boinc # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.45 2009/01/02 20:40:21 cryos Exp $ 02 Jan 2009; Marcus D. Hanwell <cryos@gentoo.org> metadata.xml: Removed myself as maintainer.
Please please test version 6.4.5 Thanks.
Created attachment 180676 [details, diff] Use boinc's implementation of strlcat and strlcpy (In reply to comment #12) > Please please test version 6.4.5 Still an issue. Adjusted patch attached.
Reported upstream for Boinc: http://boinc.berkeley.edu/trac/ticket/840 Still inevstigating the Heimdal part of the game.
Posted to heimdal mailing list as well with regard to this issue: http://thread.gmane.org/gmane.comp.encryption.kerberos.heimdal.general/4479
Thanks for noticing upstream. At least i can focus on other issues, really thanks.
(In reply to comment #15) > Posted to heimdal mailing list as well with regard to this issue: > http://thread.gmane.org/gmane.comp.encryption.kerberos.heimdal.general/4479 I fear I broke the thread by replying to a personal mail. The thread continues here: http://thread.gmane.org/gmane.comp.encryption.kerberos.heimdal.general/4481 (In reply to comment #16) > Thanks for noticing upstream. At least i can focus on other issues, really > thanks. Does that mean you plan to wait for heimdal or boinc to resolve this? I would advise against this, as in both cases major rewrites will be necessary to automatically use correct behaviour on all build systems, whereas with boinc on Gentoo we can simply override autodetection in the ebuild, deciding that we know what we are doing. So I would like to see my patch applied to the boinc ebuild now as a workaround, until things are fixed upstream, which will take time.
Fixed. InCVS :] Really really thanks for the patch.
(In reply to comment #18) > Fixed. InCVS :] Really really thanks for the patch. You're welcome. Thanks for maintaining boinc! For completeness: Heimdal is making good progress towards renaming exported symbols, and providing version scripts, in order to avoid such issues. I would expect the next release to avoid this kind of problem. Boinc hasn't commented on the bug report yet.