使用 Git 的最新源

使用 Git 的最新源

有人能帮忙吗?我似乎找不到解决办法,也不明白我应该用这个 c++ 程序做什么

 plutes@plutes-Lenovo-G50-30:~/itpp-4.3.1/build$ make 
[  1%] Building CXX object itpp/CMakeFiles/itpp.dir/base/random.cpp.o
In file included from /home/plutes/itpp-4.3.1/itpp/base/random_dsfmt.h:40:0,
                 from /home/plutes/itpp-4.3.1/itpp/base/random.h:32,
                 from /home/plutes/itpp-4.3.1/itpp/base/random.cpp:29:
/home/plutes/itpp-4.3.1/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]’:
/home/plutes/itpp-4.3.1/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);
                 ^
itpp/CMakeFiles/itpp.dir/build.make:422: recipe for target 'itpp/CMakeFiles/itpp.dir/base/random.cpp.o' failed
make[2]: *** [itpp/CMakeFiles/itpp.dir/base/random.cpp.o] Error 1
CMakeFiles/Makefile2:87: recipe for target 'itpp/CMakeFiles/itpp.dir/all' failed
make[1]: *** [itpp/CMakeFiles/itpp.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2     

答案1

这里有两种方法:

  • 编译最新的 Git 源
  • 使用存储库中的官方 Ubuntu 软件包(首选方式)

使用 Git 的最新源

正如您所写,最新的 itpp-4.3.1.tar.bz2 无法在 Ubuntu 18.04 LTS 上编译。但它可以在使用 GCC 5.4 的 Ubuntu 16.04 LTS 上正常编译。

我刚刚发现开发人员有新的特殊承诺修复错误.因此我们可以用以下命令安装源版本:

sudo apt-get install autoconf automake libtool build-essential cmake git \
libblas-dev liblapack-dev libfftw3-dev
cd ~/Downloads
git clone https://git.code.sf.net/p/itpp/git itpp-git
cd itpp-git
./autogen.sh
./configure
mkdir build
cd build
cmake ..
make
sudo make install

使用存储库中的官方 Ubuntu 软件包

我从未使用过此包,但似乎它与版本 4.3.1-8 一起打包为libitpp-devlibitpp8v5甚至在 18.04 LTS 上也是如此。因此你可以使用

sudo apt-get install libitpp-dev libitpp8v5

然后按照说明将您的应用程序链接到 IT++在文档中

你也可以编译一些例子来自libitpp-doc包裹。

相关内容