With the following g++:
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 7.3.0-5' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Debian 7.3.0-5)
I get the following error when compiling a file:
In file included from /usr/include/itpp/base/random_dsfmt.h:40:0,
from /usr/include/itpp/base/random.h:32,
from /usr/include/itpp/itbase.h:121,
from /usr/include/itpp/itsignal.h:63,
from /usr/include/itpp/itcomm.h:48,
from ofdm_test.cpp:1:
/usr/include/itpp/base/random_dsfmt.h: In static member function ‘static void itpp::random_details::DSFMT<MEXP, POS1, SL1, MSK1, MSK2, FIX1_V, FIX2_V, PCV1_V, PCV2_V>::do_recursion(typename itpp::random_details::DSFMT<MEXP, POS1, SL1, MSK1, MSK2, FIX1_V, FIX2_V, PCV1_V, PCV2_V>::Context::w128_t*, typename itpp::random_details::DSFMT<MEXP, POS1, SL1, MSK1, MSK2, FIX1_V, FIX2_V, PCV1_V, PCV2_V>::Context::w128_t*, typename itpp::random_details::DSFMT<MEXP, POS1, SL1, MSK1, MSK2, FIX1_V, FIX2_V, PCV1_V, PCV2_V>::Context::w128_t*, typename itpp::random_details::DSFMT<MEXP, POS1, SL1, MSK1, MSK2, FIX1_V, FIX2_V, PCV1_V, PCV2_V>::Context::w128_t*) [with int MEXP = 19937; int POS1 = 117; int SL1 = 19; long unsigned int MSK1 = 4498102069230399; long unsigned int MSK2 = 4501400546508797; long unsigned int FIX1_V = 10376655713290109737; long unsigned int FIX2_V = 4291106551315987578; long unsigned int PCV1_V = 4432916062321256576; long unsigned int PCV2_V = 1]’:
/usr/include/itpp/base/random_dsfmt.h:306:17: error: the last argument must be an 8-bit immediate
__m128i y = _mm_shuffle_epi32(lung->si, SSE2_SHUFF);
^
I think this may have to do with the SSE2_SHUFF being unsigned in random_dsfmt.h. Let me see if I can do some debugging.
Replacing SSE_SHUFF with 27 solves the problem, though I don't know if that is right. This may also be connected: https://stackoverflow.com/questions/48726032/using-a-variable-to-index-a-simd-vector-with-mm256-extract-epi32-intrinsic
Last edit: Kumar Appaiah 2018-06-21
Ok, so removing SSE2_SHUFF and replacing the entry with 0x1bU directly works. I will use this fix in Debian.
Hi
I have solved recently a similar issue that generated errors when IT++ is compiled on Ubuntu Bionic. You can find the relevant change here: https://sourceforge.net/p/itpp/git/ci/bb5c7e95f40e8fdb5c3f3d01a84bcbaf76f3676d/tree/itpp/base/random_dsfmt.h?diff=d425a09330ced7aa8192d695df9d38876df6c76d
I've uploaded a new version of IT++ to Debian with the above patch. Thanks.
After downloading this revesion it managed to build, however, when I am not able to do the testing.
cmake .. -DGTEST_DIR=/home/shahein/Downloads/itpp-git/gtests -- A library with BLAS API found. -- A library with BLAS API found. -- A library with LAPACK API found. -- A library with FFT API found. CMake Warning (dev) at cmake/Modules/CheckCXXFunctionExists.cmake:32 (IF): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Quoted variables like "HAVE_STD_ISFINITE" will no longer be dereferenced when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): CMakeLists.txt:148 (CHECK_CXX_FUNCTION_EXISTS) This warning is for project developers. Use -Wno-dev to suppress it. -- BLAS vendor: All -- Configuring done CMake Error at gtests/CMakeLists.txt:32 (add_executable): Cannot find source file: /home/shahein/Downloads/itpp-git/gtests/src/gtest-all.cc Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx CMake Error: CMake can not determine linker language for target: itpp_gtests CMake Error: Cannot determine link language for target "itpp_gtests". -- Generating done -- Build files have been written to: /home/shahein/Downloads/itpp-git/buildThis is the message when I executed make command:
Hi
gtest sources need to be downloaded separately in your gtests folder before you start the actual compilation.
regards
Bogdan
Could you please send me the link? I downloaded it from github but I am still getting the same error message.
Many thanks.
Regards.
Hi
Here are the steps I have used:
Note that GTEST_DIR does not point to the sources root folder (when googletest is cloned with git) but goes one level lower where only googletest sources are.
In order to run the tests use (from build folder)
Worked smoothly.
Thanks a lot.
Have a great evening.