Summary: | sci-misc/boinc-6.2.15 - boinc_api.C:276: error: ‘strlcat’ was not declared in this scope | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marcello Laganà <m.lagana> |
Component: | New packages | Assignee: | Tomáš Chvátal (RETIRED) <scarabeus> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | Martin.vGagern, michael, sci |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Use boinc's implementation of strlcat and strlcpy
emerge --info on gcc-4.1.2 system where boinc does not compile Use boinc's implementation of strlcat and strlcpy |
Description
Marcello Laganà
2008-11-25 10:16:56 UTC
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. |