← Back to team overview

yade-users team mailing list archive

Re: Error compilation

 

> Hello

Hello, to post further messages on yade-users mailing list, you must
register. Otherwise they will not get through.

> I have this error when i compile
> 
> ../../../../../YADE/include/yade/yade-lib-wm3-math/Math.ipp:
> In static member function 'static RealType
> Math<RealType>::aTan2(RealType, RealType)':
> ../../../../../YADE/include/yade/yade-lib-wm3-math/Math.ipp:53:
> error: 'std::__is_integer<double>::<anonymous enum>'
> is/uses anonymous type



look here:

https://lists.berlios.de/pipermail/yade-users/2005q3/000011.html

https://lists.berlios.de/pipermail/yade-users/2005q3/000012.html


I see that one post there is missing from the archives, I wonder why? So
I copy'n'paste it here (actual answer is at the bottom):





Olivier Galizzi said:     (by the date of Wed, 28 Sep 2005 13:36:45 +0200)

> Feng, Chen wrote:HI, dear all YADE developers:
> 
> I wonder if this is the right place to ask such kind of questions, I am a 
> graduate student in DEM research in civil engineering, I am now trying to 
> compile and install the YADE in my Fedora Core 4, however I kept receiving the 
> message below for compile error after following the procedure provided in the 
> homepage, I have updated boost to 1.33:
> 
> ...
> g++: -lpthread: linker input file unused because linking not done
> g++ -c -pthread -lpthread -O3 -I/usr/lib/qt-3.3/mkspecs/default -I. 
> -I/home/joeu ser/YADE/include -I/usr/lib/qt-3.3/include -o Preferences.o 
> Preferences.cpp
> g++: -lpthread: linker input file unused because linking not done
> g++ -c -pthread -lpthread -O3 -I/usr/lib/qt-3.3/mkspecs/default -I. 
> -I/home/joeu ser/YADE/include -I/usr/lib/qt-3.3/include -o SimulationLoop.o 
> SimulationLoop.cp p
> /home/joeuser/YADE/include/yade/yade-lib-wm3-math/Math.ipp: In static member 
> fun ction `static RealType Math<RealType>::aTan2(RealType, RealType)':
> /home/joeuser/YADE/include/yade/yade-lib-wm3-math/Math.ipp:53: error:
> `std::__is _integer<double>::<anonymous enum>' is/uses anonymous type
> /home/joeuser/YADE/include/yade/yade-lib-wm3-math/Math.ipp:53: error:   trying 
> t o instantiate `template<class T> struct boost::is_integral'
> /home/joeuser/YADE/include/yade/yade-lib-wm3-math/Math.ipp:53: error:
> `std::__is _integer<double>::<anonymous enum>' is/uses anonymous type
> /home/joeuser/YADE/include/yade/yade-lib-wm3-math/Math.ipp:53: error:   trying 
> t o instantiate `template<class T> struct boost::is_integral'
> make[3]: *** [SimulationLoop.o] Error 1
> make[3]: Leaving directory `/root/trunk/yade-core/projects/kdevelop/yade'
> make[2]: *** [sub-yade] Error 2
> make[2]: Leaving directory `/root/trunk/yade-core/projects/kdevelop'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/root/trunk/yade-core'
> make: *** [compile_install] Error 2
> 
> is there anything I neglected so far?
> 
> Thanks a lot!
> 
> /////////////////////////////////////////////////////////////////////
> Chen Feng
> 
> Graduate Student
> Department of Civil and Environmental Engineering
> University of Tennessee, Knoxville
> (865) 974-2608 (1st floor lab)
> //////////////////////////////////////////////////////////////////////
> 
>    Hi,
> 

> There are indeed some problems with fedora 4 and gcc 4. Gcc 4 generates error when it  encounters some anonymous  enum (it was not the case with previous version of gcc). It means it is no longer possible to write something like "enum {value = 1 }". You now have to write "enum enumname {value = 1 }". The problem is that under fedora 4 the default compiler is gcc4 and that some header files from stl still contain anonymous enum !!.  Basically what you have to do is to edit those .h files and put some stupid useless name to the enum.
> If I remember correctly I had  to modify the file /usr/include/c++/4.0.1/bits/cpp_type_traits.h (of course if you have only gcc 4.0.0 replace 4.0.1 with 4.0.0 :) ).
> Inside this file you have a lots of lines that look like this :
> 
> template<>
>     struct __is_integer<bool>
>     {
>       enum { __value = 1 };
>       typedef __true_type __type;
>     };
>  
> 
> so replace all those lines with something like that :
> 
> template<>
>     struct __is_integer<bool>
>     {
>       enum stupidname1 { __value = 1 };
>       typedef __true_type __type;
>     };
> 
> Choose a different name for each enum (like stupidname1,stupidname2 ....)
> In that file I've modified roughtly 28 enum.
> 
> You may have the same problem with some Qt headers (qcolor.h I think).
> 
> Olivier.
> 


-- 
Janek Kozicki                                                         |
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
http://lists.berlios.de/mailman/listinfo/yade-users



References