dbosak01 / fmtr

An R package for formatting data.
12 stars 1 forks source link

Compile problem on install from CRAN #67

Open tarlgordon opened 3 months ago

tarlgordon commented 3 months ago

I am looking to install fmtr as a prerequisite to reporter, which I'm looking to try out on my next project. Installing reporter failed as below. When I see install fails, I typically try to install the dependency individually and that often either clears up or I get a message that helps me understand what I need to do differently. This time, I don't have a clue. Can you recommend any fixes or next steps?

> install.packages("reporter")
Installing package into ‘/home/tarl/R/x86_64-redhat-linux-gnu-library/4.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘common’, ‘fmtr’, ‘jpeg’, ‘zip’

trying URL 'https://cran.rstudio.com/src/contrib/common_1.1.3.tar.gz'
Content type 'application/x-gzip' length 508799 bytes (496 KB)
==================================================
downloaded 496 KB

trying URL 'https://cran.rstudio.com/src/contrib/fmtr_1.6.5.tar.gz'
Content type 'application/x-gzip' length 588445 bytes (574 KB)
==================================================
downloaded 574 KB

trying URL 'https://cran.rstudio.com/src/contrib/jpeg_0.1-10.tar.gz'
Content type 'application/x-gzip' length 18667 bytes (18 KB)
==================================================
downloaded 18 KB

trying URL 'https://cran.rstudio.com/src/contrib/zip_2.3.1.tar.gz'
Content type 'application/x-gzip' length 111280 bytes (108 KB)
==================================================
downloaded 108 KB

trying URL 'https://cran.rstudio.com/src/contrib/reporter_1.4.4.tar.gz'
Content type 'application/x-gzip' length 3166789 bytes (3.0 MB)
==================================================
downloaded 3.0 MB

* installing *source* package ‘common’ ...
** package ‘common’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package ‘common’
    finding HTML links ... done
    Sys.path                                html  
    changed                                 html  
    common                                  html  
    copy.attributes                         html  
    dir.find                                html  
    file.find                               html  
    find.names                              html  
    grapes-eq-grapes                        html  
    grapes-p-grapes                         html  
    labels.data.frame                       html  
    roundup                                 html  
    sort.data.frame                         html  
    source.all                              html  
    spaces                                  html  
    subsc                                   html  
    supsc                                   html  
    symbol                                  html  
    v                                       html  
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (common)
* installing *source* package ‘jpeg’ ...
** package ‘jpeg’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)’
gcc -I"/usr/include/R" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c read.c -o read.o
gcc -I"/usr/include/R" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c reg.c -o reg.o
gcc -I"/usr/include/R" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c write.c -o write.o
gcc -shared -L/usr/lib64/R/lib -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -o jpeg.so read.o reg.o write.o -ljpeg -L/usr/lib64/R/lib -lR
installing to /home/tarl/R/x86_64-redhat-linux-gnu-library/4.4/00LOCK-jpeg/00new/jpeg/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package ‘jpeg’
    finding HTML links ... done
    readJPEG                                html  
    writeJPEG                               html  
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (jpeg)
* installing *source* package ‘zip’ ...
** package ‘zip’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)’
gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  miniz.c zip.c unixutils.c tools/cmdzip.c -o tools/cmdzip
gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  miniz.c zip.c unixutils.c tools/cmdunzip.c -o tools/cmdunzip
gcc -I"/usr/include/R" -DNDEBUG   -I/usr/local/include   -fvisibility=hidden -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c init.c -o init.o
gcc -I"/usr/include/R" -DNDEBUG   -I/usr/local/include   -fvisibility=hidden -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c miniz.c -o miniz.o
gcc -I"/usr/include/R" -DNDEBUG   -I/usr/local/include   -fvisibility=hidden -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c rzip.c -o rzip.o
gcc -I"/usr/include/R" -DNDEBUG   -I/usr/local/include   -fvisibility=hidden -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c zip.c -o zip.o
gcc -I"/usr/include/R" -DNDEBUG   -I/usr/local/include   -fvisibility=hidden -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c unixutils.c -o unixutils.o
gcc -shared -L/usr/lib64/R/lib -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -o zip.so init.o miniz.o rzip.o zip.o unixutils.o -L/usr/lib64/R/lib -lR
installing via 'install.libs.R' to /home/tarl/R/x86_64-redhat-linux-gnu-library/4.4/00LOCK-zip/00new/zip
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package ‘zip’
    finding HTML links ... done
    deflate                                 html  
    inflate                                 html  
    unzip                                   html  
    unzip_process                           html  
    zip-package                             html  
    zip                                     html  
    zip_list                                html  
    zip_process                             html  
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (zip)
* installing *source* package ‘fmtr’ ...
** package ‘fmtr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++ (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)’
g++ -std=gnu++17 -I"/usr/include/R" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I/usr/local/include    -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection   -c RcppExports.cpp -o RcppExports.o
In file included from /usr/lib64/R/library/Rcpp/include/Rcpp/routines.h:26,
                 from /usr/lib64/R/library/Rcpp/include/RcppCommon.h:128,
                 from /usr/lib64/R/library/Rcpp/include/Rcpp.h:27,
                 from RcppExports.cpp:4:
/usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h: In member function ‘std::streamsize Rcpp::Rstreambuf<OUTPUT>::xsputn(const char*, std::streamsize) [with bool OUTPUT = true; std::streamsize = long int]’:
/usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:53:20: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 2 has type ‘std::streamsize’ {aka ‘long int’} [-Wformat=]
   53 |         Rprintf("%.*s", num, s);
      |                  ~~^~   ~~~
      |                    |    |
      |                    int  std::streamsize {aka long int}
/usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h: In member function ‘std::streamsize Rcpp::Rstreambuf<OUTPUT>::xsputn(const char*, std::streamsize) [with bool OUTPUT = false; std::streamsize = long int]’:
/usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:57:21: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 2 has type ‘std::streamsize’ {aka ‘long int’} [-Wformat=]
   57 |         REprintf("%.*s", num, s);
      |                   ~~^~   ~~~
      |                     |    |
      |                     int  std::streamsize {aka long int}
In file included from /usr/lib64/R/library/Rcpp/include/RcppCommon.h:181,
                 from /usr/lib64/R/library/Rcpp/include/Rcpp.h:27,
                 from RcppExports.cpp:4:
/usr/lib64/R/library/Rcpp/include/Rcpp/print.h: In function ‘void Rcpp::warningcall(SEXP, const string&)’:
/usr/lib64/R/library/Rcpp/include/Rcpp/print.h:30:19: error: format not a string literal and no format arguments [-Werror=format-security]
   30 |     Rf_warningcall(call, s.c_str());
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make: *** [/usr/lib64/R/etc/Makeconf:204: RcppExports.o] Error 1
ERROR: compilation failed for package ‘fmtr’
* removing ‘/home/tarl/R/x86_64-redhat-linux-gnu-library/4.4/fmtr’
Warning in install.packages :
  installation of package ‘fmtr’ had non-zero exit status
ERROR: dependency ‘fmtr’ is not available for package ‘reporter’
* removing ‘/home/tarl/R/x86_64-redhat-linux-gnu-library/4.4/reporter’
Warning in install.packages :
  installation of package ‘reporter’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpTk0C4w/downloaded_packages’
> install.packages("fmtr")
Installing package into ‘/home/tarl/R/x86_64-redhat-linux-gnu-library/4.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/fmtr_1.6.5.tar.gz'
Content type 'application/x-gzip' length 588445 bytes (574 KB)
==================================================
downloaded 574 KB

* installing *source* package ‘fmtr’ ...
** package ‘fmtr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++ (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)’
g++ -std=gnu++17 -I"/usr/include/R" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I/usr/local/include    -fpic  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection   -c RcppExports.cpp -o RcppExports.o
In file included from /usr/lib64/R/library/Rcpp/include/Rcpp/routines.h:26,
                 from /usr/lib64/R/library/Rcpp/include/RcppCommon.h:128,
                 from /usr/lib64/R/library/Rcpp/include/Rcpp.h:27,
                 from RcppExports.cpp:4:
/usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h: In member function ‘std::streamsize Rcpp::Rstreambuf<OUTPUT>::xsputn(const char*, std::streamsize) [with bool OUTPUT = true; std::streamsize = long int]’:
/usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:53:20: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 2 has type ‘std::streamsize’ {aka ‘long int’} [-Wformat=]
   53 |         Rprintf("%.*s", num, s);
      |                  ~~^~   ~~~
      |                    |    |
      |                    int  std::streamsize {aka long int}
/usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h: In member function ‘std::streamsize Rcpp::Rstreambuf<OUTPUT>::xsputn(const char*, std::streamsize) [with bool OUTPUT = false; std::streamsize = long int]’:
/usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:57:21: warning: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 2 has type ‘std::streamsize’ {aka ‘long int’} [-Wformat=]
   57 |         REprintf("%.*s", num, s);
      |                   ~~^~   ~~~
      |                     |    |
      |                     int  std::streamsize {aka long int}
In file included from /usr/lib64/R/library/Rcpp/include/RcppCommon.h:181,
                 from /usr/lib64/R/library/Rcpp/include/Rcpp.h:27,
                 from RcppExports.cpp:4:
/usr/lib64/R/library/Rcpp/include/Rcpp/print.h: In function ‘void Rcpp::warningcall(SEXP, const string&)’:
/usr/lib64/R/library/Rcpp/include/Rcpp/print.h:30:19: error: format not a string literal and no format arguments [-Werror=format-security]
   30 |     Rf_warningcall(call, s.c_str());
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make: *** [/usr/lib64/R/etc/Makeconf:204: RcppExports.o] Error 1
ERROR: compilation failed for package ‘fmtr’
* removing ‘/home/tarl/R/x86_64-redhat-linux-gnu-library/4.4/fmtr’
Warning in install.packages :
  installation of package ‘fmtr’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpTk0C4w/downloaded_packages’
> 
dbosak01 commented 3 months ago

Hmm...It seems to be choking on Rcpp. Can you try installing Rcpp by itself first?

dbosak01 commented 3 months ago

What country are you in? We might have to have a chat.

dbosak01 commented 2 months ago

Did this get resolved?