Opened 16 years ago
Closed 15 years ago
#854 closed Defect (fixed)
building with gcc 4.4
Reported by: | mjakubicek | Owned by: | davea |
---|---|---|---|
Priority: | Major | Milestone: | Undetermined |
Component: | Client - Build | Version: | 6.6.37 |
Keywords: | Cc: | mjakubicek |
Description
Here are two patches to make BOINC build with gcc 4.4 -- the first one is sane, just simple things, while the other one comes from a colleague and...works, but I don't know why. To be more precise: I don't know why it does not build without it.
Attachments (2)
Change History (13)
Changed 16 years ago by
Attachment: | boinc-client-6.4.5-event.patch added |
---|
comment:1 Changed 16 years ago by
Cc: | mjakubicek added |
---|
comment:2 Changed 16 years ago by
Milestone: | 6.6 → Undetermined |
---|---|
Owner: | changed from romw to davea |
The main path here applies to the server code.
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [17502]) - client: don't allow coproc apps in app_info.xml.
Otherwise we'll get stuck in a loop where the client asks for CPU work, and the scheduler sends jobs for what it thinks is a CPU app but is actually a coproc app.
Eventually we should add coproc info to the app descriptions send in scheduler request, so that you can use anonymous platform for coproc apps. But let's wait on this.
- scheduler: compile fix for gcc 4.4. Fixes #854
comment:4 Changed 16 years ago by
(In [17527]) - client: don't allow coproc apps in app_info.xml.
Otherwise we'll get stuck in a loop where the client asks for CPU work, and the scheduler sends jobs for what it thinks is a CPU app but is actually a coproc app.
Eventually we should add coproc info to the app descriptions send in scheduler request, so that you can use anonymous platform for coproc apps. But let's wait on this.
- scheduler: compile fix for gcc 4.4. Fixes #854
client/
cs_statefile.cpp
sched/
sched_driver.cpp sched_util.cpp
comment:5 Changed 15 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Version: | 6.4.5 → 6.6.37 |
Please fix this also in the 6.6 branch, thanks in advance.
comment:7 Changed 15 years ago by
Confirm, thanks for pointing to the 6.6a branch, please close this again anyone with appropriate rights.
comment:8 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:9 Changed 15 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Ops, sorry, I just found out that the patch I attached in February is outdated, there is one more thing that needs to be resolved:
Starting with glibc 2.10, functions that take const arguments return const values too. This was not the case before, now e.g. strcasestr returns "const char*", not "char*" when the supplied arguments are "const char*". This breaks the build on the following place:
>g++ -DHAVE_CONFIG_H -I. -I.. -I../lib -I../api -I../db -I../client -I../tools -I../sched -I../lib/mac -pthread -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -msse2 -march=opteron -mtune=generic -MT boinc_client-cpu_sched.o -MD -MP -MF .deps/boinc_client-cpu_sched.Tpo -c -o boinc_client-cpu_sched.o `test -f 'cpu_sched.cpp' || echo './'`cpu_sched.cpp In file included from cpu_sched.cpp:46: ../lib/str_util.h:41: error: new declaration ‘char* strcasestr(const char*, const char*)’ /usr/include/string.h:367: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’
There are indeed two issues to be resolved, first, the fallback declaration should be consistent with that one of current glibc, hence it should be in lib/str_util.h:
extern const char *strcasestr(const char *s1, const char *s2);
instead of:
extern char *strcasestr(const char *s1, const char *s2);
Moreover, lib/str_util.h is missing #include "config.h" which means that the "HAVE_*" macros found out by configure are never defined (and therefore the conflicting declaration comes out). I've attached a small patch which resolves both these issues.
comment:10 Changed 15 years ago by
Public headers should not include config.h
, and str_util.h
is "public" for science apps. Code in trunk defines strcasestr
in a new file that includes config.h
. Your patch that includes config.h from str_util.h would not be applied.
comment:11 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
boinc gcc 4.4 patch #2 -- use wxPanel instead of wxControl -- why?