Re: [eigen] Possible Bug ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Possible Bug ?
- From: Matthieu Brucher <matthieu.brucher@xxxxxxxxx>
- Date: Tue, 15 Jul 2014 12:23:31 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Pi0Za396NiY3mK5L4X6LP+sgoab65mxFBnBfLvVQsUE=; b=ih8oYrDdkMT9en2IpoWcmm8pP6YCc0QgtBQRcT5aVPTug2km7yTD3HGmv7DYxvGL54 uwBuiUsXSBAYl5cQKGfCeOnn7TUiqRHeAHUmh1nK3SGx0bNcjdOkKxfy/y7khShcp2Wk 6GI8mDEGkasjb+eJjlTPEz7O3305D7dc+3Rx9GKQR4CbKWLauvZO5V/keSM4zXvqjdJF TKpeD5NDLGE0ArE/VjMEdjwWT9ghxQy9GqMs4VMERY5jFVkkYeSlZgzx0g+iRPN5Joiy MpfSGxMSwTkoNRSYQgtuIeDIOyCXhcLwRptY51F8Pv0rqY0gyn1m3Ej6AFSssJuHi5Re KTBQ==
Hi,
Did you try by changing the order of vector/Eigen headers?
2014-07-15 12:20 GMT+01:00 Helmut Jarausch <jarausch@xxxxxxxxxxxxxxxxxxx>:
> On 07/15/2014 01:02:29 PM, Gael Guennebaud wrote:
>>
>> I found the one line triggering the issue. Using the stackoverflow
>> example,the following main.cpp file is sufficient to trigger the issue:
>>
>>
>> namespace riri { // the namespace is optional
>> enum { fifi = sizeof(int) };
>> }
>>
>> #include "func.h"
>>
>> int main() {
>> std::vector<Eigen::Matrix<double, 2, 2> > m;
>> f<2>(m);
>> }
>>
>>
>> that is, adding the declaration:
>>
>> enum { fifi = sizeof(int) };
>>
>> *before* including Eigen makes gcc's linker nuts.
>>
>> I'm clueless.
>>
>> gael
>>
>
> Probably, I haven't understood the issue.
>
> The following cases compile and link fine with gcc-4.9.0
>
> Case I) gcc Bug1.C
>
> Bug1.C :
>
> #include <Eigen/Dense>
> #include <vector>
>
> template <int N>
> void f(std::vector<Eigen::Matrix<double, N, N> >& m);
>
>
> template <>
> void f<2>(std::vector<Eigen::Matrix<double, 2, 2> >& m) {}
>
> enum { fifi = sizeof(int) };
>
>
> int main() {
> std::vector<Eigen::Matrix<double, 2, 2> > m;
> f<2>(m);
> }
>
>
> Case II) gcc Bug2.C func.C where
>
> Bug2.C :
> #include <Eigen/Dense>
> #include <vector>
>
> template <int N>
> void f(std::vector<Eigen::Matrix<double, N, N> >& m);
>
> enum { fifi = sizeof(int) };
>
>
> int main() {
> std::vector<Eigen::Matrix<double, 2, 2> > m;
> f<2>(m);
> }
>
> func.C :
> #include <Eigen/Dense>
> #include <vector>
> template <int N>
> void f(std::vector<Eigen::Matrix<double, N, N> >& m);
>
> template <>
> void f<2>(std::vector<Eigen::Matrix<double, 2, 2> >& m) {}
>
>
> Helmut
>
>
>
--
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher
Music band: http://liliejay.com/