Registered Member
|
I tried posting this on the mailing list but it did not seem to go through. Apologies if I am double posting this. (I'm actually not to concerned about it)
On some obsure compilers: i586-mingw32msvc-g++ --version i586-mingw32msvc-g++ (GCC) 4.2.1-sjlj (mingw32-2) (mingw installed for cross-compiling for windows on Linux) gccxml --version GCC-XML version 0.9.0 I am getting a compilation error: In file included from /src/eigen2/Eigen/Core:182, eigen2/Eigen/src/Core/Product.h:68: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.mingw.org/bugs.shtml> for instructions. The code in question:
This error is relatively new (I used to be able to cross compile with this tool). I see it on a Ubuntu and Fedora box with two different compiler versions. I'm not too concerned but this option is nice to have. Any ideas how to resolve this, or what the problem is? Other than this strange case everything compiles fine with gcc on linux, or "tdm-mingw" and msvc on windows. Thanks
Last edited by kinetic on Fri Aug 14, 2009 2:47 am, edited 1 time in total.
|
Registered Member
|
"internal compiler error : segmentation fault" really means that you hit a bug in the compiler itself, and a big one!
the best that we can do on eigen's side is to try to work around it. the most useful thing that you could do, would be to bisect to find the exact revision that triggers the bug.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
I was able to compile with a cross compiler based on GCC 4.4.0. So if this is just a bug in the compiler I think we can declare this solved. If you would like me to trace the problem further I can if it is helpful to you, but I don't see the point if later versions rectify the problem.
Thanks for the quick response. Sorry for the dumb question. |
Registered Member
|
it wasn't a dumb question, but indeed _I_ don't care personnally, so if you don't need us to look for a workaround for the older compiler, then I don't care either! It's great that the newer cross-compiler works.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
I tried compiling my program on a few other platforms with GCC and got the same error. I am receiving this error now on FreeBSD and Mac OS X in addition to the above. Both of these are based on older versions of GCC. The error on BSD is perhaps a little more informative though:
On BSD:
I get an error:
The error about Eigen/StdVector is due to including Eigen/Sparse before Eigen/StdVector. Easy enough to remedy, but I thought I would bring it to your attention. The other errors are over my head. Changing the ordering of the includes to remove this problem yields:
I get this with the mercurial tip version but not with 2.0.4 and earlier. I don't know how to revert to versions between 2.0.4 and the latest in Mercurial though. The following is a minimal program that exhibits both errors:
And compiling with
Will generate both compiler errors. I can to more to help but I am at a loss at this point. Thanks. |
Registered Member
|
Thank you very much! That seems like a lot of useful info. I'll look at it as soon as possible, just busy at the moment.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
OK, good news:
- the internal compiler error should be "fixed" (i.e. worked around) now. I could only test with gcc-4.1 which had the problem too, please confirm for gcc 4.2. My distro somehow didn't have gcc 4.2 packages. - about the error message about the #include order, first it is only in 2.0 and the problem doesn't exist in the devel branch; in 2.0 it's really required to include files in that order and the issue is that Sparse includes <vector>. So I just changed the #error message to make it more helpful, that will be in 2.0.5.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
I can confirm that this work around allows compilation on Mac OS X g++ version 4.0.1. Thanks!
I am still seeing the the problem on BSD with my application. However, I do not see it with the minimal program above. (Strange) So there may be some issue with my code. If I can trace what is causing it from within my application I will let you know. Thanks so much for the fast response! |
Registered Member
|
Benoit:
FYI Cross compilation using gcc 4.2.1 targeting windows was successful as well.(I still haven't figured out the BSD problem) Thanks so much. |
Registered Member
|
Cool
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
About your BSD problem, this looks awfully like a bug in the standard libraries you have in your system:
see, on one side it has the throw() and not on the other side. maybe you have to manually edit one to make it match the other. sorry i don't know for sure which one is right.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
I discovered that BSD compiles without the pedantic flag. You are probably right about the underlying problem.
merci beaucoup |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]