casacore / python-casacore

Python bindings for casacore, a library used in radio astronomy
http://casacore.github.io/python-casacore
GNU Lesser General Public License v3.0
35 stars 22 forks source link

Issue compiling python-casacore on ubuntu 20.04 with casacore 3.4.0 #213

Closed gijzelaerr closed 3 years ago

gijzelaerr commented 3 years ago
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -O2 -fdebug-prefix-map=/build/python-casacore-3.3.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/include -I/usr/lib/include -I/usr/include/python3.8 -c src/pyimages.cc -o build/temp.linux-x86_64-3.8/src/pyimages.o -std=c++11
src/pyimages.cc: In function 'void casacore::python::pyimages()':
src/pyimages.cc:48:34: error: 'vector' was not declared in this scope
   48 |       .def (init<String, String, vector<ImageProxy> >())
      |                                  ^~~~~~
src/pyimages.cc:48:34: note: suggested alternatives:
In file included from /usr/include/c++/9/vector:67,
                 from /usr/include/casacore/casa/Arrays/IPosition.h:34,
                 from /usr/include/casacore/lattices/Lattices/LatticeBase.h:35,
                 from /usr/include/casacore/images/Images/ImageProxy.h:35,
                 from src/pyimages.cc:28:
/usr/include/c++/9/bits/stl_vector.h:386:11: note:   'std::vector'
  386 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37,
                 from /usr/include/boost/mpl/vector.hpp:46,
                 from /usr/include/boost/math/policies/policy.hpp:14,
                 from /usr/include/boost/math/special_functions/math_fwd.hpp:29,
                 from /usr/include/boost/math/special_functions/sign.hpp:17,
                 from /usr/include/boost/lexical_cast/detail/inf_nan.hpp:34,
                 from /usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp:63,
                 from /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:54,
                 from /usr/include/boost/lexical_cast/try_lexical_convert.hpp:44,
                 from /usr/include/boost/lexical_cast.hpp:32,
                 from /usr/include/boost/python/operators.hpp:19,
                 from /usr/include/boost/python.hpp:49,
                 from /usr/include/casacore/python/Converters/PycBasicData.h:32,
                 from src/pyimages.cc:29:
/usr/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp:22:8: note:   'boost::mpl::vector'
   22 | struct vector;
      |        ^~~~~~
In file included from /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:52,
                 from /usr/include/boost/lexical_cast/try_lexical_convert.hpp:44,
                 from /usr/include/boost/lexical_cast.hpp:32,
                 from /usr/include/boost/python/operators.hpp:19,
                 from /usr/include/boost/python.hpp:49,
                 from /usr/include/casacore/python/Converters/PycBasicData.h:32,
                 from src/pyimages.cc:29:
/usr/include/boost/container/container_fwd.hpp:103:7: note:   'boost::container::vector'
  103 | class vector;
      |       ^~~~~~
src/pyimages.cc:48:51: error: template argument 3 is invalid
   48 |       .def (init<String, String, vector<ImageProxy> >())
      |                                                   ^
src/pyimages.cc:48:55: error: expected primary-expression before ')' token
   48 |       .def (init<String, String, vector<ImageProxy> >())
      |                                                       ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
gabicca commented 3 years ago

Hi, I think I have the same problem on MacOS BigSur (running on the latest ARM-based M1 chip laptop). Here is the error when I try installing python-casacore with pip but also when I'm building it from source:

    src/pyimages.cc:48:34: error: use of undeclared identifier 'vector'
          .def (init<String, String, vector<ImageProxy> >())
                                     ^

I have casacore 3.4.0 as well.

Just wanted to add a note so this problem doesn't get forgotten :)

gijzelaerr commented 3 years ago

yes, its the same. This PR should fix the issue https://github.com/casacore/python-casacore/pull/215

gabicca commented 3 years ago

Great, Thanks! Do you know maybe with which release the fix will be available and roughly when?

gijzelaerr commented 3 years ago

the next release, which we are working on now. can't make any promises, but maybe next week.

tammojan commented 3 years ago

Fixed by #215.