1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | pscdrv fftwrap compile error for the Debian/ x64 |
From: | "Ha, Kiman via Tech-talk" <[email protected]> |
To: | "[email protected]" <[email protected]>, Michael Davidsaver <[email protected]> |
Date: | Mon, 23 Dec 2019 18:13:35 +0000 |
Hi Michael, The psdrv softIOC module is running stably since 2015 with Debian-7/32-bit for the NSLS-II BPMs. Now it is time to update Debian9 and 64 bit OS. https://github.com/mdavidsaver/pscdrv http://irfu.cea.fr/Meetings/epics/presentations/Thursday/pscdrv-201410.pdf I was trying to compile the pscdrv module for the Debian-9 x64 environment and found some errors from the fftwrap module. Can you advice what happened? Environment: Debian GNU/Linux 9 gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ~/pscdrv/sigApp$ make make -C ./src install make[1]: Entering directory '/home/kha/pscdrv/sigApp/src' make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \ T_A=linux-x86_64 install make[2]: Entering directory '/home/kha/pscdrv/sigApp/src/O.linux-x86_64' /usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -Wdate-time -D_FORTIFY_SOURCE=2 -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -fdebug-prefix-map=/build/epics-base-3.15.6=. -fstack-protector-strong -Wformat -Werror=format-security
-mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/usr/lib/epics/include/compiler/gcc -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include -I/usr/lib/epics/include/compiler/gcc
-I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include -I/usr/lib/epics/include/compiler/gcc -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include -c ../fftwrap.cpp ../fftwrap.cpp: In member function ‘void PSDCalc::calculate()’: ../fftwrap.cpp:182:42: error: array must be initialized with a brace-enclosed initializer fftw_complex temp = mid[j]; ^ ../fftwrap.cpp:184:39: error: cannot convert ‘double*’ to ‘__complex__ double’ for argument ‘1’ to ‘double creal(__complex__ double)’ out[j-1] += creal(temp)*creal(temp) + cimag(temp)*cimag(temp); ^ ../fftwrap.cpp:184:51: error: cannot convert ‘double*’ to ‘__complex__ double’ for argument ‘1’ to ‘double creal(__complex__ double)’ out[j-1] += creal(temp)*creal(temp) + cimag(temp)*cimag(temp); ^ ../fftwrap.cpp:184:65: error: cannot convert ‘double*’ to ‘__complex__ double’ for argument ‘1’ to ‘double cimag(__complex__ double)’ out[j-1] += creal(temp)*creal(temp) + cimag(temp)*cimag(temp); ^ ../fftwrap.cpp:184:77: error: cannot convert ‘double*’ to ‘__complex__ double’ for argument ‘1’ to ‘double cimag(__complex__ double)’ out[j-1] += creal(temp)*creal(temp) + cimag(temp)*cimag(temp); ^ In file included from ../fftwrap.cpp:17:0: ../fftwrap.h: In instantiation of ‘void FFTWAllocator<T>::destroy(FFTWAllocator<T>::pointer) [with T = double [2]; FFTWAllocator<T>::pointer = double (*)[2]]’: /usr/include/c++/6/bits/alloc_traits.h:256:4: required from ‘static decltype (__a.destroy(__p)) std::allocator_traits<_Alloc>::_S_destroy(_Alloc2&, _Tp*, int) [with _Alloc2 = FFTWAllocator<double [2]>; _Tp = double [2]; _Alloc = FFTWAllocator<double
[2]>; decltype (__a.destroy(__p)) = void]’ /usr/include/c++/6/bits/alloc_traits.h:356:14: required from ‘static void std::allocator_traits<_Alloc>::destroy(_Alloc&, _Tp*) [with _Tp = double [2]; _Alloc = FFTWAllocator<double [2]>]’ /usr/include/c++/6/bits/stl_construct.h:143:19: required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator, _Allocator&) [with _ForwardIterator = double (*)[2]; _Allocator = FFTWAllocator<double [2]>]’ /usr/include/c++/6/bits/vector.tcc:571:18: required from ‘void std::vector<_Tp, _Alloc>::_M_default_append(std::vector<_Tp, _Alloc>::size_type) [with _Tp = double [2]; _Alloc = FFTWAllocator<double [2]>; std::vector<_Tp, _Alloc>::size_type
= long unsigned int]’ /usr/include/c++/6/bits/stl_vector.h:677:21: required from ‘void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = double [2]; _Alloc = FFTWAllocator<double [2]>; std::vector<_Tp, _Alloc>::size_type = long
unsigned int]’ ../fftwrap.cpp:143:35: required from here ../fftwrap.h:72:10: error: request for member ‘~double [2]’ in ‘* p’, which is of non-class type ‘double [2]’ {p->~T();} ~~~~^ ../fftwrap.h: In instantiation of ‘void FFTWAllocator<T>::construct(FFTWAllocator<T>::pointer, FFTWAllocator<T>::const_reference&) [with T = double [2]; FFTWAllocator<T>::pointer = double (*)[2]; FFTWAllocator<T>::const_reference = const
double (&)[2]]’: /usr/include/c++/6/bits/alloc_traits.h:243:4: required from ‘static std::_Require<typename std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type> std::allocator_traits<_Alloc>::_S_construct(_Alloc&, _Tp*, _Args&& ...) [with
_Tp = double [2]; _Args = {double [2]}; _Alloc = FFTWAllocator<double [2]>; std::_Require<typename std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type> = void]’ /usr/include/c++/6/bits/alloc_traits.h:344:16: required from ‘static decltype (std::allocator_traits<_Alloc>::_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) std::allocator_traits<_Alloc>::construct(_Alloc&,
_Tp*, _Args&& ...) [with _Tp = double [2]; _Args = {double [2]}; _Alloc = FFTWAllocator<double [2]>; decltype (std::allocator_traits<_Alloc>::_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) = void]’ /usr/include/c++/6/bits/stl_uninitialized.h:267:25: required from ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = std::move_iterator<double (*)[2]>; _ForwardIterator
= double (*)[2]; _Allocator = FFTWAllocator<double [2]>]’ /usr/include/c++/6/bits/stl_uninitialized.h:303:2: required from ‘_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = double (*)[2]; _ForwardIterator
= double (*)[2]; _Allocator = FFTWAllocator<double [2]>]’ /usr/include/c++/6/bits/vector.tcc:563:7: required from ‘void std::vector<_Tp, _Alloc>::_M_default_append(std::vector<_Tp, _Alloc>::size_type) [with _Tp = double [2]; _Alloc = FFTWAllocator<double [2]>; std::vector<_Tp, _Alloc>::size_type
= long unsigned int]’ /usr/include/c++/6/bits/stl_vector.h:677:21: required from ‘void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = double [2]; _Alloc = FFTWAllocator<double [2]>; std::vector<_Tp, _Alloc>::size_type = long
unsigned int]’ ../fftwrap.cpp:143:35: required from here ../fftwrap.h:69:6: error: parenthesized initializer in array new [-fpermissive] {::new((void*)p) T(val);} ^~~~~~~~~~~~~~~~~~~~~~ /etc/epics/configure/RULES_BUILD:239: recipe for target 'fftwrap.o' failed make[2]: *** [fftwrap.o] Error 1 make[2]: Leaving directory '/home/kha/pscdrv/sigApp/src/O.linux-x86_64' /etc/epics/configure/RULES_ARCHS:58: recipe for target 'install.linux-x86_64' failed make[1]: *** [install.linux-x86_64] Error 2 make[1]: Leaving directory '/home/kha/pscdrv/sigApp/src' /etc/epics/configure/RULES_DIRS:84: recipe for target 'src.install' failed make: *** [src.install] Error 2 |