octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling ATLAS with MinGW


From: Fredrik Lingvall
Subject: Re: Compiling ATLAS with MinGW
Date: Sun, 19 Feb 2012 09:44:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120217 Thunderbird/10.0.1

On 02/19/12 01:17, Michael Goffioul wrote:
On Sun, Feb 19, 2012 at 12:03 AM, Michael Goffioul
<address@hidden>  wrote:
On Sat, Feb 18, 2012 at 11:08 PM, Tatsuro MATSUOKA
<address@hidden>  wrote:
Hello

I have complied the ATLAS self-build GCC on Cygwin compiler (gcc-4.5.3).
 From the libatlats.a and liff77blas.a, I have create libblas.dll.a and 
libblas.dll using MinGW GCC as linker.

This ATLAS can be linked with Octave on MinGW.

The reason why I use self build GCC on cygwin, I have not create libblas.dll.a 
and libblas.dll with MinGW linker from libatlats.a and libff77blas.a built with 
the GCC bundled with Cygwin.
Thanks Tatsuro. So you're basically doing the same as me. The reason
I'm asking is that I've been trying to recompile ATLAS with
multi-thread support, but went into problems. The multi-threaded ATLAS
version is compiled against pthread library. However when applying the
same method as above, you're using cygwin-GCC to compile ATLAS; hence
you're using the cygwin version of pthread headers. At link stage,
you're using MinGW-GCC and link against the MinGW version of pthread
library (which is basically this one:
http://sourceware.org/pthreads-win32/).

But the catch is that the pthread types in the cywin version and MinGW
version are not the same, especially they don't have the same size. In
other words: sizeof(pthread_t) in cygwin is not the same as
sizeof(pthread_t) in MinGW. And you end up with stack corruption.

I tried to compile ATLAS with the mingw-xxx compilers that are
available in cygwin, but teh build process stops almost immediately
with an error (ERROR 435 DURING Stage 1 install).
Actually, it seems to work fine when I keep the XCC compiler to be
cygwin-GCC. I'll give that a shot when I get some time.

Michael.
I had a similar problem where I needed pthreads for a toolbox I'm the maintainer of:

 http://www.signal.uu.se/Toolbox/dream/

I have compiled (mex-files) and the sourceware phreads lib with the MinGW-w64 compiler both for 32- and 64-bits. I keep some scripts and patches for building (cross compiling) pthreads in the svn rep for the toolbox.

There is also ongoing work for MinGW-w64 compiler to support the pthreads API natively called winpthreads. See: http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/experimental/

/Fredrik





reply via email to

[Prev in Thread] Current Thread [Next in Thread]