harrelfe / Hmisc

Harrell Miscellaneous
Other
208 stars 81 forks source link

Error when updating Hmisc on Linux - unable to collate and parse R files #166

Closed eliasallara closed 1 month ago

eliasallara commented 1 year ago

Dear Professor Harrell,

Thank you very much for maintaining the Hmisc package.

I was wondering if you happen to have a solution for the following installation error on linux (Scientific Linux 7.9 , kernel 3.10.0-1160.88.1.el7.x86_64):

* installing *source* package 'Hmisc' ...
** package 'Hmisc' successfully unpacked and MD5 sums checked
** using staged installation
** libs
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gcc -I"/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c Hmisc.c -o Hmisc.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gfortran  -fpic  -g -O2  -c cidxcn.f -o cidxcn.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gfortran  -fpic  -g -O2  -c cidxcp.f -o cidxcp.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gfortran  -fpic  -g -O2  -c hoeffd.f -o hoeffd.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gcc -I"/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c init.c -o init.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gfortran  -fpic  -g -O2  -c jacklins.f -o jacklins.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gfortran  -fpic  -g -O2  -c largrec.f -o largrec.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gcc -I"/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c mChoice.c -o mChoice.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gfortran  -fpic  -g -O2  -c maxempr.f -o maxempr.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gcc -I"/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c nstr.c -o nstr.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gcc -I"/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c ranksort.c -o ranksort.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gfortran  -fpic  -g -O2  -c rcorr.f -o rcorr.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gcc -I"/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2  -c string_box.c -o string_box.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gfortran  -fpic  -g -O2  -c wclosest.f -o wclosest.o
/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-4.8.5/gcc-5.4.0-fis24ggupugiobii56fesif2y3qulpdr/bin/gcc -shared -L/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/lib -L/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/lib -Wl,-rpath,/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/lib -o Hmisc.so Hmisc.o cidxcn.o cidxcp.o hoeffd.o init.o jacklins.o largrec.o mChoice.o maxempr.o nstr.o ranksort.o rcorr.o string_box.o wclosest.o -lgfortran -lm -lquadmath -L/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/r-4.0.2-xyx46xbuw2lmofomvrkwuty5rlez6to6/rlib/R/lib -lR
installing to /home/ea431/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-Hmisc/00new/Hmisc/libs
** R
Error in parse(outFile) : 
  /tmp/RtmpQK2Ojh/R.INSTALL2b1e296ef681/Hmisc/R/describe.s:1443:63: unexpected '>'
1442:   
1443:   b <- gt::gt(a)                                             |>
                                                                    ^
ERROR: unable to collate and parse R files for package 'Hmisc'
* removing '/home/ea431/R/x86_64-pc-linux-gnu-library/4.0/Hmisc'
* restoring previous '/home/ea431/R/x86_64-pc-linux-gnu-library/4.0/Hmisc'

It looks like this could be solved with an intervention on the developer's side (https://stackoverflow.com/questions/56471638/error-unable-to-collate-and-parse-r-files-for-package-upload-to-cran), but perhaps you might know of other solutions that would enable me to fix this myself?

Very grateful for any help you can give me on this.

With best wishes, Elias

couthcommander commented 1 year ago

Hi Elias - this is related to issue 159. Please review that issue and user suggested fixes. The short summary is that R 4.2 introduced the pipe operator |>, which Hmisc now uses. There is a pull request that should fix the problem but it has not been accepted. I would suggest using an older version of Hmisc (or a newer version of R).

eliasallara commented 1 year ago

Hi Cole, this is great - thanks very much.

mmokrejs commented 1 year ago

Same here with R-3.5.5. I cannot upgrade.

harrelfe commented 1 month ago

I’m requiring R 4.2.0 or later in the next CRAN release.