Le Mon, 11 Mar 2013 03:50:25 +0100, David García Garzón <david.gar...@upf.edu> a écrit :
> Welcome and thanks for the report. > > I am working with gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 and I > cannot reproduce the error. Any light on the problem? patches? > > Two guesses: > 1 - TIME_UTC is defined anywhere else in system headers This is it. I guess I get this behaviour after some system update. In my installed include, beside libclam, I found the following: ./boost/thread/xtime.hpp: TIME_UTC_=1 ./boost/thread/xtime.hpp: if (clock_type == TIME_UTC_) ./time.h:# define TIME_UTC 1 They are from boost-1.52.0 and glibc-2.16.0 I guess this is the glibc include that cause the issue. > 2 - Some problem with anonymous enums in your gcc version I would be surprised, because even if I don't know much about c/c++, I guess other packages would be causing problems on gentoo. (gentoo compile everything) > > Two things to try: > 1- Placing #undefine TIME_UTC just before the first complaining line. The joined patch fix this issue for me. > 2- Try giving the enum a name: enum myweirdname { ... > > David. > > > Al 10/03/13 19:10, En/na Dominique Michel ha escrit: > > Hi all, > > > > This is my first message here. > > > > I contribute to the gentoo pro-audio overlay, among other things, > > the CLAM related ebuilds. > > > > When compiling libclam from your svn repository using the live > > ebuild from the overlay, I get the following error. It was working > > before. This is with gcc-4.7.2. It also look the same than this > > debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701257 > > > > I am not sure if this is related to the gcc version, because gcc-4.7 > > work on debian but not here with gcc.4.7.2 > > > > == Compiling shared > > scons/libs/core/src/FileSystem.cxx In file included from > > scons/libs/core/include/CLAM/Lock.hxx:26:0, from > > scons/libs/core/include/CLAM/Mutex.hxx:26, from > > scons/libs/core/include/CLAM/FileSystem.hxx:27, from > > scons/libs/core/src/FileSystem.cxx:22: > > scons/libs/core/include/CLAM/xtime.hxx:38:3: error: expected > > identifier before numeric constant > > scons/libs/core/include/CLAM/xtime.hxx:38:3: error: expected ‘}’ > > before numeric constant > > scons/libs/core/include/CLAM/xtime.hxx:38:3: error: expected > > unqualified-id before numeric constant In file included from > > scons/libs/core/include/CLAM/Lock.hxx:26:0, from > > scons/libs/core/include/CLAM/Mutex.hxx:26, from > > scons/libs/core/include/CLAM/FileSystem.hxx:27, from > > scons/libs/core/src/FileSystem.cxx:22: > > scons/libs/core/include/CLAM/xtime.hxx:156:1: error: expected > > declaration before ‘}’ token scons: *** > > [scons/libs/core/src/FileSystem.os] Error 1 scons: building > > terminated because of errors. > > > > I can send a complete build log if wanted. > > With gcc-4.6.3, I get the same error. > > > > Best, > > Dominique > > > > _______________________________________________ > clam-devel mailing list > clam-devel@lists.clam-project.org > http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org -- "We have the heroes we deserve."
diff -ru CLAM_orig/src/System/Threads/xtime.hxx CLAM/src/System/Threads/xtime.hxx --- CLAM_orig/src/System/Threads/xtime.hxx 2013-03-11 15:06:28.000000000 +0100 +++ CLAM/src/System/Threads/xtime.hxx 2013-03-11 15:31:19.000000000 +0100 @@ -30,6 +30,8 @@ #endif #include <pthread.h> +#undef TIME_UTC + namespace CLAM {
_______________________________________________ clam-devel mailing list clam-devel@lists.clam-project.org http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org