You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/15 02:58:41 UTC

[GitHub] [arrow] paleolimbot commented on issue #33635: R package may be failing to compile on gcc13

paleolimbot commented on issue #33635:
URL: https://github.com/apache/arrow/issues/33635#issuecomment-1383039057

   Since gcc-13 isn't released yet, replicating this involves building gcc from source. I did so using this Dockerfile:
   
   ```dockerfile
   FROM rocker/r-devel:latest
   RUN apt update && apt install -y git flex
   RUN git clone git://gcc.gnu.org/git/gcc.git gcc-dev
   RUN cd gcc-dev && ./contrib/download_prerequisites
   RUN mkdir gcc-build && cd gcc-build && ../gcc-dev/configure -disable-multilib --enable-languages=c,c++,fortran
   RUN cd gcc-build && make -j4 && make install
   
   RUN apt-get update && apt-get install -y cmake libssl-dev
   RUN git clone https://github.com/apache/arrow.git /arrow && mkdir /arrow-build && cd /arrow-build && cmake /arrow/cpp -DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ -DARROW_CSV=ON -DARROW_DATASET=ON -DARROW_FILESYSTEM=ON -DARROW_COMPUTE=ON -DARROW_PARQUET=ON -DBoost_SOURCE=BUNDLED && cmake --build . && cmake --install . --prefix /arrow-dist
   
   ENV ARROW_HOME /arrow-dist
   RUN echo 'LD_LIBRARY_PATH="/arrow-dist/lib:/usr/local/lib64:${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}"' >> /usr/lib/R/etc/ldpaths
   RUN mkdir ~/.R && echo 'CXX11=/usr/local/bin/g++' > ~/.R/Makevars && echo 'CXX14=/usr/local/bin/g++' >> ~/.R/Makevars && echo 'CXX17=/usr/local/bin/g++' >> ~/.R/Makevars && echo 'CXX=/usr/local/bin/g++' >> ~/.R/Makevars && echo 'CC=/usr/local/bin/gcc' >> ~/.R/Makevars
   RUN echo 'CCFLAGS = -Wall -pedantic -O2' >> ~/.R/Makevars && echo 'CXXFLAGS = -Wall -pedantic -O2' >> ~/.R/Makevars && echo 'CXX11FLAGS = -Wall -pedantic -O2' >> ~/.R/Makevars
   
   RUN R -e 'install.packages(c("testthat", "pkgbuild", "cpp11", "R6", "assertthat", "bit64", "bit", "cli", "ellipsis", "glue", "magrittr", "purrr", "rlang", "blob", "stringr",  "tidyselect", "vctrs", "lubridate", "dplyr", "hms"))'
   RUN cd /arrow/r && R CMD INSTALL .
   
   CMD /bin/bash
   ```
   
   ...and was unable to replicate the error. @nealrichardson that should be sufficient to include to our "please hit reply-all and answer: have these problems been fixed"? The reported error seemed to indicate that the error might be a result of a compiler bug (which may have been fixed between the time that BDR built gcc13 and when I built gcc13 today).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org