Octave-3.6.4-rc0 Mingw gcc4.7.2 panics

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Octave-3.6.4-rc0 Mingw gcc4.7.2 panics

nitnit
Hello all,

I have tried to re-build Octave-3.6.4-rc0 with an updated mingw/msys environment (recent repository with gcc-4.7.2).

I have used Tatsuros libraries which have been built with gcc-4.6.2.

I had to rebuild lapack and reference blas in order for the configure script to succeed. All other libs are those which have been pre-compiled by Tatsuro with gcc-4.6.2.

I could build octave successfully but with make -check, I am getting a seg. fault in eigs.cc:

  ...
  src\DLD-FUNCTIONS\dot.cc ............................... PASS    3/3
  src\DLD-FUNCTIONS\eig.cc ............................... PASS   20/20
  src\DLD-FUNCTIONS\eigs.cc ..............................panic: Segmentation violation -- stopping myself...
make[1]: [check] Error 3 (ignored)
make[1]: Leaving directory `/c/OctaveB/octave-3.6.4-rc0/test'

Any ideas about cab cause it ?

Nitzan
Reply | Threaded
Open this post in threaded view
|

Re: Octave-3.6.4-rc0 Mingw gcc4.7.2 panics

Jordi Gutiérrez Hermoso-2
On 16 November 2012 09:52, nitnit <[hidden email]> wrote:

> Hello all,
>
> I have tried to re-build Octave-3.6.4-rc0 with an updated mingw/msys
> environment (recent repository with gcc-4.7.2).
>
> I have used Tatsuros libraries which have been built with gcc-4.6.2.
>
> I had to rebuild lapack and reference blas in order for the configure script
> to succeed. All other libs are those which have been pre-compiled by Tatsuro
> with gcc-4.6.2.
>
> I could build octave successfully but with make -check, I am getting a seg.
> fault in eigs.cc:
>
>   ...
>   src\DLD-FUNCTIONS\dot.cc ............................... PASS    3/3
>   src\DLD-FUNCTIONS\eig.cc ............................... PASS   20/20
>   src\DLD-FUNCTIONS\eigs.cc ..............................panic:
> Segmentation violation -- stopping myself...
> make[1]: [check] Error 3 (ignored)
> make[1]: Leaving directory `/c/OctaveB/octave-3.6.4-rc0/test'
>
> Any ideas about cab cause it ?

Possible problem with Arpack. Can you get a stack trace?

- Jordi G. H.

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Octave-3.6.4-rc0 Mingw gcc4.7.2 panics

Michael Goffioul
In reply to this post by nitnit
On Fri, Nov 16, 2012 at 9:52 AM, nitnit <[hidden email]> wrote:
Hello all,

I have tried to re-build Octave-3.6.4-rc0 with an updated mingw/msys
environment (recent repository with gcc-4.7.2).

I have used Tatsuros libraries which have been built with gcc-4.6.2.

I had to rebuild lapack and reference blas in order for the configure script
to succeed. All other libs are those which have been pre-compiled by Tatsuro
with gcc-4.6.2.

I could build octave successfully but with make -check, I am getting a seg.
fault in eigs.cc:

  ...
  src\DLD-FUNCTIONS\dot.cc ............................... PASS    3/3
  src\DLD-FUNCTIONS\eig.cc ............................... PASS   20/20
  src\DLD-FUNCTIONS\eigs.cc ..............................panic:
Segmentation violation -- stopping myself...
make[1]: [check] Error 3 (ignored)
make[1]: Leaving directory `/c/OctaveB/octave-3.6.4-rc0/test'

Any ideas about cab cause it ?


There are differences in default calling conventions between 4.6.x and 4.7.x versions under Windows. The 4.7.x calling conventions is more compatible with MSVC (in fine, this is to be compatible with MSVC-compiled DLL's). For instance, one of the change is about who's popping up the hidden pointer from the stack when returning an aggregate object larger than 8 bytes.

So I'd definitely recompile everything with the same compiler.

Michael.


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Octave-3.6.4-rc0 Mingw gcc4.7.2 panics

PhilipNienhuis
In reply to this post by nitnit
nitnit wrote:

> Hello all,
>
> I have tried to re-build Octave-3.6.4-rc0 with an updated mingw/msys
> environment (recent repository with gcc-4.7.2).
>
> I have used Tatsuros libraries which have been built with gcc-4.6.2.
>
> I had to rebuild lapack and reference blas in order for the configure script
> to succeed. All other libs are those which have been pre-compiled by Tatsuro
> with gcc-4.6.2.
>
> I could build octave successfully but with make -check, I am getting a seg.
> fault in eigs.cc:
>
>    ...
>    src\DLD-FUNCTIONS\dot.cc ............................... PASS    3/3
>    src\DLD-FUNCTIONS\eig.cc ............................... PASS   20/20
>    src\DLD-FUNCTIONS\eigs.cc ..............................panic:
> Segmentation violation -- stopping myself...
> make[1]: [check] Error 3 (ignored)
> make[1]: Leaving directory `/c/OctaveB/octave-3.6.4-rc0/test'
>
> Any ideas about cab cause it ?

In principle I'd agree with Michael's suggestion to rebuild ALL deps
with gcc 4.7.2. Who knows what other hidden problems pop up with a mixed
build chain. In this respect the various BLAS<->arch segfaults come to mind.

But it's also true that arpack is a particularly sensitive beast, on
Linux as well, so I'd first try to build just that and try again.

On a related note, would you share your build stuff? I'd also like to
switch to 4.7.x but had no time yet (and I wanted to rebuild all
dependencies anyway. I'd also like to have a first go at building a 64
bit Win version). Sharing the burden of rebuilding all can save both of
us time.

Philip

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Octave-3.6.4-rc0 Mingw gcc4.7.2 panics

Michael Goffioul
On Fri, Nov 16, 2012 at 11:52 AM, Philip Nienhuis <[hidden email]> wrote:
nitnit wrote:
> Hello all,
>
> I have tried to re-build Octave-3.6.4-rc0 with an updated mingw/msys
> environment (recent repository with gcc-4.7.2).
>
> I have used Tatsuros libraries which have been built with gcc-4.6.2.
>
> I had to rebuild lapack and reference blas in order for the configure script
> to succeed. All other libs are those which have been pre-compiled by Tatsuro
> with gcc-4.6.2.
>
> I could build octave successfully but with make -check, I am getting a seg.
> fault in eigs.cc:
>
>    ...
>    src\DLD-FUNCTIONS\dot.cc ............................... PASS    3/3
>    src\DLD-FUNCTIONS\eig.cc ............................... PASS   20/20
>    src\DLD-FUNCTIONS\eigs.cc ..............................panic:
> Segmentation violation -- stopping myself...
> make[1]: [check] Error 3 (ignored)
> make[1]: Leaving directory `/c/OctaveB/octave-3.6.4-rc0/test'
>
> Any ideas about cab cause it ?

In principle I'd agree with Michael's suggestion to rebuild ALL deps
with gcc 4.7.2. Who knows what other hidden problems pop up with a mixed
build chain. In this respect the various BLAS<->arch segfaults come to mind.

For the record, such problems are easily triggered. Consider a piece of fortran code, compiled with 4.6.x, making a call to EXP with a complex number. This is translated by gcc/gfortran into a call to cexp, which is provided by libgcc, hence 4.7.x. This function returns a double complex structure (> 8 bytes), so the fortran code and libgcc will use different calling conventions, leading to stack corruption.

Michael.


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Octave-3.6.4-rc0 Mingw gcc4.7.2 panics

nitnit
Michael Goffioul wrote
For the record, such problems are easily triggered. Consider a piece of
fortran code, compiled with 4.6.x, making a call to EXP with a complex
number. This is translated by gcc/gfortran into a call to cexp, which is
provided by libgcc, hence 4.7.x. This function returns a double complex
structure (> 8 bytes), so the fortran code and libgcc will use different
calling conventions, leading to stack corruption.
You are probably right, I have recompiled arpack, eigs.cc passed but now qr.cc it panics !

I will have to rebuild all libs but since I do not have any scripts and/or envoronment settings (it has all been done by Tatsuro) I will have to start from scratch and that will take time.

Philipe, I will report and share everything when I will get some better results.

Nitzan
Reply | Threaded
Open this post in threaded view
|

Re: Octave-3.6.4-rc0 Mingw gcc4.7.2 panics

Jordi Gutiérrez Hermoso-2
On 16 November 2012 14:11, nitnit <[hidden email]> wrote:
> I will have to rebuild all libs but since I do not have any scripts and/or
> envoronment settings (it has all been done by Tatsuro) I will have to start
> from scratch and that will take time.
>

Not from scratch! Have you seen jwe's recent post to the maintainers'
list about MXE?

- Jordi G. H.

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: Octave-3.6.4-rc0 Mingw gcc4.7.2 panics

nitnit
Jordi Gutiérrez Hermoso-2 wrote
Not from scratch! Have you seen jwe's recent post to the maintainers'
list about MXE?
Yes I have seen that, but currently I do not have any linux machine to try it.

I wonder whether cross-compiling may be done by cygwin where the target is mingw. I have used that technique to cross compile openblas on cygwin for mingw (recent version now supports mingw directly).

For now, I have found (on octaveforge svn) Benjamin Lindner scripts for mingw octave-3.2.4 and all respective dependencies and I will use that as a starting point.