Closed sensestage closed 5 years ago
Hi, could you give more details please? Which system, os, compiler and ide version, rapidmix repo?
master of rapidmix repo: http://gitlab.doc.gold.ac.uk/rapid-mix/RAPID-MIX_API.git
Linux Xubuntu Xenial. I'm building with Cmake from the command line. g++ (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904
Confirmed, it compiles for Mac but not Linux. There is something going wrong with the (re-)definition of rta_complex_t in dependencies/pipo/modules/rta/src/util/rta_complex.h
I just updated my system and the problem persists at Xubuntu 18.04. g++ (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
Also there is already an error before the one in rta_complex - in PipoGraph.h (also at the top of the previous output listing):
/pipo/sdk/src/host/PiPoGraph.h:217:84: error: cannot convert ‘std::__cxx11::basic_string<char>::iterator {aka __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >}’ to ‘const char*’ for argument ‘1’ to ‘int remove(const char*)’
std::remove(this->representation.begin(), this->representation.end(), ' '),
after an updated compiler detection in rta_complex.h, it works on Linux now with latest branches develop for sdk and master for rta submodules. note the needed compiler flags, see build/linux/makefile:
# with gnu c++ everything is easy
CXXFLAGS += $(FLAGS) -std=gnu++11
# with clang, -fext-numeric-literals is needed for complex definition
CXXFLAGS += $(FLAGS) -std=c++11 -fext-numeric-literals
ok, I can get pipo itself now to build, modifying to use the changed CXXFlags, but not yet from the RAPIDMIX API cmake build....
ok - added in the CMakeLists of RAPIDMIX API the line:
# added for pipo
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
One more addition needed there to link to pthreads.
find_package (Threads)
target_link_libraries(RAPID-MIX_API ${CMAKE_THREAD_LIBS_INIT})
(It seems a bit more tricky to file issues with the RAPIDMIX API gitlab repo, so that's why I put them here - as reference for people who might run into the same issues in the future.)
I'm building from the rapidmixapi library with the cmake build setup from there. I'm getting the errors below, caused by the pipo library.