我在這個問題上摸不着頭腦。如何在家裏,在Ubuntu上重現 CRAN's gcc ubsan tests of my package的結果? (在準備步驟的指示來自here)在ubuntu上重現CRAN GCC-UBSAN測試結果「在家」
1)我安裝更新所有需要的軟件包:
apt-get update
apt-get install bash-completion bison debhelper default-jdk g++ gcc gfortran groff-base libblas-dev libbz2-dev libcairo2-dev libcurl4-openssl-dev libjpeg-dev liblapack-dev liblzma-dev libncurses5-dev libpango1.0-dev libpcre3-dev libpng-dev libreadline-dev libtiff5-dev libx11-dev libxt-dev mpack subversion tcl8.5-dev texinfo texlive-base texlive-extra-utils texlive-fonts-extra texlive-fonts-recommended texlive-generic-recommended texlive-latex-base texlive-latex-extra texlive-latex-recommended tk8.5-dev valgrind x11proto-core-dev xauth xdg-utils xfonts-base xvfb zlib1g-dev
2)內置Rdevel與所需的選項:
cd /tmp
svn co http://svn.r-project.org/R/trunk R-devel
cd /tmp/R-devel
R_PAPERSIZE=letter R_BATCHSAVE="--no-save --no-restore" PAGER=/usr/bin/pager PERL=/usr/bin/perl R_UNZIPCMD=/usr/bin/unzip R_ZIPCMD=/usr/bin/zip R_PRINTCMD=/usr/bin/lpr LIBnn=lib AWK=/usr/bin/awk CFLAGS="-pipe -std=gnu99 -Wall -pedantic -O2" CXXFLAGS="-pipe -Wall -pedantic -O2" CC="gcc -fsanitize=address,undefined" CXX="g++ -fsanitize=address,undefined" CXX1X="g++ -fsanitize=address,undefined" FC="gfortran -fsanitize=address,undefined" F77="gfortran -fsanitize=address,undefined" ./configure --enable-R-shlib --without-blas --without-lapack --with-readline --without-recommended-packages --program-suffix=dev --disable-openmp
make
make install
make clean
3)最後,使用as-cran標誌在本地構建/編譯所述軟件包:
wget https://cran.r-project.org/src/contrib/FastRCS_0.0.6.tar.gz
tar -xvzf FastRCS_0.0.6.tar.gz
Rdevel CMD check --as-cran FastRCS
但是我沒有得到和cran一樣的bug報告(參見here)。我的意思是例如這一個:
/usr/local/gcc5/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/emmintrin.h:140:21: runtime error: load of misaligned address 0x61800007fc84 for type 'const double', which requires 8 byte alignment
0x61800007fc84: note: pointer points here
00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f
我使用的腳本有什麼問題?
這是最簡單的方法 – user189035
當我編寫答案時,這當然是不可用的......但至少容器幫助Gabor建立r-hub。 –