[vsipl++] fftm compile problem

Jules Bergmann jules at codesourcery.com
Wed Jun 27 11:33:40 UTC 2007


John,

A couple of bits:

- It should be possible to build Sourcery VSIPL++ with MinGW on windows. 
  Unfortunately, you won't be able to use MinGW with the windows binary 
package from our website, because that has been built with Intel C++, 
which IIUC has a different C++ ABI than GCC on windows.

To use MinGW, you will need to build the library from the source 
package.  This requires you to run configure, so you will need either 
MSys or cygwin (something to provide the equiv of /bin/sh).


- MinGW GCC 3.4.5 will work fine (we use 3.4.4 to build our Linux binary 
pacakges).  GCC 4.1/4.2 will give better performance, but that is 
another matter ...


- The compile error you're seeing is a result of the library not being 
able to find a FFT backend.  This happens because you're missing some 
macro definitions that need to be on the command line.

If you look in the file 'lib/pkgconfig/vsipl++.pc' of the binary 
package, you will see a line:

cppflags=-I${includedir}  -DVSIP_IMPL_PAR_SERVICE=0 
-DVSIP_IMPL_IPP_FFT=1 -DVSIP_IMPL_FFT_USE_FLOAT=1 
-DVSIP_IMPL_FFT_USE_DOUBLE=1 -DVSIP_IMPL_FFT_USE_LONG_DOUBLE=1 
-DVSIP_IMPL_PROVIDE_FFT_FLOAT=1 -DVSIP_IMPL_PROVIDE_FFT_DOUBLE=1 
-DVSIP_IMPL_PROVIDE_FFT_LONG_DOUBLE=0 -DVSIP_IMPL_USE_CBLAS=2

These macros tell the library which FFT backends to use (in this case, 
we're using the IPP FFT, which happens to be how the windows binary 
package was configured).

Those definitions need to be on the command line when you compile.

You might retry compiling fft.cpp as

g++ -c -I/usr/local/include -DVSIP_IMPL_PAR_SERVICE=0 
-DVSIP_IMPL_IPP_FFT=1 -DVSIP_IMPL_FFT_USE_FLOAT=1 
-DVSIP_IMPL_FFT_USE_DOUBLE=1 -DVSIP_IMPL_FFT_USE_LONG_DOUBLE=1 
-DVSIP_IMPL_PROVIDE_FFT_FLOAT=1 -DVSIP_IMPL_PROVIDE_FFT_DOUBLE=1 
-DVSIP_IMPL_PROVIDE_FFT_LONG_DOUBLE=0 -DVSIP_IMPL_USE_CBLAS=2

That should fix the compilation errors.  However, the above mentioned 
problem of ICC and MinGW C++ ABI's being incompatible still remains of 
course!

- Sourcery VSIPL++ can be built with Cygwin too.


Do you have MSYS installed along with MinGW?  If so, you should 
configure the library from the source package.  The following configure 
command would be a good starting point:

	configure				\
		--with-lapack=simple-builtin	\
		--enable-fft=builtin

Let us know how that works!

				-- Jules


Stefan Seefeld wrote:
> Day, John wrote:
>> Stefan wrote:
>>>> You mention the windows binary release, which is configured / compiled
>>>> for use with Intel's IPP and MKL libraries. But then you are talking about
>>>> the source distribution, and mingw. To help you a little further it
>>>> is important to know what Sourcery VSIPL++ package you use .....
>>  
>> At first I tried to build the source distribution using MinGW and g++ 3.4.5, but the build failed trying to configure ATLAS and I was not able to produce the config files.
> 
> Right, configuring ATLAS is not easy. We have never attempted to support ATLAS
> on Windows. Note, however, that there are a number of configure options to work
> around those problems by using alternate lapack implementations, or none at all
> (thus disabling parts of the functionality provided by the VSIPL++ spec). You
> can find out more about these in the quickstart
> (http://www.codesourcery.com/public/vsiplplusplus/sourceryvsipl++-1.3/quickstart/ch02s03.html)
> 
>> So then I tried using the IA32 binary, just to see if I could compile the example fft.cpp (and the BeamformEx files) from the MS-DOS command line:
>>  
>>> g++ -c -I/usr/local/include fft.cpp
>>  
>> That's when the error occurred. I did not configure the fft backends or anything else. Nor did I expect the link step to work because there are no .a libraries in the Windows binary. 
> 
> That is strange, as the Windows binary package is configured / built
> for use with Intel's IPP and MKL. I'm thus not sure what causes the
> error message you are reporting. Please note that the suggested way
> to build applications with Sourcery VSIPL++ is to query compiler options
> from the vsipl++.pc files that are part of binary releases. It is possible,
> or even likely, that you are missing some important macro definition that
> causes the built-in FFT backends to be masked.
> 
>> I suppose I will have to set up a Cygwin environment, but I was hoping that MinGW alone would work.
> 
> The only supported compiler on Windows is Intel's ICC. We haven't attempted
> to build using GCC on Windows, though we are now considering it.
> 
> Regards,
> 		Stefan
> 


-- 
Jules Bergmann
CodeSourcery
jules at codesourcery.com
(650) 331-3385 x705



More information about the vsipl++ mailing list